private BookmarkResumptionRecord(BookmarkResumptionRecord record) : base(record)
 {
     this.BookmarkScope = record.BookmarkScope;
     this.Owner         = record.Owner;
     this.BookmarkName  = record.BookmarkName;
     this.Payload       = record.Payload;
 }
 private BookmarkResumptionRecord(BookmarkResumptionRecord record) : base(record)
 {
     this.BookmarkScope = record.BookmarkScope;
     this.Owner = record.Owner;
     this.BookmarkName = record.BookmarkName;
     this.Payload = record.Payload;
 }
 private void TrackBookmarkRecord(BookmarkResumptionRecord record)
 {
     if (EtwTrackingParticipantTrackRecords.BookmarkResumptionRecordIsEnabled(this.diagnosticTrace) && !EtwTrackingParticipantTrackRecords.BookmarkResumptionRecord(this.diagnosticTrace, record.InstanceId, record.RecordNumber, record.EventTime.ToFileTime(), record.BookmarkName, record.BookmarkScope, record.Owner.Name, record.Owner.Id, record.Owner.InstanceId, record.Owner.TypeName, record.HasAnnotations ? PrepareAnnotations(record.Annotations) : "<items />", (this.TrackingProfile == null) ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference))
     {
         if (EtwTrackingParticipantTrackRecords.BookmarkResumptionRecord(this.diagnosticTrace, record.InstanceId, record.RecordNumber, record.EventTime.ToFileTime(), record.BookmarkName, record.BookmarkScope, record.Owner.Name, record.Owner.Id, record.Owner.InstanceId, record.Owner.TypeName, "<items>...</items>", (this.TrackingProfile == null) ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference))
         {
             this.TraceTrackingRecordTruncated(record.RecordNumber);
         }
         else
         {
             this.TraceTrackingRecordDropped(record.RecordNumber);
         }
     }
 }
Пример #4
0
        private BookmarkResumptionQuery Match(BookmarkResumptionRecord bookmarkRecord)
        {
            BookmarkResumptionQuery trackingQuery = null;

            if (this.bookmarkSubscriptions != null)
            {
                if (bookmarkRecord.BookmarkName != null)
                {
                    this.bookmarkSubscriptions.TryGetValue(bookmarkRecord.BookmarkName, out trackingQuery);
                }
                if (trackingQuery == null)
                {
                    this.bookmarkSubscriptions.TryGetValue("*", out trackingQuery);
                }
            }
            return(trackingQuery);
        }
 private void TrackBookmarkRecord(BookmarkResumptionRecord record)
 {
     if (EtwTrackingParticipantTrackRecords.BookmarkResumptionRecordIsEnabled(this.diagnosticTrace) && !EtwTrackingParticipantTrackRecords.BookmarkResumptionRecord(this.diagnosticTrace, record.InstanceId, record.RecordNumber, record.EventTime.ToFileTime(), record.BookmarkName, record.BookmarkScope, record.Owner.Name, record.Owner.Id, record.Owner.InstanceId, record.Owner.TypeName, record.HasAnnotations ? PrepareAnnotations(record.Annotations) : "<items />", (this.TrackingProfile == null) ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference))
     {
         if (EtwTrackingParticipantTrackRecords.BookmarkResumptionRecord(this.diagnosticTrace, record.InstanceId, record.RecordNumber, record.EventTime.ToFileTime(), record.BookmarkName, record.BookmarkScope, record.Owner.Name, record.Owner.Id, record.Owner.InstanceId, record.Owner.TypeName, "<items>...</items>", (this.TrackingProfile == null) ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference))
         {
             this.TraceTrackingRecordTruncated(record.RecordNumber);
         }
         else
         {
             this.TraceTrackingRecordDropped(record.RecordNumber);
         }
     }
 }
 protected override void OnBookmarkResumption(BookmarkResumptionRecord record, TimeSpan timeout)
 {
     Log.InfoWrite("Tracking::BookmarkResumption - InstanceId:{0}, Bookmark Name:{1}, EventTime:{2}, Record#:{3}, Level:{4}, Payload Type:{5}", record.InstanceId, record.BookmarkName, record.EventTime, record.RecordNumber, record.Level, record.Payload.GetType().FullName);
 }
 void TrackBookmarkRecord(BookmarkResumptionRecord record)
 {
     if (EtwTrackingParticipantTrackRecords.BookmarkResumptionRecordIsEnabled(this.diagnosticTrace))
     {
         if (!EtwTrackingParticipantTrackRecords.BookmarkResumptionRecord(this.diagnosticTrace, record.EventTraceActivity, record.InstanceId, record.RecordNumber, record.EventTime.ToFileTime(),
             record.BookmarkName, record.BookmarkScope, record.Owner.Name, record.Owner.Id,
             record.Owner.InstanceId, record.Owner.TypeName,
             record.HasAnnotations ? PrepareAnnotations(record.Annotations) : emptyItemsTag,
             this.TrackingProfile == null ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference))
         {
             if (EtwTrackingParticipantTrackRecords.BookmarkResumptionRecord(this.diagnosticTrace, record.EventTraceActivity, record.InstanceId, record.RecordNumber, record.EventTime.ToFileTime(),
                 record.BookmarkName, record.BookmarkScope, record.Owner.Name, record.Owner.Id,
                 record.Owner.InstanceId, record.Owner.TypeName,
                 truncatedItemsTag, this.TrackingProfile == null ? string.Empty : this.TrackingProfile.Name, this.ApplicationReference))
             {
                 TraceTrackingRecordTruncated(record.RecordNumber);
             }
             else
             {
                 TraceTrackingRecordDropped(record.RecordNumber);
             }
         }
     }
 }
 private BookmarkResumptionQuery Match(BookmarkResumptionRecord bookmarkRecord)
 {
     BookmarkResumptionQuery query = null;
     if (this.bookmarkSubscriptions != null)
     {
         if (bookmarkRecord.BookmarkName != null)
         {
             this.bookmarkSubscriptions.TryGetValue(bookmarkRecord.BookmarkName, out query);
         }
         if (query == null)
         {
             this.bookmarkSubscriptions.TryGetValue("*", out query);
         }
     }
     return query;
 }
 protected virtual void OnBookmarkResumption(BookmarkResumptionRecord record, TimeSpan timeout) { }
 /// <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(BookmarkResumptionRecord record, TimeSpan timeout)
 {
     // Do nothing
 }