ActivityState(ActivityState parent, string flowId, Config Config, JObject input, Guid previousId, IDealer dealer = null) : base(parent) { this.Entity = new ActivityStateEntity(); this.Entity.Id = Guid.NewGuid(); this.Entity.PreviousId = previousId; if (parent == null) { this.Entity.FlowId = this.FlowId = flowId; this.Root = this; this.Entity.RootId = this.Entity.Id; this.Entity.ParentId = Guid.Empty; } else { this.Entity.FlowId = this.FlowId = parent.FlowId; this.Root = parent.Root; this.Parent = parent; this.Entity.RootId = this.Root.Id; this.Entity.ParentId = parent.Id; } this._Inputs = new ReadOnlyState(input); this.Entity.Inputs = this._Inputs.ToJSON(); this.Dealer = dealer ?? MakeDealer(); if (this.Dealer != null) { this.Entity.DealerId = this.Dealer.Id; this.Entity.DealerName = this.Dealer.Name; this.Entity.DealerInfo = this.Dealer.ToJSON(); } }
public RouteException(string message, string routeValue, ActivityState state, JToken nexts) : base(message) { this.ActivityState = state; this.Nexts = nexts; this.RouteValue = routeValue; }
public ActivityState(ActivityState parent, Config Config, JObject input, Guid previousId, IDealer dealer = null) : this(parent, null, Config, input, previousId, dealer) { }
//public readonly static IReadOnlyDictionary<string, string> NoResults = new Dictionary<string, string>(); public ActivityState(ActivityState parent, ActivityStateEntity entity) : base(entity.Variables == null?new JObject():JObject.Parse(entity.Variables), parent) { this.Entity = entity; this.Parent = parent; this.Root = parent == null ? this : parent.Root; }