Exemplo n.º 1
0
 private static object[] GetCustomAttributes(IAttributes attributes)
 {
     if (attributes == null)
         return new object[0];
     var list = new ArrayList<object>();
     foreach (var attr in attributes.Attributes())
     {
         list.Add(GetAttribute(attr));
     }
     return list.ToArray();
 }
Exemplo n.º 2
0
        private static object[] GetCustomAttributes(IAttributes attributes)
        {
            if (attributes == null)
            {
                return(new object[0]);
            }
            var list = new ArrayList <object>();

            foreach (var attr in attributes.Attributes())
            {
                list.Add(GetAttribute(attr));
            }
            return(list.ToArray());
        }
Exemplo n.º 3
0
        private static bool IsDefined(Type attributeType, IAttributes attributes)
        {
            if (attributes == null)
            {
                return(false);
            }

            foreach (var attr in attributes.Attributes())
            {
                if (attributeType.JavaIsAssignableFrom(attr.AttributeType()))
                {
                    return(true);
                }
            }
            return(false);
        }
Exemplo n.º 4
0
        private static object[] GetCustomAttributes(Type attributeType, IAttributes attributes)
        {
            if (attributes == null)
            {
                return(new object[0]);
            }
            var list = new ArrayList <object>();

            foreach (var attr in attributes.Attributes())
            {
                if (attributeType.JavaIsAssignableFrom(attr.AttributeType()))
                {
                    list.Add(GetAttribute(attr));
                }
            }
            return(list.ToArray());
        }
Exemplo n.º 5
0
        private static object[] GetCustomAttributes(Type attributeType, IAttributes attributes)
        {
            if (attributes == null)
                return new object[0];
            var list = new ArrayList<object>();

            foreach (var attr in attributes.Attributes())
            {
                if (attributeType.JavaIsAssignableFrom(attr.AttributeType()))
                {
                    list.Add(GetAttribute(attr));
                }
            }
            return list.ToArray();
        }
Exemplo n.º 6
0
        private static bool IsDefined(Type attributeType, IAttributes attributes)
        {
            if (attributes == null)
                return false;

            foreach (var attr in attributes.Attributes())
            {
                if (attributeType.JavaIsAssignableFrom(attr.AttributeType()))
                {
                    return true;
                }
            }
            return false;
        }