GetPropertySigHelper() public static méthode

public static GetPropertySigHelper ( System mod, System returnType, System parameterTypes ) : System.Reflection.Emit.SignatureHelper
mod System
returnType System
parameterTypes System
Résultat System.Reflection.Emit.SignatureHelper
Exemple #1
0
        // Constructor.
        internal PropertyBuilder(TypeBuilder type, String name,
                                 PropertyAttributes attributes,
                                 Type returnType, Type[] parameterTypes)
        {
            // Validate the parameters.
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }
            else if (returnType == null)
            {
                throw new ArgumentNullException("returnType");
            }

            // Initialize this object's internal state.
            this.type       = type;
            this.returnType = returnType;
            this.getMethod  = null;
            this.setMethod  = null;

            // Register this item to be detached later.
            type.module.assembly.AddDetach(this);

            // Create the property signature.
            SignatureHelper helper =
                SignatureHelper.GetPropertySigHelper
                    (type.module, returnType, parameterTypes);

            // Create the property.
            lock (typeof(AssemblyBuilder))
            {
                this.privateData = ClrPropertyCreate
                                       (((IClrProgramItem)type).ClrHandle, name,
                                       attributes, helper.sig);
            }
        }