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
- EventProvider.cs
- SerialErrors.cs
- RegexMatch.cs
- CalendarButton.cs
- MessageBox.cs
- RenderContext.cs
- ListGeneralPage.cs
- LockRecoveryTask.cs
- XmlSchemaImporter.cs
- PersistenceException.cs
- DataGridRow.cs
- HeaderCollection.cs
- ChangePassword.cs
- StaticFileHandler.cs
- ObjectViewQueryResultData.cs
- CaseInsensitiveHashCodeProvider.cs
- TypeSchema.cs
- Viewport3DAutomationPeer.cs
- WeakHashtable.cs
- COM2TypeInfoProcessor.cs
- Button.cs
- ArrangedElementCollection.cs
- OutputCacheProfile.cs
- EventWaitHandleSecurity.cs
- Camera.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- ConnectionOrientedTransportBindingElement.cs
- ActivitySurrogate.cs
- LinqToSqlWrapper.cs
- altserialization.cs
- HotSpot.cs
- SqlDataRecord.cs
- ClientFormsAuthenticationCredentials.cs
- VisemeEventArgs.cs
- InternalBufferManager.cs
- JsonDataContract.cs
- COSERVERINFO.cs
- DependencyObject.cs
- WeakKeyDictionary.cs
- AudioBase.cs
- DataIdProcessor.cs
- AgileSafeNativeMemoryHandle.cs
- PropagatorResult.cs
- DateTimeConstantAttribute.cs
- CustomBindingCollectionElement.cs
- HttpModule.cs
- EmptyControlCollection.cs
- RegistryPermission.cs
- XslException.cs
- TextProperties.cs
- EncoderNLS.cs
- xmlsaver.cs
- BitmapEffect.cs
- SendKeys.cs
- ReadOnlyDictionary.cs
- BaseTemplatedMobileComponentEditor.cs
- EditCommandColumn.cs
- DoubleCollection.cs
- M3DUtil.cs
- PropertyPushdownHelper.cs
- ContourSegment.cs
- Converter.cs
- UnknownWrapper.cs
- XPathScanner.cs
- EventPropertyMap.cs
- TabItem.cs
- CodeEntryPointMethod.cs
- UnSafeCharBuffer.cs
- ElementNotEnabledException.cs
- WebPartConnectionsConnectVerb.cs
- BitmapMetadataEnumerator.cs
- TextEvent.cs
- DataBoundControlAdapter.cs
- OracleParameterCollection.cs
- EncryptedType.cs
- _CacheStreams.cs
- WebPartTransformerCollection.cs
- SoapHeaderException.cs
- ColumnResizeAdorner.cs
- UserControl.cs
- RegexRunner.cs
- DelayedRegex.cs
- PageOrientation.cs
- SimplePropertyEntry.cs
- SingleResultAttribute.cs
- DeferredBinaryDeserializerExtension.cs
- WindowPatternIdentifiers.cs
- CryptoProvider.cs
- Exception.cs
- SystemTcpConnection.cs
- PropertyDescriptor.cs
- HtmlTitle.cs
- ResourceWriter.cs
- Region.cs
- UInt32Storage.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- ReadOnlyHierarchicalDataSource.cs
- TraceEventCache.cs
- LicenseException.cs
- BrowserCapabilitiesCodeGenerator.cs