DmdType[] CreateGenericParameters_COMThread() { reader.Dispatcher.VerifyAccess(); var tokens = MDAPI.GetGenericParamTokens(reader.MetaDataImport, (uint)MetadataToken); if (tokens.Length == 0) { return(null); } var genericParams = new DmdType[tokens.Length]; for (int i = 0; i < genericParams.Length; i++) { uint token = tokens[i]; uint rid = token & 0x00FFFFFF; var gpName = MDAPI.GetGenericParamName(reader.MetaDataImport, token) ?? string.Empty; if (!MDAPI.GetGenericParamNumAndAttrs(reader.MetaDataImport, token, out var gpNumber, out var gpAttrs)) { return(null); } var gpType = new DmdGenericParameterTypeCOMD(reader, rid, this, gpName, gpNumber, gpAttrs, null); genericParams[i] = gpType; } return(genericParams); }
void InitGenericParamProps_NoLock() { var mdi2 = readerModule.MetaDataImport2; uint token = OriginalToken.Raw; Name = MDAPI.GetGenericParamName(mdi2, token) ?? string.Empty; Kind = null; MDAPI.GetGenericParamNumAndAttrs(mdi2, token, out number, out var attrs); attributes = (int)attrs; }