Exemplo n.º 1
0
        public MethodGen Setter()
        {
            if (setter == null)
            {
                LockSignature();
                setter = new MethodGen(owner, "set_" + name, attrs | MethodAttributes.SpecialName, typeof(void), 0);
                setter.ImplementedInterface = interfaceType;
                setter.CopyParameters(indexParameters);
                setter.UncheckedParameter(type, "value");
                pb.SetSetMethod(setter.GetMethodBuilder());
            }

            return(setter);
        }
Exemplo n.º 2
0
        public MethodGen Setter()
        {
            if (_setter == null)
            {
                LockSignature();
                _setter = new MethodGen(_owner, "set_" + Name, _attrs | MethodAttributes.SpecialName, TypeMapper.MapType(typeof(void)), 0);
                _setter.ImplementedInterface = ImplementedInterface;
                _setter.CopyParameters(_indexParameters);
                _setter.UncheckedParameter(_type, "value");
                _pb.SetSetMethod(_setter.GetMethodBuilder());
            }

            return(_setter);
        }