Example #1
0
        internal void AddJob(Type settingsType, IDependencyInjection dependencyInjection, ILog log, ISingletonLockManager singletonLockManager)
        {
            var jobType     = typeof(JobExecutor <>).MakeGenericType(settingsType);
            var jobExecutor = (IJob)Activator.CreateInstance(jobType, log, singletonLockManager, dependencyInjection);

            _jobs.TryAdd(jobExecutor.GetType(), jobExecutor);
        }
 public StorageQueueMessageStateHandler(IStorageQueueClient queueClient, StorageQueueMessage message, int deadLetterDeliveryLimit, IDependencyInjection messageScope)
 {
     DeadLetterDeliveryLimit = deadLetterDeliveryLimit;
     MessageScope            = messageScope;
     _queueClient            = queueClient;
     _message = message;
 }
Example #3
0
 public RedisMessageStateHandler(IConnectionMultiplexer connection, RedisConfiguration configuration, RedisMessage <T> redisMessage, int deadLetterDeliveryLimit, IDependencyInjection messageScope)
 {
     _redisMessage           = redisMessage;
     _queueClient            = new RedisQueueClient <T>(connection.GetDatabase(configuration.DatabaseId), configuration.MessageSerializer);
     DeadLetterDeliveryLimit = deadLetterDeliveryLimit;
     MessageScope            = messageScope;
 }
Example #4
0
 public ServiceBusMessageStateHandler(IReceiverClient client, Message sbMessage, IMessageSerializer serializer, int deadLetterDeliveryLimit, IDependencyInjection messageScope)
 {
     DeadLetterDeliveryLimit = deadLetterDeliveryLimit;
     MessageScope            = messageScope;
     _client    = client;
     _sbMessage = sbMessage;
     _message   = serializer.Deserialize <T>(Encoding.UTF8.GetString(_sbMessage.Body));
 }
Example #5
0
        private IModuleElement GetModule(IDependencyInjection dependencyInjection, string moduleType)
        {
            var allModules = dependencyInjection.Modules.Modules.Where(x => moduleType.Equals(x.DiModule.GetType().FullName, StringComparison.Ordinal)).ToList();

            Assert.AreEqual(1, allModules.Count);

            return(allModules[0]);
        }
Example #6
0
 public MainWindowViewModel(ICANReader canReader, IMainThreadInvoker mainThreadInvoker, IDependencyInjection di)
 {
     this.di                            = di;
     this.canReader                     = canReader;
     this.mainThreadInvoker             = mainThreadInvoker;
     this.messageReceived               = HandleCANQueue;
     this.canReader.CANMessageReceived += CanReader_CANMessageReceived_RemoteThread;
 }
Example #7
0
 public ServiceBusMessageStateHandler(ProcessMessageEventArgs processMessage, IMessageSerializer serializer, int deadLetterDeliveryLimit, IDependencyInjection messageScope)
 {
     DeadLetterDeliveryLimit = deadLetterDeliveryLimit;
     MessageScope            = messageScope;
     _processMessage         = processMessage;
     _sbMessage = processMessage.Message;
     _message   = serializer.Deserialize <T>(_sbMessage.Body.ToMemory());
 }
Example #8
0
 public PortableChatEncryptionService(IDependencyInjection dependencyInjection, ILoggerFactory loggerFactory, IXDSSecService ixdsCryptoService, AppRepository appRepository, ProfileViewModel profileViewModel, E2ERatchet e2ERatchet)
 {
     this.logger            = loggerFactory.CreateLogger <PortableChatEncryptionService>();
     this.ixdsCryptoService = ixdsCryptoService;
     this.repo             = appRepository;
     this.profileViewModel = profileViewModel;
     this.e2ERatchet       = e2ERatchet;
 }
        public DeviceSelector(IDependencyInjection di)
        {
            var vm = di.Resolve <DeviceSelectorViewModel>();

            DataContext = vm;
            this.InitializeComponent();
            vm.Refresh();
#if DEBUG
            this.AttachDevTools();
#endif
        }
        public void Setup()
        {
            var container = new Container {
                Options = { DefaultScopedLifestyle = new AsyncScopedLifestyle() }
            };

            container.Register <ITestService, TestService>(Lifestyle.Scoped);

            DependencyInjection = new SimpleInjectorDependencyInjection(container);
            container.Verify();
        }
Example #11
0
 public ContactListManager(IDependencyInjection dependencyInjection, ILoggerFactory loggerFactory, AppRepository appRepository, IFileService fileService, IChatEncryptionService chatEncryptionService, IDispatcher dispatcher, NotificationManager notificationManager, UnreadManager unreadManager)
 {
     this.logger                 = loggerFactory.CreateLogger <ContactListManager>();
     this._repo                  = appRepository;
     this._fileService           = fileService;
     this._chatEncryptionService = chatEncryptionService;
     this._dispatcher            = dispatcher;
     this._notificationManager   = notificationManager;
     this._unreadManager         = unreadManager;
     this.dependencyInjection    = dependencyInjection;
 }
Example #12
0
 public ChatClient(IDependencyInjection dependencyInjection, ILoggerFactory loggerFactory)
 {
     this.logger = loggerFactory.CreateLogger <ChatClient>();
     this.dependencyInjection = dependencyInjection;
 }
Example #13
0
 public static IDependencyInjection RegisterSchedules(this IDependencyInjection dependencyInjection, Assembly assembly)
 {
     dependencyInjection.RegisterOpenGeneric(typeof(IProcessSchedule <>), assembly);
     return(dependencyInjection);
 }
Example #14
0
 public JobExecutor(ILog logger, ISingletonLockManager lockManager, IDependencyInjection dependencyInjection)
 {
     _logger              = logger;
     _lockManager         = lockManager;
     _dependencyInjection = dependencyInjection;
 }
 public DIController(IDependencyInjection injection)
 {
     _Injection = injection;
 }
 public static IHostConfiguration UseDependencyInjection(this IHostConfiguration configuration, IDependencyInjection provider)
 {
     configuration.DependencyInjection = provider;
     return(configuration);
 }
 public static void Inicializa(IDependencyInjection dependencyInjection)
 {
     _dependencyInjection = dependencyInjection;
 }
Example #18
0
 public MessageProcessor(IDependencyInjection processorProvider)
 {
     _processorProvider = processorProvider;
 }