public TypeContext BuildContext() { var typeContext = new TypeContext(); new ProjectTraverser(this.Project, (ns) => { new NamespaceTraverser(ns, (codeClass) => { CodeAttribute attribute; if (!TryGetAttribute(codeClass.Attributes, InterfaceAttributeFullName, out attribute)) return; var values = GetInterfaceValues(codeClass, attribute); var customType = new CustomType(values.Name, values.Module); typeContext.AddCustomType(codeClass.FullName, customType); }); }); return typeContext; }
public void AddCustomType(string typeFullName, CustomType customType) { customTypes.Add(typeFullName, customType); }
public bool TryGetCustomType(string typeFullName, out CustomType customType) { return customTypes.TryGetValue(typeFullName, out customType); }
public bool TryGetCustomType(string typeFullName, out CustomType customType) { return(customTypes.TryGetValue(typeFullName, out customType)); }