public RDataContext(string id, RDataBaseContext parentContext, TContextData data, RDataContextStatus status, System.DateTime timeStarted, System.DateTime timeEnded)
        {
            Id     = id;
            Name   = GetType().Name;
            Parent = parentContext;
            Data   = data;

            Status      = status;
            TimeStarted = timeStarted;
            TimeEnded   = timeEnded;

            Children = new List <RDataBaseContext>();

            // Build the tracked fields dictionary
            CheckFieldsForTracking(Data, typeof(TContextData));
        }
 public RDataContext(TContextData data, RDataBaseContext parentContext = null) :
     this(System.Guid.NewGuid().ToString(), parentContext, data, RDataContextStatus.Started, System.DateTime.UtcNow, default(System.DateTime))
 {
 }
 public override void RemoveChild(RDataBaseContext context)
 {
     Children.Remove(context);
 }
 public override void AddChild(RDataBaseContext context)
 {
     Children.Add(context);
     context.Parent = this;
 }
 public virtual void RemoveChild(RDataBaseContext context)
 {
 }
 public virtual void AddChild(RDataBaseContext context)
 {
 }