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
- Timeline.cs
- ObjectListTitleAttribute.cs
- HttpApplicationStateBase.cs
- AuthStoreRoleProvider.cs
- DataColumnMappingCollection.cs
- CacheRequest.cs
- NamedPermissionSet.cs
- RemotingConfiguration.cs
- DependencyObjectProvider.cs
- COM2ExtendedTypeConverter.cs
- WindowInteropHelper.cs
- CollaborationHelperFunctions.cs
- IUnknownConstantAttribute.cs
- TreeSet.cs
- SymLanguageVendor.cs
- TabPage.cs
- FileBasedResourceGroveler.cs
- ProfileGroupSettingsCollection.cs
- HyperLinkField.cs
- jithelpers.cs
- SqlMethodAttribute.cs
- SerialPinChanges.cs
- PeerContact.cs
- EmptyCollection.cs
- FlowLayoutPanelDesigner.cs
- ClientSettingsStore.cs
- HttpModuleCollection.cs
- XamlFigureLengthSerializer.cs
- CapacityStreamGeometryContext.cs
- DataBoundLiteralControl.cs
- VolatileEnlistmentState.cs
- ManagementBaseObject.cs
- QueryParameter.cs
- SchemaCollectionPreprocessor.cs
- SizeAnimation.cs
- SupportingTokenSecurityTokenResolver.cs
- BinaryCommonClasses.cs
- Parallel.cs
- AlphabeticalEnumConverter.cs
- AssociationTypeEmitter.cs
- SecurityUtils.cs
- BinaryFormatter.cs
- SmtpReplyReader.cs
- BitmapEffect.cs
- ConfigurationLocation.cs
- ActivitiesCollection.cs
- PageAdapter.cs
- Random.cs
- TableStyle.cs
- graph.cs
- HwndHost.cs
- CssStyleCollection.cs
- XmlDataSourceView.cs
- input.cs
- SystemIPInterfaceStatistics.cs
- XmlIlGenerator.cs
- TextCompositionEventArgs.cs
- WebControlAdapter.cs
- Hex.cs
- WebPartsPersonalizationAuthorization.cs
- Attributes.cs
- TextTreeUndo.cs
- HostExecutionContextManager.cs
- IssuedTokenClientCredential.cs
- PropertyGrid.cs
- CounterNameConverter.cs
- DataGridViewCellStyleChangedEventArgs.cs
- Misc.cs
- MultiView.cs
- TimelineGroup.cs
- PropertyOrder.cs
- HashAlgorithm.cs
- CopyNodeSetAction.cs
- ButtonChrome.cs
- RadioButton.cs
- FrugalList.cs
- AdornerHitTestResult.cs
- EncoderBestFitFallback.cs
- DataSourceControlBuilder.cs
- PrintDialog.cs
- DataColumn.cs
- ValuePatternIdentifiers.cs
- EntityDataSourceContextCreatingEventArgs.cs
- ListBoxItem.cs
- autovalidator.cs
- Base64Decoder.cs
- XmlSchemaExternal.cs
- SqlUDTStorage.cs
- SQLDateTimeStorage.cs
- GZipDecoder.cs
- HttpException.cs
- AsyncResult.cs
- HealthMonitoringSectionHelper.cs
- XmlSchemaIdentityConstraint.cs
- SiteMapPath.cs
- MessageFormatterConverter.cs
- SqlRecordBuffer.cs
- UnicodeEncoding.cs
- WorkflowMessageEventArgs.cs
- ZipIOExtraField.cs