private void TrackWorkflowRecord(WorkflowInstanceRecord record) { if (record is WorkflowInstanceUnhandledExceptionRecord) { if (EtwTrackingParticipantTrackRecords.WorkflowInstanceUnhandledExceptionRecordIsEnabled(this.diagnosticTrace)) { WorkflowInstanceUnhandledExceptionRecord record2 = record as WorkflowInstanceUnhandledExceptionRecord; if (!EtwTrackingParticipantTrackRecords.WorkflowInstanceUnhandledExceptionRecord(this.diagnosticTrace, record2.InstanceId, record2.RecordNumber, record2.EventTime.ToFileTime(), record2.ActivityDefinitionId, record2.FaultSource.Name, record2.FaultSource.Id, record2.FaultSource.InstanceId, record2.FaultSource.TypeName, (record2.UnhandledException == null) ? string.Empty : record2.UnhandledException.ToString(), record2.HasAnnotations ? PrepareAnnotations(record2.Annotations) : "<items />", (this.TrackingProfile == null) ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference)) { if (EtwTrackingParticipantTrackRecords.WorkflowInstanceUnhandledExceptionRecord(this.diagnosticTrace, record2.InstanceId, record2.RecordNumber, record2.EventTime.ToFileTime(), record2.ActivityDefinitionId, record2.FaultSource.Name, record2.FaultSource.Id, record2.FaultSource.InstanceId, record2.FaultSource.TypeName, (record2.UnhandledException == null) ? string.Empty : record2.UnhandledException.ToString(), "<items>...</items>", (this.TrackingProfile == null) ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference)) { this.TraceTrackingRecordTruncated(record2.RecordNumber); } else { this.TraceTrackingRecordDropped(record2.RecordNumber); } } } } else if (record is WorkflowInstanceAbortedRecord) { if (EtwTrackingParticipantTrackRecords.WorkflowInstanceAbortedRecordIsEnabled(this.diagnosticTrace)) { WorkflowInstanceAbortedRecord record3 = record as WorkflowInstanceAbortedRecord; if (!EtwTrackingParticipantTrackRecords.WorkflowInstanceAbortedRecord(this.diagnosticTrace, record3.InstanceId, record3.RecordNumber, record3.EventTime.ToFileTime(), record3.ActivityDefinitionId, record3.Reason, record3.HasAnnotations ? PrepareAnnotations(record3.Annotations) : "<items />", (this.TrackingProfile == null) ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference)) { if (EtwTrackingParticipantTrackRecords.WorkflowInstanceAbortedRecord(this.diagnosticTrace, record3.InstanceId, record3.RecordNumber, record3.EventTime.ToFileTime(), record3.ActivityDefinitionId, record3.Reason, "<items>...</items>", (this.TrackingProfile == null) ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference)) { this.TraceTrackingRecordTruncated(record3.RecordNumber); } else { this.TraceTrackingRecordDropped(record3.RecordNumber); } } } } else if (record is WorkflowInstanceSuspendedRecord) { if (EtwTrackingParticipantTrackRecords.WorkflowInstanceSuspendedRecordIsEnabled(this.diagnosticTrace)) { WorkflowInstanceSuspendedRecord record4 = record as WorkflowInstanceSuspendedRecord; if (!EtwTrackingParticipantTrackRecords.WorkflowInstanceSuspendedRecord(this.diagnosticTrace, record4.InstanceId, record4.RecordNumber, record4.EventTime.ToFileTime(), record4.ActivityDefinitionId, record4.Reason, record4.HasAnnotations ? PrepareAnnotations(record4.Annotations) : "<items />", (this.TrackingProfile == null) ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference)) { if (EtwTrackingParticipantTrackRecords.WorkflowInstanceSuspendedRecord(this.diagnosticTrace, record4.InstanceId, record4.RecordNumber, record4.EventTime.ToFileTime(), record4.ActivityDefinitionId, record4.Reason, "<items>...</items>", (this.TrackingProfile == null) ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference)) { this.TraceTrackingRecordTruncated(record4.RecordNumber); } else { this.TraceTrackingRecordDropped(record4.RecordNumber); } } } } else if (record is WorkflowInstanceTerminatedRecord) { if (EtwTrackingParticipantTrackRecords.WorkflowInstanceTerminatedRecordIsEnabled(this.diagnosticTrace)) { WorkflowInstanceTerminatedRecord record5 = record as WorkflowInstanceTerminatedRecord; if (!EtwTrackingParticipantTrackRecords.WorkflowInstanceTerminatedRecord(this.diagnosticTrace, record5.InstanceId, record5.RecordNumber, record5.EventTime.ToFileTime(), record5.ActivityDefinitionId, record5.Reason, record5.HasAnnotations ? PrepareAnnotations(record5.Annotations) : "<items />", (this.TrackingProfile == null) ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference)) { if (EtwTrackingParticipantTrackRecords.WorkflowInstanceTerminatedRecord(this.diagnosticTrace, record5.InstanceId, record5.RecordNumber, record5.EventTime.ToFileTime(), record5.ActivityDefinitionId, record5.Reason, "<items>...</items>", (this.TrackingProfile == null) ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference)) { this.TraceTrackingRecordTruncated(record5.RecordNumber); } else { this.TraceTrackingRecordDropped(record5.RecordNumber); } } } } else if (EtwTrackingParticipantTrackRecords.WorkflowInstanceRecordIsEnabled(this.diagnosticTrace) && !EtwTrackingParticipantTrackRecords.WorkflowInstanceRecord(this.diagnosticTrace, record.InstanceId, record.RecordNumber, record.EventTime.ToFileTime(), record.ActivityDefinitionId, record.State, record.HasAnnotations ? PrepareAnnotations(record.Annotations) : "<items />", (this.TrackingProfile == null) ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference)) { if (EtwTrackingParticipantTrackRecords.WorkflowInstanceRecord(this.diagnosticTrace, record.InstanceId, record.RecordNumber, record.EventTime.ToFileTime(), record.ActivityDefinitionId, record.State, "<items>...</items>", (this.TrackingProfile == null) ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference)) { this.TraceTrackingRecordTruncated(record.RecordNumber); } else { this.TraceTrackingRecordDropped(record.RecordNumber); } } }
private WorkflowInstanceUnhandledExceptionRecord(WorkflowInstanceUnhandledExceptionRecord record) : base(record) { this.FaultSource = record.FaultSource; this.UnhandledException = record.UnhandledException; }
protected virtual void OnWorkflowInstanceUnhandledException(WorkflowInstanceUnhandledExceptionRecord record, TimeSpan timeout) { }
WorkflowInstanceUnhandledExceptionRecord(WorkflowInstanceUnhandledExceptionRecord record) : base(record) { this.FaultSource = record.FaultSource; this.UnhandledException = record.UnhandledException; }
/// <summary> /// When implemented in a derived class, used to synchronously process the tracking record. /// </summary> /// <param name="record"> /// The generated tracking record. /// </param> /// <param name="timeout"> /// The time period after which the provider aborts the attempt. /// </param> protected virtual void Track(WorkflowInstanceUnhandledExceptionRecord record, TimeSpan timeout) { // Do nothing }