static Dictionary <TKey, TSource> ToDictionaryAt <TEnumerable, TEnumerator, TSource, TKey, TKeySelector, TPredicate>(this TEnumerable source, TKeySelector keySelector, IEqualityComparer <TKey>?comparer, TPredicate predicate) where TEnumerable : IValueReadOnlyCollection <TSource, TEnumerator> where TEnumerator : struct, IEnumerator <TSource> where TKey : notnull where TKeySelector : struct, IFunction <TSource, TKey> where TPredicate : struct, IFunction <TSource, int, bool> => source.Count is 0 // ReSharper disable once HeapView.ObjectAllocation.Evident ? new Dictionary <TKey, TSource>() : ValueEnumerableExtensions.ToDictionaryAt <TEnumerable, TEnumerator, TSource, TKey, TKeySelector, TPredicate>(source, keySelector, comparer, predicate);