internal Class GetSpecialSystemClass(PrimitiveType pType) { int ix = pType.GetSystemTypeIx(); if (systemClasses[ix] == null && !PEFile.IsMSCorlib) { systemClasses[ix] = new SystemClass(pType,this,metaData); metaData.AddToTable(MDTable.TypeRef,systemClasses[ix]); } return systemClasses[ix]; }
private Class GetSpecialClass(string nsName,string name) { if (nsName.CompareTo(systemName) != 0) return null; int hash = name.GetHashCode(); for (int i=0; i < specialNames.Length; i++) { if (hash != specialNames[i]) continue; if (systemClasses[i] == null) { if (i < valueTypeIx) { systemClasses[i] = new SystemClass(systemTypes[i],this,metaData); if ((systemTypes[i] != PrimitiveType.Object) && (systemTypes[i] != PrimitiveType.String)) { systemClasses[i].MakeValueClass(ValueClass.ValueType); } } else { systemClasses[i] = new ClassRef(nsName,name,metaData); ((ClassRef) systemClasses[i]).SetParent(this); if (!ClassDef.IsValueType (nsName, name) && !ClassDef.IsEnum (nsName, name)) systemClasses[i].MakeValueClass(ValueClass.ValueType); } metaData.AddToTable(MDTable.TypeRef,systemClasses[i]); } return systemClasses[i]; } return null; }