public bool Process(IStepArgs args) { string a = SNAP.Scripts.Util.Interpret(args.MyScript, A, args.MyResource); string b = SNAP.Scripts.Util.Interpret(args.MyScript, B, args.MyResource); return(a.Equals(b)); }
public void Execute(IStepArgs args) { foreach (IStep step in Steps) { step.Execute(args); } }
/// <summary> /// Executes the step for the specified resource. /// </summary> /// <param name="resource">The resource.</param> public void Execute(IStepArgs args) { string executionFolder = Scripts.Util.GetExecutionFolder(args.MyScript, args.MyResource); Controller.CurrentResources.LoadAdditionalResources( args.MyResource, Path.Combine(executionFolder, this.Filename) ); }
/// <summary> /// Gets the value. /// </summary> /// <value>The value.</value> public override string GetValue(IStepArgs args) { /// retrieve the path string result = Util.Interpret(args.MyScript, _value, args.MyResource); /// TODO: allow basing the path on some directory, resulting in /// a relative path instead of an absolute path /// we use unix-style paths, with a '/' separator instead of a '\' separator result = result.Replace('\\', '/'); /// we replace a space character ' ' with a space escape sequence "\ " result = result.Replace(" ", @"\ "); return(result); }
/// <summary> /// Executes the step for the specified resource. /// </summary> /// <param name="resource">The resource.</param> public void Execute(IStepArgs args) { Resource resource = args.MyResource; string fullFilename = System.IO.Path.Combine( Util.GetExecutionFolder(args.MyScript, resource), Filename); System.IO.Directory.GetParent(fullFilename).Create(); /// create the file using (StreamWriter writer = new StreamWriter(fullFilename)) { FieldExportStepArgs fieldExportArgs = new FieldExportStepArgs(writer, args); /// write all fields to file foreach (IStep step in this._fields) { step.Execute(fieldExportArgs); } writer.Flush(); } }
public bool Process(IStepArgs args) { string a = SNAP.Scripts.Util.Interpret(args.MyScript, A, args.MyResource); string b = SNAP.Scripts.Util.Interpret(args.MyScript, B, args.MyResource); return a.Equals(b); }
/// <summary> /// Executes the step for the specified resource. /// </summary> /// <param name="resource">The resource.</param> public void Execute(IStepArgs args) { Util.Run(this, args.MyResource, args.MyScript); }
/// <summary> /// Gets the value. /// </summary> /// <value>The value.</value> public override string GetValue(IStepArgs args) { return(Util.Interpret(args.MyScript, _value, args.MyResource)); }
public FieldExportStepArgs(StreamWriter writer, IStepArgs args) { _writer = writer; InnerArgs = args; }
void IStep.Execute(IStepArgs args) { Execute((IFieldExportStepArgs)args); }
public abstract string GetValue(IStepArgs resource);