IKVM.Reflection.Type.GetConstructors C# (CSharp) Метод

GetConstructors() публичный Метод

public GetConstructors ( ) : IKVM.Reflection.ConstructorInfo[]
Результат IKVM.Reflection.ConstructorInfo[]
        public ConstructorInfo[] GetConstructors()
        {
            return GetConstructors(BindingFlags.Public | BindingFlags.Instance);
        }

Same methods

Type::GetConstructors ( BindingFlags bindingAttr ) : IKVM.Reflection.ConstructorInfo[]

Usage Example

Пример #1
0
        private CilType ProcessType(IKVM.Reflection.Type type)
        {
            var result = new CilType
            {
                Name           = type.Name,
                Namespace      = type.Namespace,
                BaseType       = type.BaseType != null ? type.BaseType.FullName : null,
                ReflectionType = type
            };
            var methods = new List <CilMethod>();

            result.Methods = methods;

            var flags = BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static;

            foreach (var method in type.GetMethods(flags))
            {
                if (method.DeclaringType == type)
                {
                    methods.Add(ProcessMethod(result, method));
                }
            }

            foreach (var ctor in type.GetConstructors(flags))
            {
                if (ctor.DeclaringType == type)
                {
                    methods.Add(ProcessMethod(result, ctor));
                }
            }

            return(result);
        }
All Usage Examples Of IKVM.Reflection.Type::GetConstructors