public TransactionsPollingWorkerBase(ILogger <PollingWorkerBase <Transaction> > logger, AdamantApi api, IPusher pusher, ANSContext context) : base(api, context, logger) { _pusher = pusher; }
public CreateBoardItemFunction( IPusher pusher, IBoardManager boardManager) { _pusher = pusher; _boardManager = boardManager; }
public JoinBoardFunction( IPusher pusher, IBoardManager boardManager) { _pusher = pusher; _boardManager = boardManager; }
public GiveSyncFunction( IBoardManager boardManager, IPusher pusher) { _boardManager = boardManager; _pusher = pusher; }
private void Start() { _ui = new UI.Core.UI(); _forceCalculator = new ForceCalculator(); _selector = new Selector3D(); _pusher = new Pusher(); _boardBuilder = new BoardBuilder(); _inputHandler = new MouseInputHandler(); _board = _boardBuilder.Build(); _turnSwitcher = new TurnSwitcher(_board); _playerAI = new PlayerAI( _inputHandler, _board ); InitUIHandler(); _inputHandler.OnDownEvent += OnDownEventHandler; _inputHandler.OnUpEvent += OnUpEventHandler; _turnSwitcher.MoveCompleteEvent += MoveCompleteEventHandler; _board.CheckersIsEmty += CheckersIsEmtyEventHandler; foreach (var checker in _board.CheckersWhite.Concat(_board.CheckersBlack)) { var checker1 = checker; checker1.SelectEvent += () => SelectEventHandler(checker1); checker1.BouncingBorderEvent += () => BouncingBorderEventHandler(checker1); } _ui.SelectYourColourText(); }
public void Setup() { PusherClient.Pusher.Trace.Listeners.Add(new ConsoleTraceListener(true)); _pusher = new Pusher(Config.AppId, Config.AppKey, Config.AppSecret, new PusherOptions() { HostName = Config.HttpHost }); }
public void Setup() { PusherClient.Pusher.Trace.Listeners.Add(new ConsoleTraceListener(true)); _pusher = new Pusher(Config.AppId, Config.AppKey, Config.AppSecret, new PusherOptions() { HostName = Config.HttpHost }); }
public ListenController(StargateDbContext dbContext, StargateMemory memoryContext, IPusher <WebSocket> pusher) { _dbContext = dbContext; _memoryContext = memoryContext; _pusher = pusher; }
static void ApplePusher_OnInvalidToken(IPusher sender, InvalidTokenEventArgs eventArgs) { var device = _context.Devices.FirstOrDefault(d => d.Token.Equals(eventArgs.Token)); if (device != null) { _logger.Info("Removing invalid/expired token: {0}", eventArgs.Token); _context.Devices.Remove(device); _context.SaveChanges(); } }
public void Setup() { _subClient = Substitute.For<IRestClient>(); IPusherOptions options = new PusherOptions() { RestClient = _subClient }; Config.AppId = "test-app-id"; Config.AppKey = "test-app-key"; Config.AppSecret = "test-app-secret"; _pusher = new Pusher(Config.AppId, Config.AppKey, Config.AppSecret, options); }
private void InitPusher() { var options = new PusherOptions { Cluster = AppSettings.Cluster, Encrypted = true }; _pusher = new Pusher( AppSettings.AppId, AppSettings.AppKey, AppSettings.AppSecret, options); }
public void Setup() { _subClient = Substitute.For <IRestClient>(); IPusherOptions options = new PusherOptions() { RestClient = _subClient }; Config.AppId = "test-app-id"; Config.AppKey = "test-app-key"; Config.AppSecret = "test-app-secret"; _pusher = new Pusher(Config.AppId, Config.AppKey, Config.AppSecret, options); }
internal PusherClientService() { var options = new PusherOptions { JsonSerializer = new CustomerSerializer() }; //_pusher = new Pusher( // ConfigurationManager.AppSettings.Get("pusher-id"), // ConfigurationManager.AppSettings.Get("pusher-key"), // ConfigurationManager.AppSettings.Get("pusher-secret"), // options); _pusher = new Pusher("75465", "0041ab94e110de594bdb", "965b8dd2bd7f6cec18cc", options); }
public void Setup() { _subClient = Substitute.For <IRestClient>(); IPusherOptions options = new PusherOptions() { RestClient = _subClient }; Config.AppId = "test-app-id"; Config.AppKey = "test-app-key"; Config.AppSecret = "test-app-secret"; _pusher = new Pusher(Config.AppId, Config.AppKey, Config.AppSecret, options); _subClient.Execute(Arg.Any <IRestRequest>()).Returns(V8_PROTOCOL_SUCCESSFUL_RESPONSE); }
public void trigger_calls_are_made_over_HTTP_by_default() { IPusherOptions options = new PusherOptions() { RestClient = _subClient }; _pusher = new Pusher(Config.AppId, Config.AppKey, Config.AppSecret, options); _pusher.Trigger(channelName, eventName, eventData); _subClient.Received().Execute( Arg.Is <IRestRequest>( x => CheckRequestScheme("http", _subClient, x) ) ); }
public void Setup() { _subPusherClient = Substitute.For<IPusherRestClient>(); IPusherOptions options = new PusherOptions() { RestClient = _subPusherClient }; Config.AppId = "test-app-id"; Config.AppKey = "test-app-key"; Config.AppSecret = "test-app-secret"; _pusher = new Pusher(Config.AppId, Config.AppKey, Config.AppSecret, options); _subPusherClient.ExecutePostAsync(Arg.Any<IPusherRestRequest>()).Returns(Task.FromResult(new TriggerResult(_v8ProtocolSuccessfulResponse, TriggerResultHelper.TRIGGER_RESPONSE_JSON))); }
public void Setup() { _subPusherClient = Substitute.For <IPusherRestClient>(); IPusherOptions options = new PusherOptions() { RestClient = _subPusherClient }; Config.AppId = "test-app-id"; Config.AppKey = "test-app-key"; Config.AppSecret = "test-app-secret"; _pusher = new Pusher(Config.AppId, Config.AppKey, Config.AppSecret, options); _subPusherClient.ExecutePostAsync(Arg.Any <IPusherRestRequest>()).Returns(Task.FromResult(new TriggerResult(_v8ProtocolSuccessfulResponse, TriggerResultHelper.TRIGGER_RESPONSE_JSON))); }
/// <summary> /// Удалить задачу с доски. /// </summary> /// <param name="boardController"></param> protected static void DelTaskFromBoard(BoardController boardController, IPusher pusher) { Console.Clear(); if (pusher == null) { throw new ArgumentNullException("Следует передать интерфейс удаления задачи!"); } try { pusher.DelTask(boardController, TryParseName("задачи")); } catch (ArgumentException ex) { Console.Error.WriteLine(ex.Message); } }
public void Setup() { _subPusherClient = Substitute.For <IPusherRestClient>(); IPusherOptions options = new PusherOptions() { RestClient = _subPusherClient }; _config = new ApplicationConfig { AppId = "test-app-id", AppKey = "test-app-key", AppSecret = "test-app-secret", }; _pusher = new Pusher(_config.AppId, _config.AppKey, _config.AppSecret, options); }
public void trigger_calls_are_made_over_port_443_when_Encrypted_option_is_set() { IPusherOptions options = new PusherOptions() { RestClient = _subClient, Encrypted = true, HostName = Config.HttpHost }; _pusher = new Pusher(Config.AppId, Config.AppKey, Config.AppSecret, options); _pusher.Trigger(channelName, eventName, eventData); _subClient.Received().Execute( Arg.Is <IRestRequest>( x => _CheckRequestPort(443, _subClient, x) ) ); }
public void trigger_calls_are_made_over_configured_Port_when_option_is_set() { int expectedPort = 900; IPusherOptions options = new PusherOptions() { RestClient = _subClient, Port = expectedPort }; _pusher = new Pusher(Config.AppId, Config.AppKey, Config.AppSecret, options); _pusher.Trigger(channelName, eventName, eventData); _subClient.Received().Execute( Arg.Is <IRestRequest>( x => _CheckRequestPort(expectedPort, _subClient, x) ) ); }
/// <summary> /// Консольный интерфейс добавления задач. /// </summary> /// <param name="boardController"></param> protected static void AddTaskToBoard(BoardController boardController, IPusher pusher) { Console.Clear(); var nameTask = TryParseName("задачи"); var date = TryParseDate(); var priority = TryParsePriority(); if (pusher == null) { throw new ArgumentNullException("Следует передать интерфейс добавления задачи!"); } try { pusher.AddTask(boardController, new Task(nameTask, date, priority)); } catch (ArgumentException ex) { Console.Error.WriteLine(ex.Message); } }
public IPusher CreatePusher(IIndexModel model) { if (model == null) { return(null); } using (var connectionRepository = ResolverFactory.Resolve <ConnectionRepository>()) using (var entityRepository = ResolverFactory.Resolve <EntityRepository>()) { var destinationConnection = connectionRepository.GetById(model.DestinationConnectionId.ToString()); IPusher result = null; if (model.EntityType == EntityType.Attribute) { var attrModel = model as AttributeModel; var entityModel = entityRepository.GetById(attrModel.EntityId.ToString()); result = pushers .Where(p => typeof(IAttributePusher).IsAssignableFrom(p.GetType())) .Select(p => p as IAttributePusher) .FirstOrDefault(p => p.IsImplemented(model.DestinationProcessorId, entityModel.DestinationProcessorId, destinationConnection.ProviderId)); } else { result = pushers .Where(p => typeof(IEntityPusher).IsAssignableFrom(p.GetType())) .Select(p => p as IEntityPusher) .FirstOrDefault(p => p.IsImplemented(model.DestinationProcessorId, destinationConnection.ProviderId)); } var options = entityRepository.LoadOptions(model.Id.ToString(), model.EntityType) .Select(o => new OptionItem { Name = o.Key, Value = o.Value }); result.SetIndex(model); result.SetOptions(options); return(result); } }
public void trigger_calls_are_made_over_HTTPS_when_Encrypted_option_is_set() { IPusherOptions options = new PusherOptions() { RestClient = _subClient, Encrypted = true }; _pusher = new Pusher(Config.AppId, Config.AppKey, Config.AppSecret, options); ITriggerResult result = _pusher.Trigger( channelName, eventName, eventData ); _subClient.Received().Execute( Arg.Is <IRestRequest>( x => CheckRequestIsMadeOver("https://", _subClient, x) ) ); }
public OrdersHistoryCommand(ICore core, IPusher pusher) : base(core, pusher) { }
public HomeController(TweetEventSource tweetEventSource, IPusher pusher) { _pusher = pusher; InitialiseAndConfigureTweetEventSource(tweetEventSource); }
public void Setup() { _pusher = new Pusher(Config.AppId, Config.AppKey, Config.AppSecret); }
public void trigger_calls_are_made_over_port_443_when_Encrypted_option_is_set() { IPusherOptions options = new PusherOptions() { RestClient = _subClient, Encrypted = true }; _pusher = new Pusher(Config.AppId, Config.AppKey, Config.AppSecret, options); ITriggerResult result = _pusher.Trigger( channelName, eventName, eventData ); _subClient.Received().Execute( Arg.Is<IRestRequest>( x => _CheckRequestPort(443, _subClient, x) ) ); }
public PusherService(IPusher pusher, IPusherProvider pusherProvider) { _pusher = pusher; _pusherProvider = pusherProvider; }
public DataFeedListCommand(ICore core, IPusher pusher, IDataFeedWorker dataFeedWorker) : base(core, pusher) { _dataFeedWorker = dataFeedWorker ?? throw new ArgumentNullException(nameof(dataFeedWorker)); }
public GetPositionsCommand(ICore core, IPusher pusher) : base(core, pusher) { }
public ModifyAccountOrderCommand(ICore core, IPusher pusher) : base(core, pusher) { }
public HomeController() { _pusher = new WebSocketPusher(); }
public RemoveUserFilesCommand(ICore core, IPusher pusher) : base(core, pusher) { }
public PlaceAccountOrderCommand(ICore core, IPusher pusher) : base(core, pusher) { }
public GetAvailableSymbolsCommand(ICore core, IPusher pusher, IDataFeedWorker dataFeedWorker) : base(core, pusher) { _dataFeedWorker = dataFeedWorker ?? throw new ArgumentNullException(nameof(dataFeedWorker)); }
public void trigger_calls_are_made_over_configured_Port_when_option_is_set() { int expectedPort = 900; IPusherOptions options = new PusherOptions() { RestClient = _subClient, Port = expectedPort }; _pusher = new Pusher(Config.AppId, Config.AppKey, Config.AppSecret, options); ITriggerResult result = _pusher.Trigger( channelName, eventName, eventData ); _subClient.Received().Execute( Arg.Is<IRestRequest>( x => _CheckRequestPort(expectedPort, _subClient, x) ) ); }
public void trigger_calls_are_made_over_HTTP_by_default() { IPusherOptions options = new PusherOptions() { RestClient = _subClient }; _pusher = new Pusher(Config.AppId, Config.AppKey, Config.AppSecret, options); ITriggerResult result = _pusher.Trigger( channelName, eventName, eventData ); _subClient.Received().Execute( Arg.Is<IRestRequest>( x => CheckRequestIsMadeOver("http://", _subClient, x) ) ); }
public PortfolioActionCommand(ICore core, IPusher pusher) : base(core, pusher) { }
public static void Init(IPusher pusher) { Pusher = pusher; }