Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / System.Activities / System / Activities / Tracking / WorkflowInstanceUnhandledExceptionRecord.cs / 1305376 / WorkflowInstanceUnhandledExceptionRecord.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 WorkflowInstanceUnhandledExceptionRecord : WorkflowInstanceRecord
{
public WorkflowInstanceUnhandledExceptionRecord(Guid instanceId, string activityDefinitionId, ActivityInfo faultSource, Exception exception)
: this(instanceId, 0, activityDefinitionId, faultSource, exception)
{
}
public WorkflowInstanceUnhandledExceptionRecord(Guid instanceId, long recordNumber, string activityDefinitionId, ActivityInfo faultSource, Exception exception)
: base(instanceId, recordNumber, activityDefinitionId, WorkflowInstanceStates.UnhandledException)
{
if (string.IsNullOrEmpty(activityDefinitionId))
{
throw FxTrace.Exception.ArgumentNullOrEmpty("activityDefinitionId");
}
if (exception == null)
{
throw FxTrace.Exception.ArgumentNull("exception");
}
if (faultSource == null)
{
throw FxTrace.Exception.ArgumentNull("faultSource");
}
this.FaultSource = faultSource;
this.UnhandledException = exception;
this.Level = TraceLevel.Error;
}
WorkflowInstanceUnhandledExceptionRecord(WorkflowInstanceUnhandledExceptionRecord record)
: base(record)
{
this.FaultSource = record.FaultSource;
this.UnhandledException = record.UnhandledException;
}
[DataMember]
public Exception UnhandledException
{
get;
private set;
}
[DataMember]
public ActivityInfo FaultSource
{
get;
private set;
}
protected internal override TrackingRecord Clone()
{
return new WorkflowInstanceUnhandledExceptionRecord(this);
}
public override string ToString()
{
return string.Format(CultureInfo.CurrentCulture,
"WorkflowInstanceUnhandledExceptionRecord {{ InstanceId = {0}, RecordNumber = {1}, EventTime = {2}, ActivityDefinitionId = {3}, FaultSource {{ {4} }}, UnhandledException = {5} }} ",
this.InstanceId,
this.RecordNumber,
this.EventTime,
this.ActivityDefinitionId,
this.FaultSource.ToString(),
this.UnhandledException);
}
}
}
// 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
- StandardTransformFactory.cs
- Wildcard.cs
- XmlILConstructAnalyzer.cs
- StreamGeometryContext.cs
- AuthenticationModuleElementCollection.cs
- XmlSigningNodeWriter.cs
- DefaultPrintController.cs
- ContextMenuStripGroup.cs
- MaterializeFromAtom.cs
- ContourSegment.cs
- XmlEncoding.cs
- ScaleTransform.cs
- AppSecurityManager.cs
- CallContext.cs
- IisTraceWebEventProvider.cs
- XsltQilFactory.cs
- QilList.cs
- SystemBrushes.cs
- XmlNullResolver.cs
- DataSvcMapFile.cs
- WorkflowMessageEventHandler.cs
- KnownTypeDataContractResolver.cs
- ExpressionsCollectionConverter.cs
- Tuple.cs
- UserControlBuildProvider.cs
- UpdateTranslator.cs
- ExpressionLexer.cs
- StringValidator.cs
- CallSite.cs
- MsmqIntegrationOutputChannel.cs
- SiteMapNodeItemEventArgs.cs
- BitSet.cs
- ListChangedEventArgs.cs
- FrugalList.cs
- SimpleLine.cs
- Size3DConverter.cs
- GeneratedView.cs
- DateTimeConstantAttribute.cs
- RenderData.cs
- TimeSpanSecondsConverter.cs
- Item.cs
- ContentType.cs
- SingleBodyParameterMessageFormatter.cs
- ADConnectionHelper.cs
- MenuAutoFormat.cs
- TabControlEvent.cs
- FreeFormDragDropManager.cs
- InternalCache.cs
- CharacterMetrics.cs
- GridViewHeaderRowPresenter.cs
- ReflectionServiceProvider.cs
- UriGenerator.cs
- ExceptionHandlersDesigner.cs
- GeneralTransform3DTo2DTo3D.cs
- DataBindingHandlerAttribute.cs
- TemplatedMailWebEventProvider.cs
- SqlEnums.cs
- DrawingCollection.cs
- BoundsDrawingContextWalker.cs
- ErrorStyle.cs
- ToolStripDesignerAvailabilityAttribute.cs
- AnnotationHelper.cs
- StringUtil.cs
- IImplicitResourceProvider.cs
- IISUnsafeMethods.cs
- Menu.cs
- HtmlInputText.cs
- cache.cs
- DictionaryKeyPropertyAttribute.cs
- ConfigurationValidatorBase.cs
- StylusPoint.cs
- DynamicObject.cs
- SortDescription.cs
- dataobject.cs
- ResourceContainer.cs
- DataRowCollection.cs
- ServiceEndpointCollection.cs
- ValidationRule.cs
- MediaTimeline.cs
- SharedRuntimeState.cs
- Crc32.cs
- RestClientProxyHandler.cs
- DataSet.cs
- DesignerSerializationVisibilityAttribute.cs
- SimpleTableProvider.cs
- ConvertersCollection.cs
- ThemeDictionaryExtension.cs
- tooltip.cs
- DataGridViewRow.cs
- EmptyEnumerator.cs
- PageThemeBuildProvider.cs
- AutomationAttributeInfo.cs
- Int16Storage.cs
- PersonalizationDictionary.cs
- RowUpdatingEventArgs.cs
- XmlSchemaSimpleTypeRestriction.cs
- PropertyGrid.cs
- CollectionChangedEventManager.cs
- SymbolEqualComparer.cs
- CodeLabeledStatement.cs