Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / System.Runtime.DurableInstancing / System / Runtime / DurableInstancing / InstanceOwnerException.cs / 1305376 / InstanceOwnerException.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.Runtime.DurableInstancing { using System.Diagnostics.CodeAnalysis; using System.Runtime.Serialization; using System.Security; using System.Xml.Linq; [Serializable] public class InstanceOwnerException : InstancePersistenceException { const string InstanceOwnerIdName = "instancePersistenceInstanceOwnerId"; public InstanceOwnerException() : base(SRCore.InstanceOwnerDefault) { } public InstanceOwnerException(string message) : base(message) { } public InstanceOwnerException(string message, Exception innerException) : base(message, innerException) { } public InstanceOwnerException(XName commandName, Guid instanceOwnerId) : this(commandName, instanceOwnerId, null) { } public InstanceOwnerException(XName commandName, Guid instanceOwnerId, Exception innerException) : this(commandName, instanceOwnerId, ToMessage(instanceOwnerId), innerException) { } public InstanceOwnerException(XName commandName, Guid instanceOwnerId, string message, Exception innerException) : base(commandName, message, innerException) { InstanceOwnerId = instanceOwnerId; } [SecurityCritical] protected InstanceOwnerException(SerializationInfo info, StreamingContext context) : base(info, context) { InstanceOwnerId = (Guid) info.GetValue(InstanceOwnerIdName, typeof(Guid)); } public Guid InstanceOwnerId { get; private set; } [Fx.Tag.SecurityNote(Critical = "Overrides critical inherited method")] [SecurityCritical] [SuppressMessage(FxCop.Category.Security, FxCop.Rule.SecureGetObjectDataOverrides, Justification = "Method is SecurityCritical")] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); info.AddValue(InstanceOwnerIdName, InstanceOwnerId, typeof(Guid)); } static string ToMessage(Guid instanceOwnerId) { if (instanceOwnerId == Guid.Empty) { return SRCore.InstanceOwnerDefault; } return SRCore.InstanceOwnerSpecific(instanceOwnerId); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.Runtime.DurableInstancing { using System.Diagnostics.CodeAnalysis; using System.Runtime.Serialization; using System.Security; using System.Xml.Linq; [Serializable] public class InstanceOwnerException : InstancePersistenceException { const string InstanceOwnerIdName = "instancePersistenceInstanceOwnerId"; public InstanceOwnerException() : base(SRCore.InstanceOwnerDefault) { } public InstanceOwnerException(string message) : base(message) { } public InstanceOwnerException(string message, Exception innerException) : base(message, innerException) { } public InstanceOwnerException(XName commandName, Guid instanceOwnerId) : this(commandName, instanceOwnerId, null) { } public InstanceOwnerException(XName commandName, Guid instanceOwnerId, Exception innerException) : this(commandName, instanceOwnerId, ToMessage(instanceOwnerId), innerException) { } public InstanceOwnerException(XName commandName, Guid instanceOwnerId, string message, Exception innerException) : base(commandName, message, innerException) { InstanceOwnerId = instanceOwnerId; } [SecurityCritical] protected InstanceOwnerException(SerializationInfo info, StreamingContext context) : base(info, context) { InstanceOwnerId = (Guid) info.GetValue(InstanceOwnerIdName, typeof(Guid)); } public Guid InstanceOwnerId { get; private set; } [Fx.Tag.SecurityNote(Critical = "Overrides critical inherited method")] [SecurityCritical] [SuppressMessage(FxCop.Category.Security, FxCop.Rule.SecureGetObjectDataOverrides, Justification = "Method is SecurityCritical")] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); info.AddValue(InstanceOwnerIdName, InstanceOwnerId, typeof(Guid)); } static string ToMessage(Guid instanceOwnerId) { if (instanceOwnerId == Guid.Empty) { return SRCore.InstanceOwnerDefault; } return SRCore.InstanceOwnerSpecific(instanceOwnerId); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Range.cs
- CorrelationTokenInvalidatedHandler.cs
- HttpsTransportElement.cs
- QueueProcessor.cs
- XamlSerializationHelper.cs
- ReadOnlyDictionary.cs
- _BaseOverlappedAsyncResult.cs
- OpenFileDialog.cs
- DataTableMapping.cs
- CompositeActivityCodeGenerator.cs
- FileDialogCustomPlacesCollection.cs
- DataControlLinkButton.cs
- ZoneButton.cs
- SspiNegotiationTokenProviderState.cs
- OptionUsage.cs
- XmlAtomicValue.cs
- PageResolution.cs
- SessionState.cs
- LinqTreeNodeEvaluator.cs
- RawStylusInput.cs
- cache.cs
- AttributeCollection.cs
- WebResourceAttribute.cs
- ServiceDiscoveryBehavior.cs
- documentsequencetextview.cs
- RefreshPropertiesAttribute.cs
- Quaternion.cs
- RawKeyboardInputReport.cs
- UriTemplatePathPartiallyEquivalentSet.cs
- CodeDOMProvider.cs
- InputScope.cs
- AsyncStreamReader.cs
- SqlDataSourceQueryConverter.cs
- MetabaseSettings.cs
- PopupRootAutomationPeer.cs
- UserThread.cs
- CommonDialog.cs
- BuildDependencySet.cs
- Typeface.cs
- FontInfo.cs
- RoleManagerEventArgs.cs
- HandleRef.cs
- NetStream.cs
- DefaultWorkflowLoaderService.cs
- MemberDescriptor.cs
- ObjectDataSourceMethodEditor.cs
- PerspectiveCamera.cs
- SystemIcmpV6Statistics.cs
- Stream.cs
- CollectionsUtil.cs
- CodeLinePragma.cs
- DataMemberConverter.cs
- SEHException.cs
- BasePattern.cs
- Visitor.cs
- ExceptionUtil.cs
- SamlAuthorizationDecisionStatement.cs
- TreeViewImageIndexConverter.cs
- OperationAbortedException.cs
- RayMeshGeometry3DHitTestResult.cs
- LineServicesRun.cs
- SplitterPanel.cs
- GeneralTransform3DGroup.cs
- SubMenuStyleCollection.cs
- FutureFactory.cs
- StorageEntityTypeMapping.cs
- FlowStep.cs
- HostingEnvironmentException.cs
- LinearGradientBrush.cs
- DataControlFieldCollection.cs
- DataBoundLiteralControl.cs
- XmlStreamStore.cs
- ExpressionVisitor.cs
- Accessors.cs
- MessageTraceRecord.cs
- CannotUnloadAppDomainException.cs
- BlurEffect.cs
- RegexGroupCollection.cs
- Variable.cs
- DataViewManager.cs
- DataRowCollection.cs
- PolicyManager.cs
- querybuilder.cs
- CollectionMarkupSerializer.cs
- JournalEntryStack.cs
- GenericPrincipal.cs
- ProfileSettingsCollection.cs
- Int32Converter.cs
- ScrollContentPresenter.cs
- Light.cs
- ConvertBinder.cs
- SpellerInterop.cs
- WindowsListViewGroupHelper.cs
- WebPartAuthorizationEventArgs.cs
- CacheSection.cs
- DataSourceUtil.cs
- TextAnchor.cs
- ZipFileInfoCollection.cs
- DrawingAttributes.cs
- CompoundFileStreamReference.cs