/// <summary> /// Creates the snapshot with the decision information /// </summary> /// <param name="ctx">Execution context to create snapshot for</param> /// <param name="decision">Decision executed just before snapshot</param> /// <param name="result">Result of the decision executed just before snapshot</param> internal void CreateSnapshot(DmnExecutionContext ctx, IDmnDecision decision, DmnDecisionResult result) { snapshots.Add(new DmnExecutionSnapshot(snapshots.Count, ctx, decision, result)); }
/// <summary> /// CTOR /// </summary> /// <param name="step">Sequence number of the execution step</param> /// <param name="ctx">Execution context to create snapshot for</param> /// <param name="decision">Decision executed just before snapshot</param> /// <param name="result">Result of the decision executed just before snapshot</param> internal DmnExecutionSnapshot(int step, DmnExecutionContext ctx, IDmnDecision decision, DmnDecisionResult result) : this(step, ctx) { Decision = decision; DecisionResult = result?.Clone(); }
/// <summary> /// Creates the snapshot without the decision information /// </summary> /// <param name="ctx">Execution context to create snapshot for</param> internal void CreateSnapshot(DmnExecutionContext ctx) { CreateSnapshot(ctx, null, null); }
/// <summary> /// CTOR /// </summary> /// <param name="step">Sequence number of the execution step</param> /// <param name="ctx">Execution context to create snapshot for</param> internal DmnExecutionSnapshot(int step, DmnExecutionContext ctx) { Step = step; Variables = ctx.Variables.Values.Select(v => v.Clone()).ToList(); }