internal static TypeInformation GetTypeInformation(Type type) { TypeInformation typeInformation = null; object typeInformationObject = typeNameCache[type]; if (typeInformationObject == null) { bool hasTypeForwardedFrom; string assemblyName = DataContract.GetClrAssemblyName(type, out hasTypeForwardedFrom); typeInformation = new TypeInformation(DataContract.GetClrTypeFullNameUsingTypeForwardedFromAttribute(type), assemblyName, hasTypeForwardedFrom); lock (typeNameCache) { typeNameCache[type] = typeInformation; } } else { typeInformation = (TypeInformation)typeInformationObject; } return(typeInformation); }
internal static TypeInformation GetTypeInformation(Type type) { TypeInformation information = null; object obj2 = typeNameCache[type]; if (obj2 == null) { information = new TypeInformation(DataContract.GetClrTypeFullNameUsingTypeForwardedFromAttribute(type), DataContract.GetClrAssemblyName(type)); lock (typeNameCache) { typeNameCache[type] = information; return(information); } } return((TypeInformation)obj2); }