/// <summary> /// Inits the specified model. /// </summary> private void Init(DomainModel model, ModelElement rootElement, ModelElement currentElement, ICodeGenerationService codeGenerationService, Type extenderType) { this.codeGenerationService = codeGenerationService; this.model = model; this.rootElement = rootElement; this.currentElement = currentElement; this.baseDirectory = AppDomain.CurrentDomain.BaseDirectory; this.projectReferences = new List <Guid>(); AddStandardImports(); AddStandardAssemblyReferences(); standardAssemblyReferences.AddFromAssembly(Assembly.GetExecutingAssembly()); InitializeFromModel(model); InitializeFromElement(rootElement); InitializeModelElementExtender(currentElement, extenderType); TextTemplateHost.instance = this; this.generateOutput = true; }
public override void Initialize(ITextTemplatingEngineHost host) { templateEngineHost = host as TextTemplateHost; base.Initialize(host); }