protected virtual string GetStoreState(WorkflowInstance instance) { return(JsonHelper.Serialize( new WorkflowStoreState { State = instance.TryGetState(), Arguments = instance.Arguments.ToDictionary(a => a.Name, a => a.Value) })); }
protected WorkflowResponseContract(WorkflowInstance instance) : this(instance.Id, instance.ParentId, instance.WorkflowType.Name) { WorkflowState = instance.TryGetState(); foreach (var arg in instance.Arguments) { Arguments.Add(ArgumentContract.Create(arg.Name, arg.Value)); } }