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
- IntSecurity.cs
- mediapermission.cs
- LayoutEngine.cs
- EventMappingSettingsCollection.cs
- UnsafeNativeMethods.cs
- CustomCategoryAttribute.cs
- InnerItemCollectionView.cs
- activationcontext.cs
- CodeBinaryOperatorExpression.cs
- AxisAngleRotation3D.cs
- ConfigurationManagerInternal.cs
- Clipboard.cs
- ToolStripSystemRenderer.cs
- RijndaelManaged.cs
- CodeDelegateInvokeExpression.cs
- DynamicFilter.cs
- X509CertificateTrustedIssuerElement.cs
- CodeEntryPointMethod.cs
- CompilationUnit.cs
- TagPrefixAttribute.cs
- DuplexChannelFactory.cs
- designeractionbehavior.cs
- HwndStylusInputProvider.cs
- FontFamily.cs
- CommonBehaviorsSection.cs
- InnerItemCollectionView.cs
- IdentityReference.cs
- ConnectionManagementElementCollection.cs
- DataTableCollection.cs
- GeometryDrawing.cs
- LoginView.cs
- XmlParserContext.cs
- SafeProcessHandle.cs
- XmlDomTextWriter.cs
- EncodingNLS.cs
- MediaSystem.cs
- SafeReadContext.cs
- BlockCollection.cs
- ExtendedProtectionPolicy.cs
- DropDownButton.cs
- CategoryAttribute.cs
- Graph.cs
- TdsParserStateObject.cs
- WebServiceErrorEvent.cs
- MatrixAnimationUsingKeyFrames.cs
- ObjectReferenceStack.cs
- DataServiceContext.cs
- PluggableProtocol.cs
- MessagingDescriptionAttribute.cs
- SymLanguageType.cs
- CodeDomComponentSerializationService.cs
- ToolStripTextBox.cs
- AuthStoreRoleProvider.cs
- XamlSerializationHelper.cs
- StrongName.cs
- BatchServiceHost.cs
- ObjectTag.cs
- PreloadedPackages.cs
- COM2IDispatchConverter.cs
- BinaryFormatter.cs
- AuthenticationManager.cs
- AttributeCollection.cs
- OleCmdHelper.cs
- SignatureResourcePool.cs
- BrowserCapabilitiesFactoryBase.cs
- ColorConverter.cs
- RepeatInfo.cs
- TableRow.cs
- SQLGuid.cs
- SqlStatistics.cs
- ObjectQueryState.cs
- Vector.cs
- SQLBytesStorage.cs
- XmlSchemaComplexContentRestriction.cs
- AuthenticationManager.cs
- WebPartDescriptionCollection.cs
- LogArchiveSnapshot.cs
- SmiTypedGetterSetter.cs
- ThreadStateException.cs
- LogReservationCollection.cs
- Int64AnimationUsingKeyFrames.cs
- WorkflowOperationBehavior.cs
- DetailsViewPagerRow.cs
- DurableInstanceProvider.cs
- Win32NamedPipes.cs
- InfocardInteractiveChannelInitializer.cs
- ScriptMethodAttribute.cs
- ObjectDataSourceChooseTypePanel.cs
- HtmlLink.cs
- ASCIIEncoding.cs
- LineProperties.cs
- PrivateFontCollection.cs
- StreamUpdate.cs
- ListDictionaryInternal.cs
- CompositeDuplexBindingElement.cs
- SessionState.cs
- XPathParser.cs
- CustomError.cs
- EventBuilder.cs
- SqlParameterCollection.cs