public Get ( |
||
type | ||
interfaceType | ||
Résultat |
public static Type GetInterface(this Type type, Type interfaceType) { if (type == null) { throw new ArgumentNullException(nameof(type)); } if (interfaceType == null) { throw new ArgumentNullException(nameof(interfaceType)); } var interfaceTypeInfo = interfaceType.GetTypeInfo(); if (!interfaceTypeInfo.IsInterface) { throw new ArgumentException("The interface type must be an interface: " + interfaceType.Name); } return(_cache.Get(type, interfaceType)); }