Ejemplo n.º 1
0
 public static WorkflowVariableBase ConvertContent(WorkflowVariable workflowVariable)
 {
     return((WorkflowVariableBase)JsonConvert.DeserializeObject(
                workflowVariable.Content,
                KeyBuilder.FromKey(workflowVariable.Type)
                ));
 }
Ejemplo n.º 2
0
        public void AddVariable(WorkflowVariableBase variable)
        {
            var type     = KeyBuilder.ToKey(variable.GetType());
            var existing = this.WorkflowVariables.FirstOrDefault(v => v.Type == type);

            if (existing != null)
            {
                existing.UpdateContent(variable);

                return;
            }

            this.WorkflowVariables.Add(WorkflowVariable.Create(this, variable));
        }