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
- Size3DValueSerializer.cs
- _NestedMultipleAsyncResult.cs
- Transform.cs
- EmbeddedMailObject.cs
- WebPartEditVerb.cs
- XMLSyntaxException.cs
- __ConsoleStream.cs
- Solver.cs
- OdbcConnectionOpen.cs
- CheckBoxRenderer.cs
- _UriSyntax.cs
- IHttpResponseInternal.cs
- EncoderFallback.cs
- XmlAutoDetectWriter.cs
- PngBitmapEncoder.cs
- UnorderedHashRepartitionStream.cs
- MenuItem.cs
- SequentialOutput.cs
- ListViewEditEventArgs.cs
- TrustManagerPromptUI.cs
- WebPartManagerInternals.cs
- CounterCreationDataCollection.cs
- Single.cs
- PartialClassGenerationTask.cs
- ElementNotEnabledException.cs
- WebBrowserProgressChangedEventHandler.cs
- FontTypeConverter.cs
- arabicshape.cs
- DataContract.cs
- ControlAdapter.cs
- IdleTimeoutMonitor.cs
- StringComparer.cs
- MasterPage.cs
- GradientBrush.cs
- Events.cs
- DataControlCommands.cs
- DefaultProxySection.cs
- CodeAttributeArgument.cs
- XPathPatternParser.cs
- UInt16Storage.cs
- IntMinMaxAggregationOperator.cs
- RequestSecurityTokenResponseCollection.cs
- CustomActivityDesigner.cs
- EventRouteFactory.cs
- WSDualHttpBinding.cs
- activationcontext.cs
- SByte.cs
- DrawToolTipEventArgs.cs
- VectorAnimationUsingKeyFrames.cs
- ParameterCollection.cs
- XhtmlConformanceSection.cs
- DataServiceQueryOfT.cs
- DoubleConverter.cs
- XDeferredAxisSource.cs
- Bind.cs
- ImageAttributes.cs
- SchemaCollectionPreprocessor.cs
- WebPartActionVerb.cs
- FullTextLine.cs
- TriState.cs
- TimeIntervalCollection.cs
- RegionIterator.cs
- FixUp.cs
- CollectionType.cs
- ParameterToken.cs
- AdornerDecorator.cs
- InvalidProgramException.cs
- MetadataCollection.cs
- SafeCloseHandleCritical.cs
- XmlSchemaExporter.cs
- DataGridViewSelectedColumnCollection.cs
- Expressions.cs
- CheckBoxField.cs
- ConditionCollection.cs
- PhysicalFontFamily.cs
- Ref.cs
- FloaterBaseParagraph.cs
- DurationConverter.cs
- SelfIssuedAuthProofToken.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- NonSerializedAttribute.cs
- RelativeSource.cs
- EmissiveMaterial.cs
- ToolStripDropDownItem.cs
- AvTraceFormat.cs
- ExceptionHandlerDesigner.cs
- ConstructorNeedsTagAttribute.cs
- MouseButton.cs
- Win32.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- SvcMapFile.cs
- ComboBoxDesigner.cs
- DataTrigger.cs
- DescendentsWalker.cs
- ToolStripPanelRow.cs
- FrameworkRichTextComposition.cs
- EmptyStringExpandableObjectConverter.cs
- XmlNodeChangedEventManager.cs
- XmlCollation.cs
- Journaling.cs