//-----------------------------------------------------------------------------------------------------------------------------------------------------
        public void StartThreadLog(ThreadTaskType taskType, ActivityLogNode rootActivity)
        {
            this.StartedThreadLogIndex = _logNodes.Count;
            this.StartedThreadTaskType = taskType;

            _logNodes.Add(rootActivity);
            rootActivity.AttachToThreadLog(_threadLog, parent: null);
        }
示例#2
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------
        public ThreadLog(
            IFramework framework, IClock clock, IThreadRegistry registry, IThreadLogAnchor anchor, ThreadTaskType taskType, ActivityLogNode rootActivity)
        {
            _registry = registry;
            _anchor = anchor;
            _taskType = taskType;
            _rootActivity = rootActivity;
            _currentActivity = rootActivity;
            _startedAtUtc = framework.UtcNow;
            _logId = framework.NewGuid();
            _correlationId = _logId;
            _node = framework.CurrentNode;
            _clock = clock;

            _rootActivity.AttachToThreadLog(this, parent: null);
            _registry.ThreadStarted(this);
        }
 //-----------------------------------------------------------------------------------------------------------------------------------------------------
 public void AppendActivityNode(ActivityLogNode activity)
 {
     _logNodes.Add(activity);
     activity.AttachToThreadLog(_threadLog, parent: null);
 }