Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / System.Runtime.DurableInstancing / System / Runtime / DurableInstancing / InstancePersistenceException.cs / 1305376 / InstancePersistenceException.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 InstancePersistenceException : Exception { const string CommandNameName = "instancePersistenceCommandName"; public InstancePersistenceException() : base(ToMessage(null)) { } public InstancePersistenceException(string message) : base(message) { } public InstancePersistenceException(string message, Exception innerException) : base(message, innerException) { } public InstancePersistenceException(XName commandName) : this(commandName, ToMessage(commandName)) { } public InstancePersistenceException(XName commandName, Exception innerException) : this(commandName, ToMessage(commandName), innerException) { } public InstancePersistenceException(XName commandName, string message) : base(message) { CommandName = commandName; } public InstancePersistenceException(XName commandName, string message, Exception innerException) : base(message, innerException) { CommandName = commandName; } [SecurityCritical] protected InstancePersistenceException(SerializationInfo info, StreamingContext context) : base(info, context) { CommandName = info.GetValue(CommandNameName, typeof(XName)) as XName; } public XName CommandName { 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(CommandNameName, CommandName, typeof(XName)); } static string ToMessage(XName commandName) { return commandName == null ? SRCore.GenericInstanceCommandNull : SRCore.GenericInstanceCommand(commandName); } } } // 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 InstancePersistenceException : Exception { const string CommandNameName = "instancePersistenceCommandName"; public InstancePersistenceException() : base(ToMessage(null)) { } public InstancePersistenceException(string message) : base(message) { } public InstancePersistenceException(string message, Exception innerException) : base(message, innerException) { } public InstancePersistenceException(XName commandName) : this(commandName, ToMessage(commandName)) { } public InstancePersistenceException(XName commandName, Exception innerException) : this(commandName, ToMessage(commandName), innerException) { } public InstancePersistenceException(XName commandName, string message) : base(message) { CommandName = commandName; } public InstancePersistenceException(XName commandName, string message, Exception innerException) : base(message, innerException) { CommandName = commandName; } [SecurityCritical] protected InstancePersistenceException(SerializationInfo info, StreamingContext context) : base(info, context) { CommandName = info.GetValue(CommandNameName, typeof(XName)) as XName; } public XName CommandName { 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(CommandNameName, CommandName, typeof(XName)); } static string ToMessage(XName commandName) { return commandName == null ? SRCore.GenericInstanceCommandNull : SRCore.GenericInstanceCommand(commandName); } } } // 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
- GenericPrincipal.cs
- LinqDataSourceEditData.cs
- SkinBuilder.cs
- PromptStyle.cs
- PlanCompiler.cs
- ExpressionSelection.cs
- SelectionListDesigner.cs
- DataGridSortingEventArgs.cs
- WebPartVerbsEventArgs.cs
- ClearCollection.cs
- CmsUtils.cs
- UserNamePasswordServiceCredential.cs
- ChannelBinding.cs
- VectorCollection.cs
- Clause.cs
- PeerNameRecordCollection.cs
- ModelUIElement3D.cs
- TextTreeTextNode.cs
- InputElement.cs
- Facet.cs
- initElementDictionary.cs
- MLangCodePageEncoding.cs
- _SingleItemRequestCache.cs
- ConditionalDesigner.cs
- IApplicationTrustManager.cs
- Vector3DAnimation.cs
- PlaceHolder.cs
- TextReader.cs
- listitem.cs
- ControlPersister.cs
- CodeSnippetCompileUnit.cs
- HttpHeaderCollection.cs
- WebBrowsableAttribute.cs
- WebReferencesBuildProvider.cs
- FileDetails.cs
- RtType.cs
- Ipv6Element.cs
- DataGridItemCollection.cs
- SequenceQuery.cs
- XPathDocument.cs
- DuplicateWaitObjectException.cs
- ChildrenQuery.cs
- RequestQueryParser.cs
- RoutedUICommand.cs
- SHA512Cng.cs
- WaitHandleCannotBeOpenedException.cs
- PageDeviceFont.cs
- UshortList2.cs
- SessionStateUtil.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- IndentedTextWriter.cs
- ResetableIterator.cs
- ConfigurationLoaderException.cs
- CodeAttachEventStatement.cs
- DoubleConverter.cs
- EventWaitHandle.cs
- InvokePatternIdentifiers.cs
- TypeBuilder.cs
- ConfigXmlText.cs
- TextElementCollectionHelper.cs
- SystemResourceHost.cs
- AmbientEnvironment.cs
- RectangleHotSpot.cs
- HasCopySemanticsAttribute.cs
- FacetValueContainer.cs
- ResourceManager.cs
- RegularExpressionValidator.cs
- basemetadatamappingvisitor.cs
- XmlValidatingReader.cs
- ObjectDataSourceEventArgs.cs
- WebPartEditorOkVerb.cs
- WorkflowClientDeliverMessageWrapper.cs
- ScrollItemPatternIdentifiers.cs
- ControlBuilderAttribute.cs
- HttpWebResponse.cs
- HostUtils.cs
- XPathMultyIterator.cs
- NTAccount.cs
- TemplateControlBuildProvider.cs
- WebBrowser.cs
- Odbc32.cs
- MediaElementAutomationPeer.cs
- JsonGlobals.cs
- ValueQuery.cs
- XpsImageSerializationService.cs
- Permission.cs
- SupportsPreviewControlAttribute.cs
- GridEntry.cs
- RsaKeyIdentifierClause.cs
- ValidationHelper.cs
- PassportAuthentication.cs
- UInt64.cs
- TryExpression.cs
- Types.cs
- Helpers.cs
- ObjectQuery.cs
- ReadOnlyCollection.cs
- PageBuildProvider.cs
- CompareValidator.cs
- AssemblyHash.cs