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
- VBIdentifierName.cs
- PrePostDescendentsWalker.cs
- SimpleWorkerRequest.cs
- NonceCache.cs
- PageEventArgs.cs
- ToolStripCollectionEditor.cs
- LineMetrics.cs
- GenericTextProperties.cs
- XmlNamespaceManager.cs
- FilterQuery.cs
- EventsTab.cs
- SafeLocalAllocation.cs
- EntityDataSourceDataSelectionPanel.cs
- QueryContinueDragEvent.cs
- ConfigXmlCDataSection.cs
- EdmError.cs
- UpdatePanel.cs
- TextRangeBase.cs
- SvcMapFile.cs
- StreamSecurityUpgradeProvider.cs
- FileDialog.cs
- XmlUtil.cs
- HtmlTernaryTree.cs
- SafeEventLogReadHandle.cs
- WmfPlaceableFileHeader.cs
- AppDomainManager.cs
- PageCache.cs
- FileEnumerator.cs
- SafeNativeMethods.cs
- sqlpipe.cs
- BasicBrowserDialog.cs
- Literal.cs
- Icon.cs
- UDPClient.cs
- RuntimeResourceSet.cs
- SqlReferenceCollection.cs
- ReflectionPermission.cs
- ZoneLinkButton.cs
- OdbcRowUpdatingEvent.cs
- DesignTimeDataBinding.cs
- GroupBoxRenderer.cs
- DBCSCodePageEncoding.cs
- COM2ExtendedTypeConverter.cs
- CheckBoxPopupAdapter.cs
- UnknownBitmapDecoder.cs
- EventLogTraceListener.cs
- SqlCacheDependencyDatabaseCollection.cs
- ScrollViewerAutomationPeer.cs
- DesignerGenericWebPart.cs
- GridViewColumn.cs
- StatusBarItem.cs
- GifBitmapDecoder.cs
- MessageAction.cs
- SafeTokenHandle.cs
- FixedSOMPageElement.cs
- DataDocumentXPathNavigator.cs
- WebProxyScriptElement.cs
- ResourcePart.cs
- DbModificationCommandTree.cs
- HuffmanTree.cs
- _BaseOverlappedAsyncResult.cs
- WebFaultClientMessageInspector.cs
- SiteIdentityPermission.cs
- FilteredAttributeCollection.cs
- SqlDelegatedTransaction.cs
- DataSourceConverter.cs
- EventMappingSettingsCollection.cs
- RenamedEventArgs.cs
- PrintControllerWithStatusDialog.cs
- WebConfigurationManager.cs
- DataControlCommands.cs
- Button.cs
- SqlNotificationEventArgs.cs
- EntityDataSourceContextDisposingEventArgs.cs
- XslUrlEditor.cs
- CodeNamespaceCollection.cs
- QilReplaceVisitor.cs
- Trace.cs
- PieceDirectory.cs
- XmlWhitespace.cs
- ZoneMembershipCondition.cs
- PathFigureCollection.cs
- DoubleUtil.cs
- UnsafeNativeMethodsMilCoreApi.cs
- Missing.cs
- DynamicDataRouteHandler.cs
- ToolStripManager.cs
- SectionVisual.cs
- ValidationPropertyAttribute.cs
- Mapping.cs
- HWStack.cs
- Debug.cs
- HttpModuleActionCollection.cs
- XhtmlBasicPageAdapter.cs
- HttpProfileBase.cs
- MD5.cs
- HostingEnvironmentSection.cs
- DomainUpDown.cs
- ParallelSeparator.xaml.cs
- TransactionInformation.cs