示例#1
0
 public UserTrackingRecord()
 {
     this._body              = new List <TrackingDataItem>();
     this._contextGuid       = Guid.Empty;
     this._parentContextGuid = Guid.Empty;
     this._eventDateTime     = DateTime.MinValue;
     this._eventOrder        = -1;
     this._annotations       = new TrackingAnnotationCollection();
 }
示例#2
0
 public WorkflowTrackingRecord(System.Workflow.Runtime.Tracking.TrackingWorkflowEvent trackingWorkflowEvent, DateTime eventDateTime, int eventOrder, System.EventArgs eventArgs)
 {
     this._eventDateTime = DateTime.MinValue;
     this._eventOrder    = -1;
     this._annotations   = new TrackingAnnotationCollection();
     this._event         = trackingWorkflowEvent;
     this._eventDateTime = eventDateTime;
     this._eventOrder    = eventOrder;
     this._args          = eventArgs;
 }
        internal static void GetProperty(string name, Activity activity, TrackingAnnotationCollection annotations, out TrackingDataItem item)
        {
            item = null;
            object tmp = PropertyHelper.GetProperty(name, activity);

            item = new TrackingDataItem();
            item.FieldName = name;
            item.Data = tmp;
            foreach (string s in annotations)
                item.Annotations.Add(s);
        }
示例#4
0
 public UserTrackingRecord(Type activityType, string qualifiedName, Guid contextGuid, Guid parentContextGuid, DateTime eventDateTime, int eventOrder, string userDataKey, object userData)
 {
     this._body              = new List <TrackingDataItem>();
     this._contextGuid       = Guid.Empty;
     this._parentContextGuid = Guid.Empty;
     this._eventDateTime     = DateTime.MinValue;
     this._eventOrder        = -1;
     this._annotations       = new TrackingAnnotationCollection();
     this._activityType      = activityType;
     this._qualifiedID       = qualifiedName;
     this._eventDateTime     = eventDateTime;
     this._contextGuid       = contextGuid;
     this._parentContextGuid = parentContextGuid;
     this._eventOrder        = eventOrder;
     this._userData          = userData;
     this._key = userDataKey;
 }
示例#5
0
 public ActivityTrackingRecord(Type activityType, string qualifiedName, Guid contextGuid, Guid parentContextGuid, ActivityExecutionStatus executionStatus, DateTime eventDateTime, int eventOrder, System.EventArgs eventArgs)
 {
     this._body              = new List <TrackingDataItem>();
     this._contextGuid       = Guid.Empty;
     this._parentContextGuid = Guid.Empty;
     this._eventDateTime     = DateTime.MinValue;
     this._eventOrder        = -1;
     this._annotations       = new TrackingAnnotationCollection();
     this._activityType      = activityType;
     this._qualifiedID       = qualifiedName;
     this._status            = executionStatus;
     this._eventDateTime     = eventDateTime;
     this._contextGuid       = contextGuid;
     this._parentContextGuid = parentContextGuid;
     this._eventOrder        = eventOrder;
     this._args              = eventArgs;
 }
 public ActivityDataTrackingExtract(string member)
 {
     this._annotations = new TrackingAnnotationCollection();
     this._name        = member;
 }
 public ActivityDataTrackingExtract()
 {
     this._annotations = new TrackingAnnotationCollection();
 }
示例#8
0
 public WorkflowTrackingRecord()
 {
     this._eventDateTime = DateTime.MinValue;
     this._eventOrder    = -1;
     this._annotations   = new TrackingAnnotationCollection();
 }
        internal static void GetAllMembers(Activity activity, IList<TrackingDataItem> items, TrackingAnnotationCollection annotations)
        {
            Type t = activity.GetType();
            //
            // Get all fields
            FieldInfo[] fields = t.GetFields(BindingFlags.Public |
                                                BindingFlags.NonPublic |
                                                BindingFlags.Instance |
                                                BindingFlags.Static |
                                                BindingFlags.GetField);

            foreach (FieldInfo f in fields)
            {
                if (!PropertyHelper.IsInternalVariable(f.Name))
                {
                    TrackingDataItem data = new TrackingDataItem();
                    data.FieldName = f.Name;
                    data.Data = GetRuntimeValue(f.GetValue(activity), activity);
                    foreach (string s in annotations)
                        data.Annotations.Add(s);
                    items.Add(data);
                }
            }
            //
            // Get all properties (except indexers)
            PropertyInfo[] properties = t.GetProperties(BindingFlags.Public |
                                                            BindingFlags.NonPublic |
                                                            BindingFlags.Instance |
                                                            BindingFlags.Static |
                                                            BindingFlags.GetProperty);

            foreach (PropertyInfo p in properties)
            {
                if (!IsInternalVariable(p.Name))
                {
                    //
                    // Skip indexers, since private data members
                    // are exposed the data is still available.
                    if (p.GetIndexParameters().Length > 0)
                        continue;

                    TrackingDataItem data = new TrackingDataItem();
                    data.FieldName = p.Name;
                    data.Data = GetRuntimeValue(p.GetValue(activity, null), activity);
                    foreach (string s in annotations)
                        data.Annotations.Add(s);
                    items.Add(data);
                }
            }
        }
 public WorkflowDataTrackingExtract()
 {
     this._annotations = new TrackingAnnotationCollection();
 }
示例#11
0
        internal static void GetAllMembers(Activity activity, IList <TrackingDataItem> items, TrackingAnnotationCollection annotations)
        {
            Type type = activity.GetType();

            foreach (FieldInfo info in type.GetFields(BindingFlags.GetField | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance))
            {
                if (!IsInternalVariable(info.Name))
                {
                    TrackingDataItem item = new TrackingDataItem {
                        FieldName = info.Name,
                        Data      = GetRuntimeValue(info.GetValue(activity), activity)
                    };
                    foreach (string str in annotations)
                    {
                        item.Annotations.Add(str);
                    }
                    items.Add(item);
                }
            }
            foreach (PropertyInfo info2 in type.GetProperties(BindingFlags.GetProperty | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance))
            {
                if (!IsInternalVariable(info2.Name) && (info2.GetIndexParameters().Length <= 0))
                {
                    TrackingDataItem item2 = new TrackingDataItem {
                        FieldName = info2.Name,
                        Data      = GetRuntimeValue(info2.GetValue(activity, null), activity)
                    };
                    foreach (string str2 in annotations)
                    {
                        item2.Annotations.Add(str2);
                    }
                    items.Add(item2);
                }
            }
        }