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
- DbConnectionPoolIdentity.cs
- DecimalStorage.cs
- DateTimeSerializationSection.cs
- NullEntityWrapper.cs
- CallbackValidatorAttribute.cs
- ClipboardProcessor.cs
- Quad.cs
- NameValueSectionHandler.cs
- ZipIOModeEnforcingStream.cs
- NumericPagerField.cs
- ProjectionNode.cs
- UIElementIsland.cs
- Schema.cs
- ScrollChrome.cs
- MtomMessageEncoder.cs
- HybridDictionary.cs
- SchemaElementLookUpTableEnumerator.cs
- ManagedWndProcTracker.cs
- AVElementHelper.cs
- Binding.cs
- BrowserInteropHelper.cs
- XamlTypeWithExplicitNamespace.cs
- XmlDataSourceNodeDescriptor.cs
- SymLanguageVendor.cs
- RuntimeIdentifierPropertyAttribute.cs
- StylusDownEventArgs.cs
- XmlCodeExporter.cs
- BStrWrapper.cs
- RewritingValidator.cs
- SafeUserTokenHandle.cs
- IDReferencePropertyAttribute.cs
- DocumentViewerBase.cs
- Control.cs
- WorkflowItemsPresenter.cs
- DataSourceCache.cs
- CollectionChangeEventArgs.cs
- ContextMenuStrip.cs
- ResourceManagerWrapper.cs
- ComboBox.cs
- DynamicActivity.cs
- FileSystemEventArgs.cs
- MenuItemStyleCollection.cs
- ConcurrentBag.cs
- RectangleGeometry.cs
- TimelineClockCollection.cs
- ConnectionsZone.cs
- NamespaceExpr.cs
- SqlCommand.cs
- IdentitySection.cs
- ArraySegment.cs
- OverlappedAsyncResult.cs
- NavigationWindow.cs
- ValueChangedEventManager.cs
- DPCustomTypeDescriptor.cs
- XmlExtensionFunction.cs
- GridViewRowPresenterBase.cs
- DataRow.cs
- CachedFontFamily.cs
- Array.cs
- ComponentFactoryHelpers.cs
- SimpleHandlerBuildProvider.cs
- TypeConverterAttribute.cs
- exports.cs
- SQLInt32.cs
- HtmlEncodedRawTextWriter.cs
- TheQuery.cs
- MsiStyleLogWriter.cs
- SettingsPropertyValueCollection.cs
- WebPartManager.cs
- SHA1.cs
- TableLayout.cs
- CodeIdentifier.cs
- ElementMarkupObject.cs
- XPathExpr.cs
- CollectionType.cs
- MenuItem.cs
- ClientBuildManagerCallback.cs
- CompilationUnit.cs
- ObjectStateEntryDbDataRecord.cs
- AppModelKnownContentFactory.cs
- RootContext.cs
- BypassElementCollection.cs
- ContentElement.cs
- WebPartMenuStyle.cs
- DSASignatureDeformatter.cs
- SubMenuStyle.cs
- DocumentPageHost.cs
- SoapIgnoreAttribute.cs
- ButtonBase.cs
- xamlnodes.cs
- CheckBox.cs
- DrawingBrush.cs
- AsnEncodedData.cs
- DelegatingTypeDescriptionProvider.cs
- safex509handles.cs
- AutoCompleteStringCollection.cs
- SystemException.cs
- Activity.cs
- Bezier.cs
- ObjectTag.cs