[System.Security.SecurityCritical] // auto-generated internal FieldBuilder(TypeBuilder typeBuilder, String fieldName, Type type, Type[] requiredCustomModifiers, Type[] optionalCustomModifiers, FieldAttributes attributes) { if (fieldName == null) throw new ArgumentNullException("fieldName"); if (fieldName.Length == 0) throw new ArgumentException(Environment.GetResourceString("Argument_EmptyName"), "fieldName"); if (fieldName[0] == '\0') throw new ArgumentException(Environment.GetResourceString("Argument_IllegalName"), "fieldName"); if (type == null) throw new ArgumentNullException("type"); if (type == typeof(void)) throw new ArgumentException(Environment.GetResourceString("Argument_BadFieldType")); Contract.EndContractBlock(); m_fieldName = fieldName; m_typeBuilder = typeBuilder; m_fieldType = type; m_Attributes = attributes & ~FieldAttributes.ReservedMask; SignatureHelper sigHelp = SignatureHelper.GetFieldSigHelper(m_typeBuilder.Module); sigHelp.AddArgument(type, requiredCustomModifiers, optionalCustomModifiers); int sigLength; byte[] signature = sigHelp.InternalGetSignature(out sigLength); m_fieldTok = TypeBuilder.DefineField(m_typeBuilder.GetModuleBuilder().GetNativeHandle(), typeBuilder.TypeToken.Token, fieldName, signature, sigLength, m_Attributes); m_tkField = new FieldToken(m_fieldTok, type); }
internal FieldBuilder(TypeBuilder typeBuilder, string fieldName, Type type, Type[] requiredCustomModifiers, Type[] optionalCustomModifiers, FieldAttributes attributes) { int num; if (fieldName == null) { throw new ArgumentNullException("fieldName"); } if (fieldName.Length == 0) { throw new ArgumentException(Environment.GetResourceString("Argument_EmptyName"), "fieldName"); } if (fieldName[0] == '\0') { throw new ArgumentException(Environment.GetResourceString("Argument_IllegalName"), "fieldName"); } if (type == null) { throw new ArgumentNullException("type"); } if (type == typeof(void)) { throw new ArgumentException(Environment.GetResourceString("Argument_BadFieldType")); } this.m_fieldName = fieldName; this.m_typeBuilder = typeBuilder; this.m_fieldType = type; this.m_Attributes = attributes & ~FieldAttributes.ReservedMask; SignatureHelper fieldSigHelper = SignatureHelper.GetFieldSigHelper(this.m_typeBuilder.Module); fieldSigHelper.AddArgument(type, requiredCustomModifiers, optionalCustomModifiers); byte[] signature = fieldSigHelper.InternalGetSignature(out num); this.m_fieldTok = TypeBuilder.DefineField(this.m_typeBuilder.GetModuleBuilder().GetNativeHandle(), typeBuilder.TypeToken.Token, fieldName, signature, num, this.m_Attributes); this.m_tkField = new FieldToken(this.m_fieldTok, type); }
public bool Equals (FieldToken obj) { return (this.tokValue == obj.tokValue); }
public bool Equals(FieldToken obj) { return obj.m_fieldTok == m_fieldTok && obj.m_class == m_class; }
public bool Equals(FieldToken obj) { return default(bool); }
public bool Equals(FieldToken obj) { return(obj.m_fieldTok == m_fieldTok && obj.m_class == m_class); }
public bool Equals(FieldToken obj) { return(this.tokValue == obj.tokValue); }
static FieldToken () { Empty = new FieldToken (); }
static FieldToken() { Empty = new FieldToken(); }
// Summary: // Indicates whether the current instance is equal to the specified System.Reflection.Emit.FieldToken. // // Parameters: // obj: // The System.Reflection.Emit.FieldToken to compare to the current instance. // // Returns: // true if the value of obj is equal to the value of the current instance; otherwise, // false. extern public bool Equals(FieldToken obj);
internal FieldBuilder(TypeBuilder typeBuilder, String fieldName, Type type, FieldAttributes attributes) { if (fieldName==null) throw new ArgumentNullException("fieldName"); if (fieldName.Length == 0) throw new ArgumentException(Environment.GetResourceString("Argument_EmptyName"), "fieldName"); if (fieldName[0] == '\0') throw new ArgumentException(Environment.GetResourceString("Argument_IllegalName"), "fieldName"); if (type==null) throw new ArgumentNullException("type"); if (type == SystemVoid) throw new ArgumentException(Environment.GetResourceString("Argument_BadFieldType")); m_fieldName = fieldName; m_typeBuilder = typeBuilder; m_fieldType = type; m_Attributes = attributes; SignatureHelper sigHelp = SignatureHelper.GetFieldSigHelper(m_typeBuilder.Module); sigHelp.AddArgument(type); int sigLength; byte[] signature = sigHelp.InternalGetSignature(out sigLength); m_tkField = new FieldToken(TypeBuilder.InternalDefineField( typeBuilder.TypeToken.Token, fieldName, signature, sigLength, attributes, m_typeBuilder.Module), type); }
public bool Equals(FieldToken obj) { return(default(bool)); }
public bool Equals(FieldToken obj) { return((obj.m_fieldTok == this.m_fieldTok) && (obj.m_class == this.m_class)); }
/// <summary>Indicates whether the current instance is equal to the specified <see cref="T:System.Reflection.Emit.FieldToken" />.</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.FieldToken" /> to compare to the current instance.</param> public bool Equals(FieldToken obj) { throw new NotImplementedException(); }
public bool Equals(FieldToken obj) { return ((obj.m_fieldTok == this.m_fieldTok) && (obj.m_class == this.m_class)); }