Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- LayoutManager.cs
- BitmapEffectrendercontext.cs
- SessionStateModule.cs
- DataServiceBehavior.cs
- XmlReader.cs
- hwndwrapper.cs
- regiisutil.cs
- FixedPageStructure.cs
- ContentValidator.cs
- TextContainerHelper.cs
- ScriptResourceHandler.cs
- RSAPKCS1KeyExchangeFormatter.cs
- InputScopeConverter.cs
- StringStorage.cs
- ByteStreamBufferedMessageData.cs
- Array.cs
- IItemContainerGenerator.cs
- Control.cs
- DurableServiceAttribute.cs
- SqlEnums.cs
- MessageProperties.cs
- GuidelineSet.cs
- HttpTransportSecurity.cs
- AdPostCacheSubstitution.cs
- ButtonBase.cs
- CompositeControl.cs
- PkcsMisc.cs
- Win32NamedPipes.cs
- PrintPreviewDialog.cs
- NotificationContext.cs
- MediaCommands.cs
- ColorConvertedBitmapExtension.cs
- MultiBindingExpression.cs
- DataGridViewRowsAddedEventArgs.cs
- UrlPath.cs
- BuilderInfo.cs
- XmlPreloadedResolver.cs
- ThreadPool.cs
- GlyphInfoList.cs
- OpenTypeLayoutCache.cs
- SelectionRangeConverter.cs
- IntegerValidatorAttribute.cs
- AsymmetricKeyExchangeDeformatter.cs
- LogReservationCollection.cs
- Control.cs
- BitmapInitialize.cs
- login.cs
- MetadataItemCollectionFactory.cs
- XmlHierarchicalDataSourceView.cs
- Visual.cs
- TextTreeRootNode.cs
- ViewGenResults.cs
- ContextTokenTypeConverter.cs
- Thickness.cs
- CommandExpr.cs
- ConsumerConnectionPointCollection.cs
- TypeHelpers.cs
- ScaleTransform3D.cs
- XmlTextReaderImplHelpers.cs
- XmlImplementation.cs
- TraceListeners.cs
- OdbcConnectionStringbuilder.cs
- OleAutBinder.cs
- XsltConvert.cs
- Constraint.cs
- CacheAxisQuery.cs
- SingleObjectCollection.cs
- EventRoute.cs
- PromptBuilder.cs
- StringConverter.cs
- ConnectionInterfaceCollection.cs
- DomNameTable.cs
- Literal.cs
- WorkflowViewService.cs
- Errors.cs
- KeyValuePair.cs
- MasterPageCodeDomTreeGenerator.cs
- ComPlusAuthorization.cs
- WindowsTitleBar.cs
- CodeSnippetCompileUnit.cs
- WebPart.cs
- XsltCompileContext.cs
- CharacterBuffer.cs
- XPathNavigatorReader.cs
- SQLBinaryStorage.cs
- versioninfo.cs
- QilGeneratorEnv.cs
- TextParaLineResult.cs
- PreviewKeyDownEventArgs.cs
- IisTraceWebEventProvider.cs
- ConfigurationValidatorAttribute.cs
- PatternMatcher.cs
- IPPacketInformation.cs
- ColumnResizeUndoUnit.cs
- FlowSwitchDesigner.xaml.cs
- IdentityNotMappedException.cs
- AutoGeneratedFieldProperties.cs
- DesignerActionVerbList.cs
- Regex.cs
- XmlSchemaSubstitutionGroup.cs