Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ImageFormat.cs
- Cursor.cs
- Message.cs
- TypeForwardedToAttribute.cs
- PrintingPermissionAttribute.cs
- TypeReference.cs
- ProfilePropertySettingsCollection.cs
- tibetanshape.cs
- _HelperAsyncResults.cs
- CallContext.cs
- mda.cs
- ToolBarButtonClickEvent.cs
- AccessKeyManager.cs
- ConnectionInterfaceCollection.cs
- TeredoHelper.cs
- ISFClipboardData.cs
- AudioDeviceOut.cs
- DataService.cs
- GradientBrush.cs
- DataControlFieldCell.cs
- Decoder.cs
- RequestCachePolicy.cs
- AnnotationObservableCollection.cs
- HtmlDocument.cs
- UserPreferenceChangedEventArgs.cs
- DataGridViewAddColumnDialog.cs
- WebPartTransformerCollection.cs
- TypeDependencyAttribute.cs
- BitmapFrameDecode.cs
- shaperfactoryquerycacheentry.cs
- ExecutedRoutedEventArgs.cs
- NamedPipeAppDomainProtocolHandler.cs
- DetailsViewInsertedEventArgs.cs
- COM2ExtendedTypeConverter.cs
- OleDbConnection.cs
- OpenTypeLayout.cs
- Handle.cs
- FixedLineResult.cs
- BasicKeyConstraint.cs
- SessionPageStateSection.cs
- ProbeMatchesCD1.cs
- CompiledQueryCacheEntry.cs
- WebControlParameterProxy.cs
- HttpCapabilitiesSectionHandler.cs
- CategoryNameCollection.cs
- OleDbCommandBuilder.cs
- FragmentQueryProcessor.cs
- ConfigurationPropertyCollection.cs
- StateManagedCollection.cs
- ConstraintManager.cs
- RegexRunner.cs
- MethodBody.cs
- AbstractSvcMapFileLoader.cs
- DocumentApplicationJournalEntry.cs
- ClockController.cs
- DesignerTextViewAdapter.cs
- SqlConnectionHelper.cs
- ContextMarshalException.cs
- InvalidDataException.cs
- CacheChildrenQuery.cs
- ReferenceEqualityComparer.cs
- FontFamilyConverter.cs
- PagedControl.cs
- DbConnectionPoolGroupProviderInfo.cs
- ActivityBuilderHelper.cs
- AddressAlreadyInUseException.cs
- RtfControlWordInfo.cs
- DbProviderFactories.cs
- ReflectPropertyDescriptor.cs
- AvTraceFormat.cs
- EditorZone.cs
- UnsafeNativeMethods.cs
- ColumnResult.cs
- SessionSymmetricTransportSecurityProtocolFactory.cs
- XmlSchemaProviderAttribute.cs
- GridViewRowEventArgs.cs
- TableCell.cs
- UIElementAutomationPeer.cs
- DBBindings.cs
- EmbeddedObject.cs
- Label.cs
- DPTypeDescriptorContext.cs
- GraphicsPathIterator.cs
- ContourSegment.cs
- BulletedList.cs
- XmlIlGenerator.cs
- CommonProperties.cs
- DataGridViewCellPaintingEventArgs.cs
- InstanceKeyNotReadyException.cs
- CachedBitmap.cs
- DirectionalLight.cs
- ButtonField.cs
- OpCellTreeNode.cs
- webproxy.cs
- FontCollection.cs
- AudienceUriMode.cs
- DataGridViewTextBoxCell.cs
- TreeChangeInfo.cs
- GlobalProxySelection.cs
- DBNull.cs