Пример #1
0
        internal FluentPropertyBuilder(_IFluentTypeBuilder typeBuilder, string name, Type type, bool isStatic, bool respectVisibility)
        {
            GetMethod = typeBuilder.AddMethod(type, "get_" + name, isStatic, respectVisibility);
            SetMethod = typeBuilder.AddMethod(typeof(void), "set_" + name, isStatic, respectVisibility);

            Name         = name;
            PropertyType = type;
        }
Пример #2
0
        internal FluentEventBuilder(_IFluentTypeBuilder typeBuilder, string name, Type type, bool isStatic, bool respectVisibility)
        {
            TypeBuilder = typeBuilder;
            Name        = name;
            Type        = type;
            IsStatic    = isStatic;

            AddMethod    = typeBuilder.AddMethod(typeof(void), "add_" + name, isStatic, respectVisibility);
            RemoveMethod = typeBuilder.AddMethod(typeof(void), "remove_" + name, isStatic, respectVisibility);
        }