예제 #1
0
        static string ToNameAttribute(ApplicationAttribute self)
        {
            var type = self.provider as TypeDefinition;

            if (string.IsNullOrEmpty(self.Name) && type != null)
            {
                return(JniType.ToJniName(type).Replace('/', '.'));
            }

            return(self.Name);
        }
예제 #2
0
        public static ApplicationAttribute FromCustomAttributeProvider(ICustomAttributeProvider provider)
        {
            CustomAttribute attr = provider.GetCustomAttributes("Android.App.ApplicationAttribute")
                                   .SingleOrDefault();

            if (attr == null)
            {
                return(null);
            }
            ApplicationAttribute self = new ApplicationAttribute()
            {
                provider = provider,
            };

            self.specified = mapping.Load(self, attr);
            if (provider is TypeDefinition)
            {
                self.specified.Add("Name");
            }
            return(self);
        }
		static string ToNameAttribute (ApplicationAttribute self)
		{
			var type = self.provider as TypeDefinition;
			if (string.IsNullOrEmpty (self.Name) && type != null)
				return JniType.ToJniName (type).Replace ('/', '.');

			return self.Name;
		}
		public static ApplicationAttribute FromCustomAttributeProvider (ICustomAttributeProvider provider)
		{
			CustomAttribute attr = provider.GetCustomAttributes ("Android.App.ApplicationAttribute")
				.SingleOrDefault ();
			if (attr == null)
				return null;
			ApplicationAttribute self = new ApplicationAttribute () {
				provider  = provider,
			};
			self.specified = mapping.Load (self, attr);
			if (provider is TypeDefinition) {
				self.specified.Add ("Name");
			}
			return self;
		}