Example #1
0
        public static ContentProviderAttribute FromTypeDefinition(TypeDefinition type)
        {
            CustomAttribute attr = type.GetCustomAttributes("Android.Content.ContentProviderAttribute")
                                   .SingleOrDefault();

            if (attr == null)
            {
                return(null);
            }
            var self = new ContentProviderAttribute(ToStringArray(attr.ConstructorArguments [0].Value));

            self.specified = mapping.Load(self, attr);
            self.specified.Add("Authorities");
            return(self);
        }
 public static ContentProviderAttribute FromTypeDefinition(TypeDefinition type)
 {
     CustomAttribute attr = type.GetCustomAttributes ("Android.Content.ContentProviderAttribute")
         .SingleOrDefault ();
     if (attr == null)
         return null;
     var self = new ContentProviderAttribute (ToStringArray (attr.ConstructorArguments [0].Value));
     self.specified = mapping.Load (self, attr);
     self.specified.Add ("Authorities");
     return self;
 }