/// <summary> /// Initializes a new instance of the <see cref="CilRuntimeField"/> class. /// </summary> /// <param name="module">The module.</param> /// <param name="name">The name.</param> /// <param name="signature">The signature.</param> /// <param name="token">The token.</param> /// <param name="offset">The offset.</param> /// <param name="rva">The rva.</param> /// <param name="declaringType">Type of the declaring.</param> /// <param name="attributes">The attributes.</param> public CilRuntimeField(ITypeModule module, string name, FieldSignature signature, Token token, uint offset, uint rva, RuntimeType declaringType, FieldAttributes attributes) : base(module, token, declaringType) { this.Name = name; this.Signature = signature; base.Attributes = attributes; base.RVA = rva; }
/// <summary> /// Initializes a new instance of the <see cref="CilGenericField"/> class. /// </summary> /// <param name="module">The module.</param> /// <param name="genericField">The generic field.</param> /// <param name="signature">The signature.</param> /// <param name="declaringType">Type of the declaring.</param> public CilGenericField(ITypeModule module, RuntimeField genericField, FieldSignature signature, CilGenericType declaringType) : base(module, declaringType) { this.Signature = signature; this.Attributes = genericField.Attributes; //TODO //this.SetAttributes(genericField.CustomAttributes); base.Name = genericField.Name; }
public override IEnumerable GetValues() { yield return TokenString("Name", row.Name); yield return Value("NameStringIdx", row.Name); yield return Value("Flags", row.Flags.ToString()); yield return Value("SignatureBlobIdx", row.Signature); FieldSignature signature = new FieldSignature(Metadata, row.Signature); yield return Value("Signature Token", signature.Token); yield return Value("Signature Modifier", signature.Modifier.ToString()); yield return Value("Signature Type", signature.Type.ToString()); }
/// <summary> /// Initializes a new instance of the <see cref="FieldSignature"/> class. /// </summary> /// <param name="signature">The signature.</param> /// <param name="genericArguments">The generic arguments.</param> public FieldSignature(FieldSignature signature, SigType[] genericArguments) : base(signature) { ApplyGenericArguments(genericArguments); }
/// <summary> /// Initializes a new instance of the <see cref="FieldSignature"/> class. /// </summary> /// <param name="signature">The signature.</param> public FieldSignature(FieldSignature signature) : base(signature) { }
private void ResolveFields() { foreach (CilRuntimeField field in baseGenericType.Fields) { var signature = new FieldSignature(field.Signature, genericArguments); var genericInstanceField = new CilGenericField(Module, field, signature, this); Fields.Add(genericInstanceField); } }