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
- BaseValidatorDesigner.cs
- WebPartMinimizeVerb.cs
- BitmapCodecInfo.cs
- SamlAttribute.cs
- OracleDataAdapter.cs
- GetPageCompletedEventArgs.cs
- EndpointIdentity.cs
- AssemblyEvidenceFactory.cs
- UniqueIdentifierService.cs
- StylusCollection.cs
- DrawingBrush.cs
- InstalledFontCollection.cs
- XamlSerializer.cs
- FieldCollectionEditor.cs
- TypeInitializationException.cs
- WorkflowWebService.cs
- XmlUnspecifiedAttribute.cs
- TextBreakpoint.cs
- StateElementCollection.cs
- WSFederationHttpBindingCollectionElement.cs
- TableAdapterManagerGenerator.cs
- XmlReader.cs
- DynamicPropertyHolder.cs
- XmlAnyElementAttributes.cs
- NotifyInputEventArgs.cs
- CodeDelegateInvokeExpression.cs
- KnownAssemblyEntry.cs
- NamedObject.cs
- XmlSchemaParticle.cs
- QueryResponse.cs
- TrustManager.cs
- PermissionToken.cs
- XsdValidatingReader.cs
- StructuredTypeInfo.cs
- EmptyControlCollection.cs
- ColorBlend.cs
- XmlSchemaAttributeGroup.cs
- EditorPartCollection.cs
- Schema.cs
- Authorization.cs
- AnnotationMap.cs
- QualificationDataAttribute.cs
- Menu.cs
- DBCSCodePageEncoding.cs
- TableRowGroup.cs
- WSDualHttpSecurityElement.cs
- MethodRental.cs
- TextFragmentEngine.cs
- OLEDB_Enum.cs
- XPathCompileException.cs
- ObjectStateEntryDbDataRecord.cs
- OdbcConnectionPoolProviderInfo.cs
- DocumentPageTextView.cs
- AppDomainShutdownMonitor.cs
- XPathNavigatorKeyComparer.cs
- CompModSwitches.cs
- HtmlWindow.cs
- safelinkcollection.cs
- SiteMapDataSource.cs
- SyndicationDeserializer.cs
- SelectionItemPattern.cs
- CommandExpr.cs
- Error.cs
- ProxyWebPart.cs
- LocalizationComments.cs
- SynchronizationValidator.cs
- TypeExtensions.cs
- DataColumnMappingCollection.cs
- ExtentKey.cs
- TreeView.cs
- ToolStripContentPanelDesigner.cs
- XsltFunctions.cs
- SuppressMergeCheckAttribute.cs
- PreviewPrintController.cs
- TreeView.cs
- WindowsGraphicsCacheManager.cs
- MetafileHeader.cs
- JournalNavigationScope.cs
- WaitHandleCannotBeOpenedException.cs
- NotificationContext.cs
- SQLDoubleStorage.cs
- DependencyPropertyKind.cs
- AsyncOperationManager.cs
- SettingsAttributes.cs
- SamlSubject.cs
- SolidColorBrush.cs
- NativeObjectSecurity.cs
- Translator.cs
- DbSource.cs
- DefaultValidator.cs
- PageStatePersister.cs
- DependencyPropertyDescriptor.cs
- RbTree.cs
- DataSourceCache.cs
- ListSortDescription.cs
- WindowInteropHelper.cs
- SharedDp.cs
- EditorPartCollection.cs
- InvalidFilterCriteriaException.cs
- IPAddressCollection.cs