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
- CodeDirectiveCollection.cs
- PageClientProxyGenerator.cs
- FileSystemInfo.cs
- CDSsyncETWBCLProvider.cs
- InternalControlCollection.cs
- WindowsAuthenticationModule.cs
- LogicalExpr.cs
- BitmapPalette.cs
- ReadOnlyNameValueCollection.cs
- LinkDescriptor.cs
- AutomationPatternInfo.cs
- WebPartPersonalization.cs
- AttributeInfo.cs
- SqlConnectionPoolGroupProviderInfo.cs
- TitleStyle.cs
- UnauthorizedAccessException.cs
- EntityKey.cs
- ReflectionHelper.cs
- CodeRegionDirective.cs
- DynamicScriptObject.cs
- DbConnectionPool.cs
- OperationParameterInfo.cs
- UpdateTracker.cs
- SHA384.cs
- XPathNodePointer.cs
- SimpleApplicationHost.cs
- WebPartUtil.cs
- File.cs
- TrackingProfile.cs
- TaskFileService.cs
- ScriptingSectionGroup.cs
- NativeMethods.cs
- LassoSelectionBehavior.cs
- RelatedCurrencyManager.cs
- CodeIdentifier.cs
- ControlCollection.cs
- TransactedBatchContext.cs
- Variant.cs
- EdmFunctionAttribute.cs
- PlaceHolder.cs
- WebErrorHandler.cs
- DeclaredTypeValidator.cs
- SystemIPInterfaceStatistics.cs
- Point4D.cs
- Vector3DAnimation.cs
- ReadOnlyDataSource.cs
- FileSystemWatcher.cs
- SizeAnimation.cs
- XmlSchemaRedefine.cs
- CompressStream.cs
- InputBuffer.cs
- RelOps.cs
- MD5.cs
- ConditionChanges.cs
- BaseTemplateBuildProvider.cs
- BamlVersionHeader.cs
- StringTraceRecord.cs
- MessageQueuePermissionAttribute.cs
- FactoryMaker.cs
- Instrumentation.cs
- FilteredAttributeCollection.cs
- CalendarDateRangeChangingEventArgs.cs
- DataGridViewRowCollection.cs
- ProgressBar.cs
- RemotingAttributes.cs
- HtmlAnchor.cs
- PrimitiveSchema.cs
- ConfigurationCollectionAttribute.cs
- DbProviderManifest.cs
- SecondaryIndexList.cs
- ProcessHostServerConfig.cs
- SystemWebSectionGroup.cs
- CollectionAdapters.cs
- HostAdapter.cs
- TextRangeEdit.cs
- TypeExtension.cs
- TextAdaptor.cs
- ADMembershipUser.cs
- SafeEventLogWriteHandle.cs
- TextEditorSelection.cs
- ContainerTracking.cs
- ListViewSortEventArgs.cs
- Automation.cs
- _ProxyRegBlob.cs
- RadioButtonAutomationPeer.cs
- SafeRsaProviderHandle.cs
- Point3DValueSerializer.cs
- SQlBooleanStorage.cs
- ObjectAnimationUsingKeyFrames.cs
- WebServiceBindingAttribute.cs
- ThreadPool.cs
- ToolStripItemCollection.cs
- SqlCharStream.cs
- PerformanceCounterCategory.cs
- ReceiveContextCollection.cs
- CellTreeNode.cs
- TreeViewItemAutomationPeer.cs
- AccessorTable.cs
- SettingsPropertyNotFoundException.cs
- FlatButtonAppearance.cs