Пример #1
0
        public LogService(StorageService storageService, SystemStatusService systemStatusService)
        {
            _systemStatusService = systemStatusService ?? throw new ArgumentNullException(nameof(systemStatusService));

            if (!storageService.TryReadOrCreate(out _options, LogServiceOptions.Filename))
            {
                _options = new LogServiceOptions();
            }
        }
Пример #2
0
        public LogService(StorageService storageService, SystemStatusService systemStatusService)
        {
            _systemStatusService = systemStatusService ?? throw new ArgumentNullException(nameof(systemStatusService));

            if (storageService is null)
            {
                throw new ArgumentNullException(nameof(storageService));
            }
            if (!storageService.SafeReadSerializedValue(out _options, DefaultDirectoryNames.Configuration, LogServiceOptions.Filename))
            {
                _options = new LogServiceOptions();
            }
        }