internal TrackingRecord Match(TrackingRecord record, bool shouldClone) { TrackingQuery resultQuery = null; if (record is WorkflowInstanceRecord) { resultQuery = Match((WorkflowInstanceRecord)record); } else if (record is ActivityStateRecord) { resultQuery = Match((ActivityStateRecord)record); } else if (record is BookmarkResumptionRecord) { resultQuery = Match((BookmarkResumptionRecord)record); } else if (record is CustomTrackingRecord) { resultQuery = Match((CustomTrackingRecord)record); } else if (record is ActivityScheduledRecord) { resultQuery = Match((ActivityScheduledRecord)record); } else if (record is CancelRequestedRecord) { resultQuery = Match((CancelRequestedRecord)record); } else if (record is FaultPropagationRecord) { resultQuery = Match((FaultPropagationRecord)record); } return(resultQuery == null ? null : PrepareRecord(record, resultQuery, shouldClone)); }
// Override this method to set the properties that a derived class may inherit calling the base method protected virtual void UpdateTrackingQuery(TrackingQuery trackingQuery) { foreach (AnnotationElement annotation in this.Annotations) { trackingQuery.QueryAnnotations.Add(new KeyValuePair<string, string>(annotation.Name, annotation.Value)); } }
private static TrackingRecord PrepareRecord(TrackingRecord record, TrackingQuery query, bool shouldClone) { TrackingRecord record2 = shouldClone ? record.Clone() : record; if (query.HasAnnotations) { record2.Annotations = new ReadOnlyDictionary <string, string>(query.QueryAnnotations, false); } if (query is ActivityStateQuery) { ExtractArguments((ActivityStateRecord)record2, (ActivityStateQuery)query); ExtractVariables((ActivityStateRecord)record2, (ActivityStateQuery)query); } return(record2); }
static TrackingRecord PrepareRecord(TrackingRecord record, TrackingQuery query, bool shouldClone) { TrackingRecord preparedRecord = shouldClone ? record.Clone() : record; if (query.HasAnnotations) { preparedRecord.Annotations = new ReadOnlyDictionaryInternal <string, string>(query.QueryAnnotations); } if (query is ActivityStateQuery) { ExtractArguments((ActivityStateRecord)preparedRecord, (ActivityStateQuery)query); ExtractVariables((ActivityStateRecord)preparedRecord, (ActivityStateQuery)query); } return(preparedRecord); }
private static TrackingRecord PrepareRecord(TrackingRecord record, TrackingQuery query, bool shouldClone) { TrackingRecord record2 = shouldClone ? record.Clone() : record; if (query.HasAnnotations) { record2.Annotations = new ReadOnlyDictionary<string, string>(query.QueryAnnotations, false); } if (query is ActivityStateQuery) { ExtractArguments((ActivityStateRecord) record2, (ActivityStateQuery) query); ExtractVariables((ActivityStateRecord) record2, (ActivityStateQuery) query); } return record2; }
static TrackingRecord PrepareRecord(TrackingRecord record, TrackingQuery query, bool shouldClone) { TrackingRecord preparedRecord = shouldClone ? record.Clone() : record; if (query.HasAnnotations) { preparedRecord.Annotations = new ReadOnlyDictionaryInternal<string, string>(query.QueryAnnotations); } if (query is ActivityStateQuery) { ExtractArguments((ActivityStateRecord)preparedRecord, (ActivityStateQuery)query); ExtractVariables((ActivityStateRecord)preparedRecord, (ActivityStateQuery)query); } return preparedRecord; }