Example #1
0
 public FieldMetadata(FieldInfo fieldInfo)
 {
     this.Name           = fieldInfo.Name;
     this.Type           = TypeMetadata.EmitReference(fieldInfo.FieldType);
     this.StaticModifier = EmitStaticnessModifier(fieldInfo);
     this.AccessModifier = EmitAccessModifier(fieldInfo);
 }
Example #2
0
        private static TypeMetadata EmitReturnType(MethodBase method)
        {
            MethodInfo methodInfo = method as MethodInfo;

            if (methodInfo == null)
            {
                return(null);
            }
            return(TypeMetadata.EmitReference(methodInfo.ReturnType));
        }
Example #3
0
        public NamespaceMetadata(string name, IEnumerable <Type> types)
        {
            var tmp = types;

            Name = name;

            var help = from Type type in types
                       select TypeMetadata.EmitReference(type);

            Collection <TypeMetadata> col = new Collection <TypeMetadata>();

            foreach (var item in help)
            {
                col.Add(item);
            }

            Types = col;
        }
Example #4
0
 public AttributeMetadata(Attribute attr)
 {
     this.AttributeType = TypeMetadata.EmitReference(attr.GetType());
 }
Example #5
0
 private static ICollection <ParameterMetadata> EmitParameters(ParameterInfo[] parameters)
 {
     return((from ParameterInfo pInfo in parameters
             select new ParameterMetadata(pInfo.Name, TypeMetadata.EmitReference(pInfo.ParameterType))).ToList());
 }
Example #6
0
 public PropertyMetadata(PropertyInfo propertyInfo)
 {
     this.Name = propertyInfo.Name;
     this.Type = TypeMetadata.EmitReference(propertyInfo.PropertyType);
     //this.Type = new TypeMetadata(propertyInfo.PropertyType);
 }