示例#1
0
 static TypeReference ImportCorLibType(string fullName)
 {
     TypeDefinition type = CorLibModule.GetType(fullName) ?? CorLibModule.ExportedTypes.First(t => t.FullName == fullName).Resolve();
     if (type != null)
     {
         return CurrentAssembly.MainModule.ImportReference(type);
     }
     Error("Failed to import mscorlib type: " + fullName + " because Resolve failed. (Might happen when trying to Resolve in NetStandard dll, see also: https://github.com/vis2k/Mirror/issues/791)");
     return null;
 }
示例#2
0
        static TypeReference ImportCorLibType(string fullName)
        {
            TypeDefinition type = CorLibModule.GetType(fullName) ?? CorLibModule.ExportedTypes.First(t => t.FullName == fullName).Resolve();

            return(CurrentAssembly.MainModule.ImportReference(type));
        }