Esempio n. 1
0
 public static MonoDevelop.Projects.Dom.Modifiers GetModifiers(Mono.Cecil.PropertyAttributes attr)
 {
     MonoDevelop.Projects.Dom.Modifiers result = MonoDevelop.Projects.Dom.Modifiers.None;
     if ((attr & PropertyAttributes.SpecialName) == PropertyAttributes.SpecialName)
     {
         result |= Modifiers.SpecialName;
     }
     return(result);
 }
        public static PropertyDefinition AddProperty(this TypeDefinition type, string name, PropertyAttributes attributes, TypeReference propertyType)
        {
            PropertyDefinition p = new PropertyDefinition(name, attributes, propertyType);

            type.Properties.Add(p);

            return(p);
        }
 public static PropertyDefinition AddProperty <T>(this TypeDefinition type, string name, PropertyAttributes attributes)
 {
     return(type.AddProperty(name, attributes, type.Module.GetTypeReference <T>()));
 }