public void AddEntry(CodeGeneratorEntry entry) { // todo1[ak] check args entry.CodeGenerator = this; _entries.Add(entry.HandleInterfaceType, entry); }
public ToolAction(CodeGenerator codeGenerator, CodeGeneratorEntry entry, Dictionary<string, string> props) { this.CodeGenerator = codeGenerator; _props = props; this.Entry = entry; this.Comment = _props.GetOrDefault("comment"); this.FileName = _props.GetOrDefault("file-name"); }
public GenerateServiceProxyToolAction(CodeGenerator codeGenerator, CodeGeneratorEntry entry, Dictionary<string, string> props) : base(codeGenerator, entry, props) { }
public GenerateHandleClassToolAction(CodeGenerator codeGenerator, CodeGeneratorEntry entry, Dictionary<string, string> props) : base(codeGenerator, entry, props) { }
private CodeGenerator CreateCodeGenerator(XmlElement domainEl) { string[] dlls = domainEl.GetMandatoryAttribute("dlls").Split(','); CodeGenerator gen = new CodeGenerator(); XmlElement[] entryEls = domainEl.GetChildElements("entry"); _namedEntries.Clear(); foreach (XmlElement entryEl in entryEls) { string typeName = entryEl.GetMandatoryAttribute("handle-interface"); string entryName = entryEl.GetMandatoryAttribute("entry-name"); Type handleInterfaceType = null; for (int i = 0; i < dlls.Length; i++) { string fullDllPath = Path.Combine(Directory.GetCurrentDirectory(), dlls[i]); Assembly asm = Assembly.LoadFile(fullDllPath); handleInterfaceType = asm.GetType(typeName); if (handleInterfaceType != null) { break; } } if (handleInterfaceType == null) { throw new ApplicationException(); // todo2[ak] } CodeGeneratorEntry entry = new CodeGeneratorEntry(handleInterfaceType); gen.AddEntry(entry); _namedEntries[entryName] = entry; } return gen; }