Пример #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;
 }
Пример #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);
        }
Пример #3
0
 public Failure(ResolvedData resolvedData, string message)
 {
     this.ResolvedData = resolvedData.RequireNonNull();
     this.Message      = message.RequireNonNull();
 }