public static void AddUsings(CodeElementsList<CodeElement> codeElements, UsingScope usingScope, ICompilation compilation) { var resolvedUsingScope = usingScope.Resolve(compilation); foreach (var ns in resolvedUsingScope.Usings) { codeElements.Add(new CodeImport(ns.FullName)); } }
protected CodeElementsList <CodeAttribute2> GetAttributes(IEntity entity) { var attributes = new CodeElementsList <CodeAttribute2>(); foreach (IAttribute attribute in entity.Attributes) { if (IsInFilter(attribute.Region)) { attributes.Add(new CodeAttribute2(context, attribute)); } } return(attributes); }
protected CodeElementsList<CodeAttribute2> GetAttributes(IEntity entity) { var attributes = new CodeElementsList<CodeAttribute2>(); foreach (IAttribute attribute in entity.Attributes) { if (IsInFilter(attribute.Region)) { attributes.Add(new CodeAttribute2(context, attribute)); } } return attributes; }
protected CodeElementsList<CodeAttribute2> GetAttributes(IEntityModel entityModel) { var list = new CodeElementsList<CodeAttribute2>(); var td = entityModel.Resolve(); if (td != null) { foreach (var attr in td.Attributes) { if (IsInFilter(attr.Region)) list.Add(new CodeAttribute2(context, attr)); } } return list; }