public void addPlugin(IGeneratorPlugin plugin) { this.plugins.push(plugin); // TODO: hack? if (plugin is TemplateFileGeneratorPlugin) { } }
public void addPlugin(IGeneratorPlugin plugin) { this.plugins.push(plugin); if (plugin is TemplateFileGeneratorPlugin templFileGenPlug) { templFileGenPlug.modelGlobals.set("escape", new LambdaValue(args => new StringValue(this.escape(args.get(0))))); templFileGenPlug.modelGlobals.set("escapeBackslash", new LambdaValue(args => new StringValue(this.escapeBackslash(args.get(0))))); } }
/// <summary> /// Start processing the active graph /// </summary> public static void Start() { if (inputs.Length == 0) { Console.WriteLine("No start locations could be found"); return; } else { Console.WriteLine("Starting Execution Preparation"); } Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); //gather static data foreach (KeyValuePair <int, DependentNode> pair in dependencyGraph) { if (PluginStore.isGeneratorPlugin(pair.Value.Type)) { IGeneratorPlugin plugin = PluginStore.getPlugin(pair.Value.Type) as IGeneratorPlugin; staticData.StoreResults(plugin.StaticData(pair.Value.Value), pair.Key, true); } } PipelineExecutor[] pipes = BuildPipelines(); stopwatch.Stop(); Console.WriteLine("Preparation duration: " + stopwatch.Elapsed + " ms"); //start the first wave of dependencies Console.WriteLine("Starting Processing"); Console.WriteLine(""); for (int p = 0; p < pipes.Length; p++) { for (int i = 0; i < inputs.Length; i++) { pipes[p].TriggerDependencies(inputs[i].nodeId); } } }
public TestDefaultDependencyProvider(IGeneratorPlugin pluginToReturn) { this.pluginToReturn = pluginToReturn; }