src/Microsoft/JSInterop/0.Core/src/Utils/TypeUtils.cs
/// <summary>
/// Ensures that <paramref name="interfaceType"/> is assignable to 
/// <typeparamref name="TAssignableTo"/>, otherwise an excpetion is
/// thrown.
/// </summary>
/// <exception cref="ArgumentException"></exception>
Ensures that  is assignable to
, otherwise an excpetion is
thrown.
Ensures that is assignable to otherwise an excpetion is thrown .
public static void EnsureInterfaceTypeIsAssignaleTo<TAssignableTo>(Type interfaceType)
        {
            if (!typeof(TAssignableTo).IsAssignableFrom(interfaceType)) {
                throw new ArgumentException($"The interface type must be assignable to {typeof(TAssignableTo)}.");
            }
        }
public static void EnsureInterfaceTypeIsAssignaleTo < TAssignableTo > ( Type interfaceType ) { if ( ! typeof ( TAssignableTo ) . IsAssignableFrom ( interfaceType ) ) { throw new ArgumentException ( $" The interface type must be assignable to  { typeof ( TAssignableTo ) } . " ) ; } }
Ensures that  is assignable to
, otherwise an excpetion is
thrown.
Ensures that is assignable to otherwise an excpetion is thrown .
None
interfaceType
Type