public Sender(State state, Db db, CancellationTokenSource cancellationTokenSource, Logger logger) { this.state = state; this.db = db; this.cancellationTokenSource = cancellationTokenSource; this.logger = logger; endpoint = state.target + Constants.BULK_URL; }
public CommandManager(BlockingCollection<Command> queue, State state) { this.queue = queue; this.state = state; }
public void Initialize(string projectToken, string appVersion, string target, Logger logger, string workingDirectory) { lock (initializeFinalizeLock) { if (initialized) throw new System.InvalidOperationException("Infinario client has been already initialized"); this.appVersion = appVersion; initialized = true; this.logger = logger; state = new State(projectToken, target, logger, workingDirectory); CommandManager manager = new CommandManager(queue, state); worker = new Thread(new ThreadStart(manager.Consume)); worker.Start(); } }