public Task <ApiResponse <Unit> > Handle <TNotification>( NotificationExecutionContext <TSession, TNotification> context ) where TNotification : INotification { NotifyCache <TNotification> .EnsureInitialized(_steps); return(NotifyCache <TNotification> .Pipeline(context)); }
protected override void Context() { sut = new NotifyCache <string, IAnInterface>(); _implementation1 = new AnImplementation(); _implementation2 = new AnImplementation(); _implementation3 = new AnImplementation(); sut.Add("key1", _implementation1); sut.Add("key2", _implementation2); sut.Add("key3", _implementation3); }
public static INotifyCache <TKey, TValue> ToNotifyCache <TKey, TValue>(this IDictionary <TKey, TValue> dictionary) { var notifyCache = new NotifyCache <TKey, TValue>(); foreach (var keyValue in dictionary) { notifyCache.Add(keyValue.Key, keyValue.Value); } return(notifyCache); }