コード例 #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);
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 public static PropertyDefinition AddProperty <T>(this TypeDefinition type, string name, PropertyAttributes attributes)
 {
     return(type.AddProperty(name, attributes, type.Module.GetTypeReference <T>()));
 }