#pragma warning disable S2436 // Classes and methods should not have too many generic parameters public static Task FindByPropertyAsync <TModel, TKey, TProperty>( #pragma warning restore S2436 // Classes and methods should not have too many generic parameters this ICollectionWrapper <TModel, TKey> collectionWrapper, Expression <Func <TModel, TProperty> > propertySelector, TProperty propertyValue, Action <TModel> subscription) where TModel : IReadModelEx <TKey> { Func <TModel, Task> wrapper = m => { subscription(m); return(Task.CompletedTask); }; return(collectionWrapper.FindByPropertyAsync <TProperty>(propertySelector, propertyValue, wrapper)); }