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; }
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; }
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)); }
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]); }
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; }
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()); }
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(); }
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; }
public ChatClient(IDependencyInjection dependencyInjection, ILoggerFactory loggerFactory) { this.logger = loggerFactory.CreateLogger <ChatClient>(); this.dependencyInjection = dependencyInjection; }
public static IDependencyInjection RegisterSchedules(this IDependencyInjection dependencyInjection, Assembly assembly) { dependencyInjection.RegisterOpenGeneric(typeof(IProcessSchedule <>), assembly); return(dependencyInjection); }
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; }
public MessageProcessor(IDependencyInjection processorProvider) { _processorProvider = processorProvider; }