public FileUploadE2ETests() { _listener = new ConsoleEventListener("Microsoft-Azure-"); }
public TwinE2ETests() { _listener = TestConfig.StartEventListener(); }
public MethodFaultInjectionTests() { _listener = TestConfig.StartEventListener(); }
public MethodE2ETests() { _listener = TestConfig.StartEventListener(); }
public ReprovisioningE2ETests() { _listener = TestConfig.StartEventListener(); }
public AzureSecurityCenterForIoTSecurityMessageE2ETests() { _listener = TestConfig.StartEventListener(); _logAnalyticsClient = AzureSecurityCenterForIoTLogAnalyticsClient.CreateClient(); }
public MessageSendE2EMultiplexingTests() { _listener = TestConfig.StartEventListener(); }
public FaultInjectionPoolAmqpTests() { _listener = TestConfig.StartEventListener(); }
#pragma warning restore CA1823 public MessageReceiveFaultInjectionTests() { _listener = TestConfig.StartEventListener(); }
public DeviceTokenRefreshE2ETests() { _listener = new ConsoleEventListener("Microsoft-Azure-"); _log = TestLogging.GetInstance(); }
public TwinE2EMultiplexingTests() { _listener = TestConfig.StartEventListener(); }
public FileUploadFaultInjectionTests() { _listener = TestConfig.StartEventListener(); }
public IoTHubServiceProxyE2ETests() { _listener = TestConfig.StartEventListener(); }
public MessageSendE2ETests() { _listener = TestConfig.StartEventListener(); }
public RegistryManagerE2ETests() { _listener = TestConfig.StartEventListener(); }
#pragma warning restore CA1823 public FileUploadE2ETests() { _listener = TestConfig.StartEventListener(); }
public MessageFeedbackE2ETests() { _listener = TestConfig.StartEventListener(); }
public ConnectionStatusChangeHandlerTests() { _listener = TestConfig.StartEventListener(); }
public ProvisioningServiceClientE2ETests() { _listener = TestConfig.StartEventListener(); }
public ProvisioningCertificateValidationTest() { _listener = new ConsoleEventListener("Microsoft-Azure-"); }
public MethodE2ETests() { _listener = new ConsoleEventListener("Microsoft-Azure-"); }
public CombinedClientOperationsMultiplexingTests() { _listener = TestConfig.StartEventListener(); }
public MessageReceiveE2EPoolAmqpTests() { _listener = TestConfig.StartEventListener(); }
public DeviceTokenRefreshE2ETests() { _listener = TestConfig.StartEventListener(); _log = TestLogging.GetInstance(); }
public ProvisioningCertificateValidationE2ETest() { _listener = TestConfig.StartEventListener(); }
public ProvisioningTests() { _listener = new ConsoleEventListener("Microsoft-Azure-"); }
public IoTHubCertificateValidationTest() { _listener = new ConsoleEventListener("Microsoft-Azure-"); }
public DeviceClientX509AuthenticationE2ETests() { _listener = TestConfig.StartEventListener(); _hostName = GetHostName(Configuration.IoTHub.ConnectionString); }
public MessageSendTests() { _listener = new ConsoleEventListener("Microsoft-Azure-"); }
private void InitializeBot() { var strCulture = Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName; var culture = CultureInfo.CreateSpecificCulture("en"); CultureInfo.DefaultThreadCurrentCulture = culture; Thread.CurrentThread.CurrentCulture = culture; AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionEventHandler; _logger = new ConsoleLogger(LogLevel.LevelUp); Logger.SetLogger(_logger, subPath); var profilePath = Path.Combine(Directory.GetCurrentDirectory(), subPath); var profileConfigPath = Path.Combine(profilePath, "config"); var authFile = Path.Combine(profileConfigPath, "auth.json"); var configFile = Path.Combine(profileConfigPath, "config.json"); BoolNeedsSetup = false; if (File.Exists(configFile)) { /** if (!VersionCheckState.IsLatest()) * settings = GlobalSettings.Load(subPath, true); * else **/ _settings = GlobalSettings.Load(subPath, true); _settings.Auth.Load(authFile); } else { _settings = new GlobalSettings { ProfilePath = profilePath, ProfileConfigPath = profileConfigPath, GeneralConfigPath = Path.Combine(Directory.GetCurrentDirectory(), "config"), TranslationLanguageCode = strCulture }; BoolNeedsSetup = true; } _session = new Session(new ClientSettings(_settings), new LogicSettings(_settings)); _session.Client.ApiFailure = new ApiFailureStrategy(_session); _machine = new StateMachine(); var stats = new Statistics(); // var strVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(3); NOT USED ATM //Status bar stats.DirtyEvent += () => SetStatusText(stats.GetTemplatedStats( _session.Translation.GetTranslation(TranslationString.StatsTemplateString), _session.Translation.GetTranslation(TranslationString.StatsXpTemplateString))); var aggregator = new StatisticsAggregator(stats); var listener = new ConsoleEventListener(); _session.EventDispatcher.EventReceived += evt => listener.Listen(evt, _session); _session.EventDispatcher.EventReceived += evt => aggregator.Listen(evt, _session); if (_settings.UseWebsocket) { var websocket = new WebSocketInterface(_settings.WebSocketPort, _session); _session.EventDispatcher.EventReceived += evt => websocket.Listen(evt, _session); } var plugins = new PluginManager(new PluginInitializerInfo { Logger = _logger, Session = _session, Settings = _settings, Statistics = stats }); plugins.InitPlugins(); _machine.SetFailureState(new LoginState()); Logger.SetLoggerContext(_session); _session.Navigation.UpdatePositionEvent += (lat, lng) => _session.EventDispatcher.Send(new UpdatePositionEvent { Latitude = lat, Longitude = lng }); _session.Navigation.UpdatePositionEvent += Navigation_UpdatePositionEvent; RouteOptimizeUtil.RouteOptimizeEvent += optimizedroute => _session.EventDispatcher.Send(new OptimizeRouteEvent { OptimizedRoute = optimizedroute }); RouteOptimizeUtil.RouteOptimizeEvent += InitializePokestopsAndRoute; Navigation.GetHumanizeRouteEvent += (route, destination) => _session.EventDispatcher.Send(new GetHumanizeRouteEvent { Route = route, Destination = destination }); Navigation.GetHumanizeRouteEvent += UpdateMap; FarmPokestopsTask.LootPokestopEvent += pokestop => _session.EventDispatcher.Send(new LootPokestopEvent { Pokestop = pokestop }); FarmPokestopsTask.LootPokestopEvent += UpdateMap; CatchNearbyPokemonsTask.PokemonEncounterEvent += mappokemons => _session.EventDispatcher.Send(new PokemonsEncounterEvent { EncounterPokemons = mappokemons }); CatchNearbyPokemonsTask.PokemonEncounterEvent += UpdateMap; CatchIncensePokemonsTask.PokemonEncounterEvent += mappokemons => _session.EventDispatcher.Send(new PokemonsEncounterEvent { EncounterPokemons = mappokemons }); CatchIncensePokemonsTask.PokemonEncounterEvent += UpdateMap; }