private void RegisterCallbacks([NotNull] T4ProtocolModel model, [NotNull] IT4ModelInteractionHelper helper) { model.RequestCompilation.Set(helper.Wrap(Compile, Converter.FatalError())); model.GetConfiguration.Set(helper.Wrap(CalculateConfiguration, new T4ConfigurationModel("", "", 0))); model.GetProjectDependencies.Set(helper.Wrap(CalculateProjectDependencies, new List <int>())); model.ExecutionSucceeded.Set(helper.Wrap(ExecutionSucceeded)); model.ExecutionFailed.Set(helper.Wrap(ExecutionFailed)); model.ExecutionAborted.Set(helper.Wrap(ExecutionFailed)); model.PrepareExecution.Set(helper.Wrap(PrepareExecution)); }
public T4ProtocolModelManager( [NotNull] ISolution solution, [NotNull] IT4TargetFileManager targetFileManager, [NotNull] IT4TemplateCompiler compiler, [NotNull] IT4BuildMessageConverter converter, [NotNull] IT4ModelInteractionHelper helper, [NotNull] IT4TemplateExecutionManager executionManager, [NotNull] ILogger logger, [NotNull] ProjectModelViewHost host, [NotNull] IT4ProjectReferenceResolver projectReferenceResolver ) { Solution = solution; TargetFileManager = targetFileManager; Compiler = compiler; Converter = converter; ExecutionManager = executionManager; Logger = logger; ProjectReferenceResolver = projectReferenceResolver; Host = host; var model = solution.GetProtocolSolution().GetT4ProtocolModel(); RegisterCallbacks(model, helper); }