Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / System.Runtime.DurableInstancing / System / Runtime / DurableInstancing / InstanceKeyNotReadyException.cs / 1305376 / InstanceKeyNotReadyException.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 InstanceKeyNotReadyException : InstancePersistenceCommandException { const string InstanceKeyName = "instancePersistenceInstanceKey"; public InstanceKeyNotReadyException() : this(SRCore.KeyNotReadyDefault, null) { } public InstanceKeyNotReadyException(string message) : this(message, null) { } public InstanceKeyNotReadyException(string message, Exception innerException) : base(message, innerException) { } public InstanceKeyNotReadyException(XName commandName, InstanceKey instanceKey) : this(commandName, instanceKey, null) { } public InstanceKeyNotReadyException(XName commandName, InstanceKey instanceKey, Exception innerException) : this(commandName, Guid.Empty, instanceKey, ToMessage(instanceKey), innerException) { } public InstanceKeyNotReadyException(XName commandName, Guid instanceId, InstanceKey instanceKey, string message, Exception innerException) : base(commandName, instanceId, message, innerException) { InstanceKey = instanceKey; } [SecurityCritical] protected InstanceKeyNotReadyException(SerializationInfo info, StreamingContext context) : base(info, context) { Guid guid = (Guid) info.GetValue(InstanceKeyName, typeof(Guid)); InstanceKey = guid == Guid.Empty ? null : new InstanceKey(guid); } public InstanceKey InstanceKey { 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(InstanceKeyName, (InstanceKey != null && InstanceKey.IsValid) ? InstanceKey.Value : Guid.Empty, typeof(Guid)); } static string ToMessage(InstanceKey instanceKey) { if (instanceKey != null && instanceKey.IsValid) { return SRCore.KeyNotReadySpecific(instanceKey.Value); } return SRCore.KeyNotReadyDefault; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PaperSize.cs
- Roles.cs
- Schema.cs
- MobileFormsAuthentication.cs
- WindowsClaimSet.cs
- SchemaRegistration.cs
- FontFamilyValueSerializer.cs
- TextEndOfLine.cs
- GridViewRowPresenterBase.cs
- ChineseLunisolarCalendar.cs
- Setter.cs
- future.cs
- TextSelectionHelper.cs
- BasicHttpMessageSecurity.cs
- CompressStream.cs
- ZipIOExtraFieldPaddingElement.cs
- StylusButton.cs
- XslException.cs
- ActiveXHelper.cs
- OdbcStatementHandle.cs
- RequestCachePolicy.cs
- UIElement3D.cs
- ServiceNotStartedException.cs
- Size3D.cs
- ImageList.cs
- Confirm.cs
- StateItem.cs
- CommandLibraryHelper.cs
- XmlSchemaObjectCollection.cs
- COM2IProvidePropertyBuilderHandler.cs
- ImportContext.cs
- IncomingWebResponseContext.cs
- nulltextcontainer.cs
- XmlUtilWriter.cs
- VerbConverter.cs
- HtmlTitle.cs
- ImageDrawing.cs
- _OverlappedAsyncResult.cs
- OAVariantLib.cs
- OleCmdHelper.cs
- DelayLoadType.cs
- MgmtResManager.cs
- XPathNodeHelper.cs
- CodeChecksumPragma.cs
- XmlSortKey.cs
- PauseStoryboard.cs
- ProjectionPruner.cs
- SchemaObjectWriter.cs
- URLMembershipCondition.cs
- SynchronousReceiveElement.cs
- DbConnectionPoolIdentity.cs
- PreviewPrintController.cs
- DoubleCollection.cs
- PreservationFileReader.cs
- XpsFixedDocumentSequenceReaderWriter.cs
- TypeSystemProvider.cs
- TemplateKey.cs
- MethodCallTranslator.cs
- DataGridViewControlCollection.cs
- CompositeDuplexBindingElement.cs
- GlobalizationSection.cs
- ThreadAbortException.cs
- dataobject.cs
- CellParagraph.cs
- TimelineClockCollection.cs
- DNS.cs
- PersonalizationStateQuery.cs
- DataPointer.cs
- CategoryEditor.cs
- XmlElement.cs
- BuildProviderCollection.cs
- StorageSetMapping.cs
- CompoundFileIOPermission.cs
- SoapHeaders.cs
- AssociationSetMetadata.cs
- WebRequestModulesSection.cs
- Typeface.cs
- FileDialog_Vista_Interop.cs
- SerializationTrace.cs
- SequentialUshortCollection.cs
- TimeoutValidationAttribute.cs
- CountAggregationOperator.cs
- LineMetrics.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- Freezable.cs
- XmlMembersMapping.cs
- BufferedGenericXmlSecurityToken.cs
- MulticastDelegate.cs
- SQLBinaryStorage.cs
- ExternalException.cs
- DbDataSourceEnumerator.cs
- CopyOnWriteList.cs
- MailAddress.cs
- WebConfigurationHostFileChange.cs
- TimeStampChecker.cs
- TimeManager.cs
- PropertyReferenceSerializer.cs
- GridViewDeletedEventArgs.cs
- IgnoreSectionHandler.cs
- BinaryNegotiation.cs