Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / System.Activities / System / Activities / Tracking / FaultPropagationRecord.cs / 1305376 / FaultPropagationRecord.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.Activities.Tracking { using System; using System.Runtime.Serialization; using System.Runtime; using System.Diagnostics; using System.Globalization; [Fx.Tag.XamlVisible(false)] [DataContract] public sealed class FaultPropagationRecord : TrackingRecord { internal FaultPropagationRecord(Guid instanceId, ActivityInstance source, ActivityInstance faultHandler, bool isFaultSource, Exception fault) : base(instanceId) { Fx.Assert(source != null, "Fault source cannot be null"); this.FaultSource = new ActivityInfo(source); if (faultHandler != null) { this.FaultHandler = new ActivityInfo(faultHandler); } this.IsFaultSource = isFaultSource; this.Fault = fault; this.Level = TraceLevel.Warning; } //parameter faultHandler is null if there are no handlers public FaultPropagationRecord( Guid instanceId, long recordNumber, ActivityInfo faultSource, ActivityInfo faultHandler, bool isFaultSource, Exception fault) : base(instanceId, recordNumber) { if (faultSource == null) { throw FxTrace.Exception.ArgumentNullOrEmpty("faultSource"); } this.FaultSource = faultSource; this.FaultHandler = faultHandler; this.IsFaultSource = isFaultSource; this.Fault = fault; this.Level = TraceLevel.Warning; } FaultPropagationRecord(FaultPropagationRecord record) :base(record) { this.FaultSource = record.FaultSource; this.FaultHandler = record.FaultHandler; this.Fault = record.Fault; this.IsFaultSource = record.IsFaultSource; } [DataMember] public ActivityInfo FaultSource { get; private set; } [DataMember] public ActivityInfo FaultHandler { get; private set; } [DataMember(EmitDefaultValue = false)] public bool IsFaultSource { get; private set; } [DataMember] public Exception Fault { get; private set; } protected internal override TrackingRecord Clone() { return new FaultPropagationRecord(this); } public override string ToString() { return string.Format(CultureInfo.CurrentCulture, "FaultPropagationRecord {{ {0}, FaultSource {{ {1} }}, FaultHandler {{ {2} }}, IsFaultSource = {3} }}", base.ToString(), this.FaultSource.ToString(), this.FaultHandler != null ? this.FaultHandler.ToString() : "", this.IsFaultSource); } } } // 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
- SqlProviderManifest.cs
- ToolboxBitmapAttribute.cs
- ASCIIEncoding.cs
- AutoResizedEvent.cs
- _AuthenticationState.cs
- LateBoundBitmapDecoder.cs
- WebServiceClientProxyGenerator.cs
- ReversePositionQuery.cs
- GridViewUpdatedEventArgs.cs
- XPathMessageFilterTable.cs
- CatalogZoneDesigner.cs
- PageTheme.cs
- TemplateColumn.cs
- XmlDownloadManager.cs
- TypedReference.cs
- SystemIPInterfaceStatistics.cs
- NonSerializedAttribute.cs
- AbstractSvcMapFileLoader.cs
- InvalidCastException.cs
- HttpModuleCollection.cs
- SerializationUtilities.cs
- ProcessHostMapPath.cs
- IxmlLineInfo.cs
- MsmqPoisonMessageException.cs
- IISMapPath.cs
- XmlQueryRuntime.cs
- ControlBuilderAttribute.cs
- WebPartVerbsEventArgs.cs
- MorphHelper.cs
- WebPartUtil.cs
- EncoderExceptionFallback.cs
- RangeContentEnumerator.cs
- CommandPlan.cs
- WebUtil.cs
- GeometryGroup.cs
- HttpListenerResponse.cs
- BitmapInitialize.cs
- FixedSOMFixedBlock.cs
- EntityContainerEntitySet.cs
- AudioDeviceOut.cs
- GlobalItem.cs
- SelectionItemPattern.cs
- MultipartIdentifier.cs
- VisualTreeHelper.cs
- IndexedWhereQueryOperator.cs
- InternalControlCollection.cs
- RawUIStateInputReport.cs
- XmlUnspecifiedAttribute.cs
- WeakEventManager.cs
- CodeMethodInvokeExpression.cs
- SchemaMerger.cs
- Win32.cs
- RequestQueryParser.cs
- OutputCacheProfileCollection.cs
- UnsafeNativeMethods.cs
- SafeEventLogReadHandle.cs
- ConfigurationManagerInternalFactory.cs
- ScrollContentPresenter.cs
- MessageFilterTable.cs
- XmlCollation.cs
- FileSystemInfo.cs
- ContextQuery.cs
- Matrix.cs
- SingleConverter.cs
- TagMapCollection.cs
- Util.cs
- Avt.cs
- VirtualPathProvider.cs
- DbConnectionOptions.cs
- HashAlgorithm.cs
- OleAutBinder.cs
- sqlstateclientmanager.cs
- UriExt.cs
- BaseResourcesBuildProvider.cs
- SortDescriptionCollection.cs
- TableDetailsCollection.cs
- DomNameTable.cs
- NamespaceCollection.cs
- MD5CryptoServiceProvider.cs
- ExpressionPrefixAttribute.cs
- LoginUtil.cs
- XmlWrappingWriter.cs
- Light.cs
- DataGridPagerStyle.cs
- COM2IDispatchConverter.cs
- OpenFileDialog.cs
- ExtensionWindow.cs
- TrimSurroundingWhitespaceAttribute.cs
- DecimalConstantAttribute.cs
- HtmlObjectListAdapter.cs
- TreeWalkHelper.cs
- DispatcherSynchronizationContext.cs
- InputDevice.cs
- ParentUndoUnit.cs
- Imaging.cs
- SQLString.cs
- TemplateControlCodeDomTreeGenerator.cs
- PropertyPathConverter.cs
- RouteValueDictionary.cs
- FirstMatchCodeGroup.cs