unsafe void InitSignature_NoLock() { var mdi = readerModule.MetaDataImport; uint token = OriginalToken.Raw; var data = MDAPI.GetFieldSignatureBlob(mdi, token); this.Signature = readerModule.ReadSignature(data, GenericParamContext.Create(ownerType)); }
public static unsafe FieldSig ReadFieldSig(IMetaDataImport mdi, uint token) { var sig = MDAPI.GetFieldSignatureBlob(mdi, token); if (sig == null) { return(null); } return(new DebugSignatureReader().ReadSignature(mdi, sig) as FieldSig); }
public DmdFieldDefCOMD(DmdComMetadataReader reader, uint rid, DmdType declaringType, DmdType reflectedType) : base(rid, declaringType, reflectedType) { this.reader = reader ?? throw new ArgumentNullException(nameof(reader)); reader.Dispatcher.VerifyAccess(); uint token = 0x04000000 + rid; Attributes = MDAPI.GetFieldAttributes(reader.MetaDataImport, token); Name = MDAPI.GetFieldName(reader.MetaDataImport, token) ?? string.Empty; FieldType = reader.ReadFieldType_COMThread(MDAPI.GetFieldSignatureBlob(reader.MetaDataImport, token), DeclaringType.GetGenericArguments()); }
static TypeSig GetFieldTypeSig(IMetaDataImport mdi, uint token) { var buf = MDAPI.GetFieldSignatureBlob(mdi, token); if (buf == null) { return(null); } var sig = new DebugSignatureReader().ReadSignature(mdi, buf) as FieldSig; return(sig?.Type); }