public static void GenerateScript(ProcessDef pd, TextWriter output)
 {
     
     var gd = new ProcessBooScriptGenerator(output);
     gd.GenerateScript(pd);
     output.Flush();
 }
 public void GenerateScript(ProcessDef pd)
 {
     WriteLine("#########");
     WriteLine("# this script is generated by an automatic tool. Do not modify it because your changes might be overwritten");
     WriteLine("#########");
     WriteCompositeTask(pd.Body);
 }
Exemplo n.º 3
0
 public virtual void Activate(ITaskExecutionContext ctx, ProcessDef processDef, IProcessScriptRuntime scriptRuntime)
 {
     Context = ctx;
     ProcessDefinition = processDef;
     TaskDefinition = processDef.GetRequiredTask(this.TaskId);
     ScriptRuntime = scriptRuntime;
     if (TaskDefinition == null) throw new Exception("Task not found in process definition: " + this.TaskId);
 }
 public static void GenerateScript(ProcessDef pd, string outputDirectory)
 {
     string fn = Path.Combine(outputDirectory, string.Format("{0}.{1}.boo", pd.ProcessName, pd.Version));
     using (var sw = new StreamWriter(fn, false, Encoding.UTF8))
     {
         GenerateScript(pd, sw);
     }
 }
Exemplo n.º 5
0
 public void Initialize(ProcessDef pd, BooProcessPackage pp)
 {
     ProcessDefinition = pd;
     Package = pp;
     Prepare();
 }
 protected void GenerateScript(ProcessDef pd)
 {
     GenerateScript(pd.Body);
 }
 public static string GenerateScriptString(ProcessDef pd)
 {
     var sw = new StringWriter();
     GenerateScript(pd, sw);
     return sw.ToString();
 }
Exemplo n.º 8
0
 internal BooProcessScriptRuntime(ProcessRuntimeDSLBase pd)
 {
     _pd = pd;
     _def = pd.ProcessDefinition;
 }
 public static void GenerateScript(ProcessDef pd, TextWriter output)
 {
     new BooProcessScriptGenerator(output).GenerateScript(pd);
     output.Flush();
 }
Exemplo n.º 10
0
 public static string Serialize(ProcessDef pd)
 {
     var sw = new StringWriter();
     Serialize(pd, sw);
     return sw.ToString();
 }
Exemplo n.º 11
0
 public static void Serialize(ProcessDef pd, TextWriter output)
 {
     _ser.Serialize(new JsonTextWriter(output), pd);
 }
Exemplo n.º 12
0
 public static void SerializeToFile(ProcessDef pd, string fileName)
 {
     using (var sw = new StreamWriter(fileName, false, Encoding.UTF8))
     {
         Serialize(pd, sw);
     }
 }
Exemplo n.º 13
0
 internal BooDslProcessRuntime(ProcessDefDSLBase pd)
 {
     _pd = pd;
     _def = pd.GetProcessDef();
 }