protected override async void OnInitialized() { InitializeComponent(); LoggerService = Container.Resolve <ILoggerService>(); LoggerService.StartMethod(); LogFileService = Container.Resolve <ILogFileService>(); LogFileService.AddSkipBackupAttribute(); // Local Notification tap event listener //NotificationCenter.Current.NotificationTapped += OnNotificationTapped; LogUnobservedTaskExceptions(); INavigationResult result = await NavigationService.NavigateAsync("/" + nameof(SplashPage)); if (!result.Success) { LoggerService.Info($"Failed transition."); MainPage = new ExceptionPage { BindingContext = new ExceptionPageViewModel() { Message = result.Exception.Message } }; System.Diagnostics.Debugger.Break(); } LoggerService.EndMethod(); }
public GitFileLogHostedService(ILaobianLogQueue logQueue, ILogFileService fileRepository, IHostApplicationLifetime applicationLifetime) { _logQueue = logQueue; _fileRepository = fileRepository; applicationLifetime.ApplicationStarted.Register(() => _readyToRun = true); }
public LogGrpcService(ILogger <LogGrpcService> logger, ILaobianLogQueue laobianLogQueue, ILogFileService logFileService) { _logger = logger; _logFileService = logFileService; _laobianLogQueue = laobianLogQueue; }
public SettingsPageViewModel( INavigationService navigationService, ILoggerService loggerService, IUserDataRepository userDataRepository, IExposureDataRepository exposureDataRepository, IExposureConfigurationRepository exposureConfigurationRepository, ISendEventLogStateRepository sendEventLogStateRepository, IEventLogRepository eventLogRepository, ILogFileService logFileService, AbsExposureNotificationApiService exposureNotificationApiService, ICloseApplicationService closeApplicationService, IEssentialsService essentialsService ) : base(navigationService) { Title = AppResources.SettingsPageTitle; AppVer = essentialsService.AppVersion; this.loggerService = loggerService; this.userDataRepository = userDataRepository; this.exposureDataRepository = exposureDataRepository; this.exposureConfigurationRepository = exposureConfigurationRepository; _sendEventLogStateRepository = sendEventLogStateRepository; _eventLogRepository = eventLogRepository; this.logFileService = logFileService; this.exposureNotificationApiService = exposureNotificationApiService; this.closeApplicationService = closeApplicationService; }
public LogPeriodicDeleteReceiver() { var essensialService = new EssentialsService(); var logPathService = new LogPathService(new LogPathServiceAndroid()); loggerService = new LoggerService(logPathService, essensialService); logFileService = new Covid19Radar.Services.Logs.LogFileService(loggerService, logPathService); }
public LogPeriodicDeleteService( ILoggerService loggerService, ILogFileService logFileService ) { this.loggerService = loggerService; this.logFileService = logFileService; }
public SettingsPageViewModel(INavigationService navigationService, ILoggerService loggerService, IUserDataService userDataService, ExposureNotificationService exposureNotificationService, ILogFileService logFileService) : base(navigationService, exposureNotificationService) { Title = AppResources.SettingsPageTitle; AppVer = AppInfo.VersionString;// AppSettings.Instance.AppVersion; this.loggerService = loggerService; this.userDataService = userDataService; _UserData = this.userDataService.Get(); this.exposureNotificationService = exposureNotificationService; this.logFileService = logFileService; }
public void RefreshAppliedRules() { _refreshTimer.Stop(); ILogFileService logFileService = Mvx.Resolve <ILogFileService>(); if (logFileService.CurrentLogFile != null) { CheckRules(logFileService.CurrentLogFile.Lines); } }
public SettingsPageViewModel(INavigationService navigationService, ILoggerService loggerService, IUserDataService userDataService, IHttpDataService httpDataService, IExposureNotificationService exposureNotificationService, ILogFileService logFileService, ITermsUpdateService termsUpdateService) : base(navigationService) { Title = AppResources.SettingsPageTitle; AppVer = AppInfo.VersionString; this.loggerService = loggerService; this.userDataService = userDataService; this.httpDataService = httpDataService; this.exposureNotificationService = exposureNotificationService; this.logFileService = logFileService; this.termsUpdateService = termsUpdateService; }
public SendLogConfirmationPageViewModel( INavigationService navigationService, ILogFileService logFileService, ILoggerService loggerService, ILogUploadService logUploadService, ILogPathService logPathService) : base(navigationService) { this.loggerService = loggerService; this.logFileService = logFileService; this.logUploadService = logUploadService; this.logPathService = logPathService; }
public InqueryPageViewModel( INavigationService navigationService, ILoggerService loggerService, ILogFileService logFileService, ILogPathService logPathService, IEssentialsService essentialsService ) : base(navigationService) { Title = AppResources.InqueryPageTitle; this.loggerService = loggerService; this.logFileService = logFileService; this.logPathService = logPathService; this.essentialsService = essentialsService; }
protected override void OnInitialized() { InitializeComponent(); LoggerService = Container.Resolve <ILoggerService>(); LoggerService.StartMethod(); LogFileService = Container.Resolve <ILogFileService>(); LogFileService.SetSkipBackupAttributeToLogDir(); LogUnobservedTaskExceptions(); FirstLoad = false; LoggerService.EndMethod(); }
protected override async void OnInitialized() { InitializeComponent(); LoggerService = Container.Resolve <ILoggerService>(); LoggerService.StartMethod(); LogFileService = Container.Resolve <ILogFileService>(); LogFileService.AddSkipBackupAttribute(); #if USE_MOCK // For debug mode, set the mock api provider to interact // with some fake data Xamarin.ExposureNotifications.ExposureNotification.OverrideNativeImplementation(new Services.TestNativeImplementation()); #endif Xamarin.ExposureNotifications.ExposureNotification.Init(); // var enabled = await Xamarin.ExposureNotifications.ExposureNotification.IsEnabledAsync(); // App.LoggerService.Info($"IsEnabledAsync is {enabled}"); // Local Notification tap event listener //NotificationCenter.Current.NotificationTapped += OnNotificationTapped; LogUnobservedTaskExceptions(); INavigationResult result = await NavigationService.NavigateAsync("/" + nameof(SplashPage)); if (!result.Success) { LoggerService.Info($"Failed transition."); MainPage = new ExceptionPage { BindingContext = new ExceptionPageViewModel() { Message = result.Exception.Message } }; System.Diagnostics.Debugger.Break(); } LoggerService.EndMethod(); }
public SettingsPageViewModel( INavigationService navigationService, ILoggerService loggerService, IUserDataRepository userDataRepository, IExposureDataRepository exposureDataRepository, IExposureConfigurationRepository exposureConfigurationRepository, ILogFileService logFileService, AbsExposureNotificationApiService exposureNotificationApiService, ICloseApplicationService closeApplicationService ) : base(navigationService) { Title = AppResources.SettingsPageTitle; AppVer = AppInfo.VersionString; this.loggerService = loggerService; this.userDataRepository = userDataRepository; this.exposureDataRepository = exposureDataRepository; this.exposureConfigurationRepository = exposureConfigurationRepository; this.logFileService = logFileService; this.exposureNotificationApiService = exposureNotificationApiService; this.closeApplicationService = closeApplicationService; }
public FileLogSink(IFileSystemService fileSystemService, ILogFormatterService logFormatterService, ILogFileService logFileService) { _fileSystemService = fileSystemService ?? throw new ArgumentNullException(nameof(fileSystemService)); _logFormatterService = logFormatterService ?? throw new ArgumentNullException(nameof(logFormatterService)); _logFileService = logFileService ?? throw new ArgumentNullException(nameof(logFileService)); }
public LogController(ILogFileService logFileService) { _logFileService = logFileService ?? throw new System.ArgumentNullException(nameof(logFileService)); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILogService logService, ILogMessageFactory logMessageFactory, IConnectionProvider connectionProvider, IMqttRepository repository, IMqttCommandAdapter commandAdapter, IAdapterSettingService adapterSettingService, IUiConfigurationService uiConfigurationService, INotificationService notificationService, ISettingsService settingsService, IFileSystemService fileSystemService, ILogFormatterService logFormatterService, ILogFileService logFileService, ISettingsProvider settingsProvider) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Home/Error"); } app.UseStaticFiles(); app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllerRoute( name: "default", pattern: "{controller=Home}/{action=Index}/{id?}"); }); settingsProvider.ReadSettings(); logService.RegisterSinks(new List <IlogSink> { new ConsoleLogSink(), new MemoryLogSink(logMessageFactory, notificationService), new FileLogSink(fileSystemService, logFormatterService, logFileService) }); if (Debugger.IsAttached) { logService.RegisterSink(new DebugLogSink()); } logService.Log(LogSeverity.Info, "Logging started."); var repo = new DatabaseRepository(); repo.InitializeDatabase(); commandAdapter.Initialize(); connectionProvider.InitializeConnection(); repository.Initialize(); adapterSettingService.Initialize(); uiConfigurationService.ReadAllConfigurationFiles(); ConfigureSystemSpecifics(app.ApplicationServices); app.ApplicationServices.GetService <ICustomCommandConfigurationService>().ReloadConfiguration(); }
public MainViewModel(ILogFileService logService, IOpenFileService fileService) { _logService = logService; _fileService = fileService; }
public MyLogger(ILogDatabaseService databaseService, ILogFileService fileService, ILogConsoleService consoleService) { _databaseService = databaseService; _fileService = fileService; _consoleService = consoleService; }
public LogFilesViewModel(IWebSevices web, IUserSettings settings, IConnection con, ILogFileService log) : base(settings, web, con) { logService = log; }
/// <summary> /// Initializes a new instance of the <see cref="ScriptLoggerController"/> class. /// </summary> /// <param name="logFileService">The log file service.</param> public ScriptLoggerController(ILogFileService logFileService) { this.logFileService = logFileService; }
/// <summary> /// Initialization injection ILogFileService via DI /// </summary> /// <param name="logFileService"></param> public CalculationController(ILogFileService logFileService) { _logFileService = logFileService; }
public LogFileParser(LogItemParser itemParser, IFileReader fileReader, ILogFileService fileService) { ItemParser = itemParser ?? throw new System.ArgumentNullException(nameof(itemParser)); FileReader = fileReader ?? throw new System.ArgumentNullException(nameof(fileReader)); FileService = fileService; }
public LogFileApi(ILogFileService logFileService) { _logFileService = logFileService; }
public CalculationControllerTests() { _logService = new Mock <ILogFileService>().Object; }
public LogPeriodicDeleteServiceIos() { loggerService = DependencyService.Resolve <ILoggerService>(); logFileService = DependencyService.Resolve <ILogFileService>(); }
protected override async void OnInitialized() { InitializeComponent(); LoggerService = Container.Resolve <ILoggerService>(); LoggerService.StartMethod(); LogFileService = Container.Resolve <ILogFileService>(); LogFileService.AddSkipBackupAttribute(); #if USE_MOCK // For debug mode, set the mock api provider to interact // with some fake data Xamarin.ExposureNotifications.ExposureNotification.OverrideNativeImplementation(new Services.TestNativeImplementation()); #endif Xamarin.ExposureNotifications.ExposureNotification.Init(); // Local Notification tap event listener //NotificationCenter.Current.NotificationTapped += OnNotificationTapped; LogUnobservedTaskExceptions(); INavigationResult result; // Check user data and skip tutorial IUserDataService userDataService = Container.Resolve <IUserDataService>(); if (userDataService.IsExistUserData) { LoggerService.Info("User data exists"); var userData = userDataService.Get(); LoggerService.Info($"userData.IsOptined: {userData.IsOptined}"); LoggerService.Info($"userData.IsPolicyAccepted: {userData.IsPolicyAccepted}"); if (userData.IsOptined && userData.IsPolicyAccepted) { LoggerService.Info($"Transition to SplashPage"); result = await NavigationService.NavigateAsync("/" + nameof(SplashPage)); } else { LoggerService.Info($"Transition to TutorialPage1"); result = await NavigationService.NavigateAsync("/" + nameof(TutorialPage1)); } } else { LoggerService.Info("No user data exists"); LoggerService.Info($"Transition to TutorialPage1"); result = await NavigationService.NavigateAsync("/" + nameof(TutorialPage1)); } if (!result.Success) { LoggerService.Info($"Failed transition."); MainPage = new ExceptionPage { BindingContext = new ExceptionPageViewModel() { Message = result.Exception.Message } }; System.Diagnostics.Debugger.Break(); } LoggerService.EndMethod(); }
public StatusBarViewModel(ILogFileService logService) { _logService = logService; logService.LogFileChanged += logService_LogFileChanged; CurrentLog = logService.CurrentLogFile; }
public DeleteOldLogsOperation(ILoggerService loggerService, ILogFileService logFileService) { this.loggerService = loggerService; this.logFileService = logFileService; }