Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / System.Runtime.DurableInstancing / System / Runtime / DurableInstancing / InstanceOwnerException.cs / 1305376 / InstanceOwnerException.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 InstanceOwnerException : InstancePersistenceException { const string InstanceOwnerIdName = "instancePersistenceInstanceOwnerId"; public InstanceOwnerException() : base(SRCore.InstanceOwnerDefault) { } public InstanceOwnerException(string message) : base(message) { } public InstanceOwnerException(string message, Exception innerException) : base(message, innerException) { } public InstanceOwnerException(XName commandName, Guid instanceOwnerId) : this(commandName, instanceOwnerId, null) { } public InstanceOwnerException(XName commandName, Guid instanceOwnerId, Exception innerException) : this(commandName, instanceOwnerId, ToMessage(instanceOwnerId), innerException) { } public InstanceOwnerException(XName commandName, Guid instanceOwnerId, string message, Exception innerException) : base(commandName, message, innerException) { InstanceOwnerId = instanceOwnerId; } [SecurityCritical] protected InstanceOwnerException(SerializationInfo info, StreamingContext context) : base(info, context) { InstanceOwnerId = (Guid) info.GetValue(InstanceOwnerIdName, typeof(Guid)); } public Guid InstanceOwnerId { 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(InstanceOwnerIdName, InstanceOwnerId, typeof(Guid)); } static string ToMessage(Guid instanceOwnerId) { if (instanceOwnerId == Guid.Empty) { return SRCore.InstanceOwnerDefault; } return SRCore.InstanceOwnerSpecific(instanceOwnerId); } } } // 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
- SelectionProcessor.cs
- XmlSerializableReader.cs
- EntryPointNotFoundException.cs
- PlatformNotSupportedException.cs
- XmlTypeMapping.cs
- UInt64.cs
- Rectangle.cs
- XPathSingletonIterator.cs
- StatusCommandUI.cs
- QilScopedVisitor.cs
- TreeView.cs
- SqlCharStream.cs
- PreDigestedSignedInfo.cs
- EdmComplexTypeAttribute.cs
- HtmlShim.cs
- BitmapEffectInputData.cs
- TypeResolver.cs
- CredentialCache.cs
- ItemMap.cs
- AttachmentCollection.cs
- MaskedTextBoxDesignerActionList.cs
- ToolStripDropDownButton.cs
- Comparer.cs
- SafeIUnknown.cs
- Activation.cs
- UmAlQuraCalendar.cs
- XmlWriterTraceListener.cs
- RectangleGeometry.cs
- Vector3DValueSerializer.cs
- DateTimeFormatInfoScanner.cs
- EmptyStringExpandableObjectConverter.cs
- Content.cs
- XmlUnspecifiedAttribute.cs
- SystemInformation.cs
- QueryContinueDragEventArgs.cs
- ParseNumbers.cs
- MaskedTextBoxDesigner.cs
- ScriptReferenceEventArgs.cs
- FragmentQuery.cs
- ListDataHelper.cs
- ICollection.cs
- NameValueCache.cs
- SafeArrayTypeMismatchException.cs
- RegexRunner.cs
- LogReserveAndAppendState.cs
- HttpResponseInternalWrapper.cs
- ProviderConnectionPointCollection.cs
- Int32Rect.cs
- UriParserTemplates.cs
- QueryParameter.cs
- Configuration.cs
- Menu.cs
- Events.cs
- HelpEvent.cs
- SafeNativeMethods.cs
- XomlCompiler.cs
- DesignerVerb.cs
- WindowsScrollBarBits.cs
- DecimalAnimation.cs
- SingleObjectCollection.cs
- ComboBoxRenderer.cs
- OutKeywords.cs
- DataObjectSettingDataEventArgs.cs
- EmissiveMaterial.cs
- _SafeNetHandles.cs
- ThemeDirectoryCompiler.cs
- MSHTMLHost.cs
- Validator.cs
- ResXBuildProvider.cs
- SQLBinaryStorage.cs
- SafeWaitHandle.cs
- XPathAxisIterator.cs
- GeneralTransform3DTo2D.cs
- Clause.cs
- ComboBoxItem.cs
- SqlErrorCollection.cs
- RequestCache.cs
- MSAAWinEventWrap.cs
- ActivityBuilderHelper.cs
- SqlAggregateChecker.cs
- OleDbTransaction.cs
- RewritingSimplifier.cs
- CommonXSendMessage.cs
- FormViewModeEventArgs.cs
- PerformanceCounterManager.cs
- TypeExtension.cs
- BindingsCollection.cs
- ConfigXmlSignificantWhitespace.cs
- ChannelDispatcher.cs
- StatusBarPanelClickEvent.cs
- _NestedSingleAsyncResult.cs
- RegexWorker.cs
- MethodBuilder.cs
- Path.cs
- EventSetter.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- ComboBoxRenderer.cs
- LocalizationComments.cs
- ShellProvider.cs
- HttpCookieCollection.cs