Пример #1
0
 /// <summary>
 ///     This is used to determine if the given <paramref name="iTypeSymbol"/> corresponds to the <see cref="IEnumerable{T}" /> interface type.
 /// </summary>
 /// <param name="iTypeSymbol">
 ///     The type.
 /// </param>
 /// <returns>
 ///     Whether or not there was a match on the <see cref="IEnumerable{T}" /> interface type.
 /// </returns>
 private static bool IsIEnumerable(ITypeSymbol iTypeSymbol) => (iTypeSymbol is INamedTypeSymbol iNamedTypeSymbol) && HasExpectedInterface(iNamedTypeSymbol, EnumerableInterfaceFullType);
Пример #2
0
 /// <summary>
 ///     This is used to determine if the given <paramref name="iTypeSymbol"/> corresponds to the <see cref="IList{T}" /> interface type.
 /// </summary>
 /// <param name="iTypeSymbol">
 ///     The type.
 /// </param>
 /// <returns>
 ///     Whether or not there was a match on the <see cref="IList{T}" /> interface type.
 /// </returns>
 private static bool IsIList(ITypeSymbol iTypeSymbol) => (iTypeSymbol is INamedTypeSymbol iNamedTypeSymbol) && HasExpectedInterface(iNamedTypeSymbol, ListInterfaceFullType);