Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / System.Runtime.DurableInstancing / System / Runtime / DurableInstancing / InstanceKeyCompleteException.cs / 1305376 / InstanceKeyCompleteException.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 InstanceKeyCompleteException : InstancePersistenceCommandException { const string InstanceKeyName = "instancePersistenceInstanceKey"; public InstanceKeyCompleteException() : this(SRCore.KeyNotReadyDefault, null) { } public InstanceKeyCompleteException(string message) : this(message, null) { } public InstanceKeyCompleteException(string message, Exception innerException) : base(message, innerException) { } public InstanceKeyCompleteException(XName commandName, InstanceKey instanceKey) : this(commandName, instanceKey, null) { } public InstanceKeyCompleteException(XName commandName, InstanceKey instanceKey, Exception innerException) : this(commandName, Guid.Empty, instanceKey, ToMessage(instanceKey), innerException) { } public InstanceKeyCompleteException(XName commandName, Guid instanceId, InstanceKey instanceKey, string message, Exception innerException) : base(commandName, instanceId, message, innerException) { InstanceKey = instanceKey; } [SecurityCritical] protected InstanceKeyCompleteException(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.KeyCompleteSpecific(instanceKey.Value); } return SRCore.KeyCompleteDefault; } } } // 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
- DataGridViewRowPrePaintEventArgs.cs
- DataSourceView.cs
- DataGridViewCellStyleChangedEventArgs.cs
- BlockCollection.cs
- ListBoxChrome.cs
- AnonymousIdentificationModule.cs
- IODescriptionAttribute.cs
- DiscardableAttribute.cs
- HostingEnvironmentSection.cs
- Base64Stream.cs
- KnownBoxes.cs
- GridViewSortEventArgs.cs
- DataViewManager.cs
- ContainerTracking.cs
- ShellProvider.cs
- DataTablePropertyDescriptor.cs
- WorkflowPersistenceService.cs
- AspCompat.cs
- HybridObjectCache.cs
- BufferedGraphicsContext.cs
- OdbcInfoMessageEvent.cs
- BaseServiceProvider.cs
- SafeHandles.cs
- AnnotationComponentChooser.cs
- DesignBindingConverter.cs
- Triplet.cs
- FrameSecurityDescriptor.cs
- Button.cs
- Guid.cs
- SearchForVirtualItemEventArgs.cs
- Rijndael.cs
- HostingEnvironment.cs
- AffineTransform3D.cs
- PerformanceCounterLib.cs
- WebConvert.cs
- AssociationSet.cs
- XsltCompileContext.cs
- DesignerSerializationOptionsAttribute.cs
- TextEffect.cs
- ConfigXmlAttribute.cs
- XmlAtomErrorReader.cs
- LineServices.cs
- SQLMoney.cs
- XomlCompilerError.cs
- SchemaElementDecl.cs
- PageContentAsyncResult.cs
- ImageSource.cs
- XmlSiteMapProvider.cs
- BrushValueSerializer.cs
- DecoderFallback.cs
- JsonUriDataContract.cs
- FixedSOMPageConstructor.cs
- securitymgrsite.cs
- hwndwrapper.cs
- XmlSchemaAttribute.cs
- MimeBasePart.cs
- SqlCacheDependencyDatabase.cs
- QueryActivatableWorkflowsCommand.cs
- PropertyDescriptorCollection.cs
- Or.cs
- EFAssociationProvider.cs
- IndividualDeviceConfig.cs
- CloudCollection.cs
- Object.cs
- Vector3D.cs
- WindowProviderWrapper.cs
- RequiredAttributeAttribute.cs
- InputProcessorProfiles.cs
- WrapPanel.cs
- SqlDependency.cs
- StylusPlugInCollection.cs
- StylusPlugInCollection.cs
- updatecommandorderer.cs
- StructuredProperty.cs
- RadioButtonPopupAdapter.cs
- ListBoxAutomationPeer.cs
- ResourceReferenceExpressionConverter.cs
- SystemColors.cs
- StatusBarAutomationPeer.cs
- ComAdminInterfaces.cs
- CreatingCookieEventArgs.cs
- EnvironmentPermission.cs
- RawStylusInputReport.cs
- HttpCachePolicyWrapper.cs
- TraceSource.cs
- ImageMap.cs
- _NestedMultipleAsyncResult.cs
- Cursors.cs
- _ChunkParse.cs
- DataGridViewBand.cs
- OrderedEnumerableRowCollection.cs
- FillBehavior.cs
- OdbcRowUpdatingEvent.cs
- ConstructorExpr.cs
- ProfileParameter.cs
- ObjectConverter.cs
- HtmlElementEventArgs.cs
- OperationInvokerBehavior.cs
- GridViewRowCollection.cs
- HtmlButton.cs