src/Mimp.SeeSharper.Reflection/TypeExtensions.cs
/// <summary>
/// Return the value type of <see cref="IAsyncEnumerator{T}"/>.
/// </summary>
/// <param name="type"></param>
/// <returns></returns>
/// <exception cref="ArgumentNullException"></exception>
/// <exception cref="InvalidOperationException">If type isn't <see cref="IAsyncEnumerator{T}"/>.</exception>
Return the value type of .
Return the value type of .
public static Type? GetIAsyncEnumeratorValueType(this Type type)
        {
            var types = type.GetGenericArguments(typeof(IAsyncEnumerator<>));
            return types.Any() ? types.First() : null;
        }
public static Type ? GetIAsyncEnumeratorValueType ( this Type type ) { var types = type . GetGenericArguments ( typeof ( IAsyncEnumerator < > ) ) ; return types . Any ( ) ? types . First ( ) : null ; }
Return the value type of .
Return the value type of .
None
None
If type isn't .
If type isn ' t .
Type
this
type
None