Exemple #1
0
        public Task <ApiResponse <Unit> > Handle <TNotification>(
            NotificationExecutionContext <TSession, TNotification> context
            )
            where TNotification : INotification
        {
            NotifyCache <TNotification> .EnsureInitialized(_steps);

            return(NotifyCache <TNotification> .Pipeline(context));
        }
Exemple #2
0
 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);
 }
Exemple #3
0
        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);
        }