public PipelineTemplateEvaluator( ITraceWriter trace, TemplateSchema schema) { if (!String.Equals(schema.Version, PipelineTemplateConstants.Workflow_1_0, StringComparison.Ordinal)) { throw new NotSupportedException($"Unexpected template schema version '{schema.Version}'"); } m_trace = trace; m_schema = schema; }
public static PipelineTemplateEvaluator ToPipelineTemplateEvaluator(this IExecutionContext context, ObjectTemplating.ITraceWriter traceWriter = null) { if (traceWriter == null) { traceWriter = context.ToTemplateTraceWriter(); } var schema = PipelineTemplateSchemaFactory.GetSchema(); return(new PipelineTemplateEvaluator(traceWriter, schema, context.Global.FileTable)); }
public static PipelineTemplateEvaluator ToPipelineTemplateEvaluator(this IExecutionContext context, ObjectTemplating.ITraceWriter traceWriter = null) { if (traceWriter == null) { traceWriter = context.ToTemplateTraceWriter(); } var schema = PipelineTemplateSchemaFactory.GetSchema(); return(new PipelineTemplateEvaluator(traceWriter, schema, context.Global.FileTable) { MaxErrorMessageLength = int.MaxValue, // Don't truncate error messages otherwise we might not scrub secrets correctly }); }