// Constructs a PropertyBuilder. // internal PropertyBuilder( ModuleBuilder mod, // the module containing this PropertyBuilder String name, // property name SignatureHelper sig, // property signature descriptor info PropertyAttributes attr, // property attribute such as DefaultProperty, Bindable, DisplayBind, etc Type returnType, // return type of the property. PropertyToken prToken, // the metadata token for this property TypeBuilder containingType) // the containing type { if (name == null) throw new ArgumentNullException("name"); if (name.Length == 0) throw new ArgumentException(Environment.GetResourceString("Argument_EmptyName"), "name"); if (name[0] == '\0') throw new ArgumentException(Environment.GetResourceString("Argument_IllegalName"), "name"); Contract.EndContractBlock(); m_name = name; m_moduleBuilder = mod; m_signature = sig; m_attributes = attr; m_returnType = returnType; m_prToken = prToken; m_tkProperty = prToken.Token; m_containingType = containingType; }
[System.Security.SecurityCritical] // auto-generated private PropertyBuilder DefinePropertyNoLock(String name, PropertyAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] returnTypeRequiredCustomModifiers, Type[] returnTypeOptionalCustomModifiers, Type[] parameterTypes, Type[][] parameterTypeRequiredCustomModifiers, Type[][] parameterTypeOptionalCustomModifiers) { if (name == null) throw new ArgumentNullException("name"); if (name.Length == 0) throw new ArgumentException(Environment.GetResourceString("Argument_EmptyName"), "name"); Contract.EndContractBlock(); CheckContext(returnType); CheckContext(returnTypeRequiredCustomModifiers, returnTypeOptionalCustomModifiers, parameterTypes); CheckContext(parameterTypeRequiredCustomModifiers); CheckContext(parameterTypeOptionalCustomModifiers); SignatureHelper sigHelper; int sigLength; byte[] sigBytes; ThrowIfCreated(); // get the signature in SignatureHelper form sigHelper = SignatureHelper.GetPropertySigHelper( m_module, callingConvention, returnType, returnTypeRequiredCustomModifiers, returnTypeOptionalCustomModifiers, parameterTypes, parameterTypeRequiredCustomModifiers, parameterTypeOptionalCustomModifiers); // get the signature in byte form sigBytes = sigHelper.InternalGetSignature(out sigLength); PropertyToken prToken = new PropertyToken(DefineProperty( m_module.GetNativeHandle(), m_tdType.Token, name, attributes, sigBytes, sigLength)); // create the property builder now. return new PropertyBuilder( m_module, name, sigHelper, attributes, returnType, prToken, this); }
public bool Equals(PropertyToken obj) { return(this.tokValue == obj.tokValue); }
public bool Equals(PropertyToken obj) { return obj.m_property == m_property; }
/// <summary>Indicates whether the current instance is equal to the specified <see cref="T:System.Reflection.Emit.PropertyToken" />.</summary> /// <param name="obj">The <see cref="T:System.Reflection.Emit.PropertyToken" /> to compare to the current instance.</param> /// <returns> /// <see langword="true" /> if the value of <paramref name="obj" /> is equal to the value of the current instance; otherwise, <see langword="false" />.</returns> // Token: 0x06004BD7 RID: 19415 RVA: 0x0011291D File Offset: 0x00110B1D public bool Equals(PropertyToken obj) { return(obj.m_property == this.m_property); }
/// <summary>Indicates whether the current instance is equal to the specified <see cref="T:System.Reflection.Emit.PropertyToken" />.</summary><returns>true if the value of <paramref name="obj" /> is equal to the value of the current instance; otherwise, false.</returns><param name="obj">The <see cref="T:System.Reflection.Emit.PropertyToken" /> to compare to the current instance.</param> public bool Equals(PropertyToken obj) { throw new NotImplementedException(); }
public bool Equals (PropertyToken obj) { return (this.tokValue == obj.tokValue); }
static PropertyToken() { Empty = new PropertyToken(); }
public bool Equals(PropertyToken obj) { return default(bool); }
public bool Equals(PropertyToken obj) { return(default(bool)); }
static PropertyToken () { Empty = new PropertyToken (); }
internal PropertyBuilder(ModuleBuilder mod, string name, SignatureHelper sig, PropertyAttributes attr, Type returnType, PropertyToken prToken, TypeBuilder containingType) { if (name == null) { throw new ArgumentNullException("name"); } if (name.Length == 0) { throw new ArgumentException(Environment.GetResourceString("Argument_EmptyName"), "name"); } if ((int)name[0] == 0) { throw new ArgumentException(Environment.GetResourceString("Argument_IllegalName"), "name"); } this.m_name = name; this.m_moduleBuilder = mod; this.m_signature = sig; this.m_attributes = attr; this.m_returnType = returnType; this.m_prToken = prToken; this.m_tkProperty = prToken.Token; this.m_containingType = containingType; }
public bool Equals(PropertyToken obj) { return (obj.m_property == this.m_property); }