예제 #1
0
 private VariableReplacer(ApplicationContext context, FeatureConfig feature, TaskConfig task, Dictionary<string, string> replacements)
 {
     mContext = context;
     mFeature = feature;
     mTask = task;
     mReplacements = replacements;
 }
 public TaskExecutionContext(RunContext context, FeatureConfig feature, TaskConfig task, VariableReplacer replacer)
 {
     mContext = context;
     mFeature = feature;
     mTask = task;
     mReplacer = replacer;
 }
예제 #3
0
        private static Dictionary<string, string> BuildInitialReplacements(ApplicationContext context, FeatureConfig feature, TaskConfig task)
        {
            var result = new Dictionary<string, string>();

            result["projectRoot"] = context.ProjectRoot;
            result["f:name"] = feature.Name;
            result["f:baseDirectory"] = feature.BaseDirectory;

            foreach (var kvp in context.UserConfig.EnvironmentVariables)
            {
                result[string.Format("e:{0}", kvp.Key)] = kvp.Value;
            }

            foreach (var kvp in task.Parameters)
            {
                result[kvp.Key] = kvp.Value;
            }

            return result;
        }
예제 #4
0
 public VariableReplacer(ApplicationContext context, FeatureConfig feature, TaskConfig task)
     : this(context, feature, task, BuildInitialReplacements(context, feature, task))
 {
 }