예제 #1
0
		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));
			}
		}
예제 #2
0
        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);
        }
예제 #3
0
 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;
 }
예제 #4
0
		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;
		}