IKVM.Internal.DotNetTypeWrapper.AttributeAnnotationTypeWrapper.LazyPublishMembers C# (CSharp) Method

LazyPublishMembers() protected method

protected LazyPublishMembers ( ) : void
return void
            protected override void LazyPublishMembers()
            {
                List<MethodWrapper> methods = new List<MethodWrapper>();
                ConstructorInfo defCtor;
                ConstructorInfo singleOneArgCtor;
                GetConstructors(attributeType, out defCtor, out singleOneArgCtor);
                if (singleOneArgCtor != null)
                {
                    methods.Add(new AttributeAnnotationMethodWrapper(this, "value", singleOneArgCtor.GetParameters()[0].ParameterType, defCtor != null));
                }
                foreach (PropertyInfo pi in attributeType.GetProperties(BindingFlags.Instance | BindingFlags.Public))
                {
                    if (pi.CanRead && pi.CanWrite && IsSupportedType(pi.PropertyType))
                    {
                        methods.Add(new AttributeAnnotationMethodWrapper(this, pi.Name, pi.PropertyType, true));
                    }
                }
                foreach (FieldInfo fi in attributeType.GetFields(BindingFlags.Public | BindingFlags.Instance))
                {
                    // TODO add other field validations to make sure it is appropriate
                    if (!fi.IsInitOnly && IsSupportedType(fi.FieldType))
                    {
                        methods.Add(new AttributeAnnotationMethodWrapper(this, fi.Name, fi.FieldType, true));
                    }
                }
                SetMethods(methods.ToArray());
                base.LazyPublishMembers();
            }