示例#1
0
 public InMemoryTaskTracker(
     ITaskTrackerPersistentStorage <T> persistentStorage
     )
 {
     _taskMappings     = new Dictionary <string, TaskInfo <T> >();
     PersistentStorage = persistentStorage;
 }
示例#2
0
        public HttpTransporter(
            ITaskTrackerPersistentStorage <ResponseMessage> persistentStorage,
            IPushNotificationClient pushNotificationClient,
            IRedTransportMessageConverter <HttpRequestMessage, HttpResponseMessage> httpConverter
            )
        {
            if (persistentStorage == null)
            {
                throw new ArgumentNullException(nameof(persistentStorage));
            }

            PushNotificationClient =
                pushNotificationClient ?? throw new ArgumentNullException(nameof(pushNotificationClient));
            HttpClient          = new HttpClient();
            InMemoryTaskTracker = new InMemoryTaskTracker <ResponseMessage>(persistentStorage);
            HttpConverter       = httpConverter;
        }