/// <summary> /// Converts a KnownTypeCode to a Type. /// </summary> /// <param name="knownTypeCode">The known type code to convert.</param> /// <param name="metadataRepository">The MetadataRepository of all known modules.</param> /// <returns>The type wrapper if its available, null otherwise.</returns> internal static IHandleTypeNamedWrapper?ToTypeWrapper(this KnownTypeCode knownTypeCode, MetadataRepository metadataRepository) { if (metadataRepository == null) { throw new ArgumentNullException(nameof(metadataRepository)); } var name = ToTypeName(knownTypeCode); return(metadataRepository.GetTypeByName(name)); }
public TypeProvider(MetadataRepository metadataRepository) { MetadataRepository = metadataRepository; }