Example #1
0
 public PipelineContext(DataResolver resolver, List <IBuildStep> pipeline, ResolvedData resolvedData, string path = "build")
 {
     path.RequireNonNull();
     this.DataResolver = resolver.RequireNonNull();
     this.Pipeline     = pipeline.RequireNonNull();
     this.ResolvedData = resolvedData.RequireNonNull();
     Path = new List <string>()
     {
         path
     };
     Step = 0;
 }
Example #2
0
        public string CompilePattern(ResolvedData input, string pattern)
        {
            input.RequireNonNull();

            if (pattern == null)
            {
                return(input.Name);
            }

            string[] tokens = input.Tokens;

            for (int i = tokens.Length - 1; i >= 0; i--)
            {
                string token = tokens[i];
                pattern = pattern.Replace("$" + (i), token);
            }

            Logger.Trace("Resolved file: {0}", pattern);
            return(pattern);
        }
Example #3
0
 /// <param name="resolvedData">The resolved data to add properties from.</param>
 /// <param name="magickImage">The magick image to add properties from.</param>
 /// <returns>
 /// A new interpolator branching from the original one with
 /// the former variable pool, plus the ones added from the parameters.
 /// </returns>
 public StringInterpolator Branch(ResolvedData resolvedData, IMagickImage magickImage)
 {
     return(new StringInterpolator(this, resolvedData, magickImage));
 }
Example #4
0
 public Failure(ResolvedData resolvedData, string message)
 {
     this.ResolvedData = resolvedData.RequireNonNull();
     this.Message      = message.RequireNonNull();
 }