Exemple #1
0
        public UserState(ILogger <UserState> logger,
                         IJSRuntime jsRuntime,
                         IServiceProvider serviceProvider,
                         AppState appState,
                         UserIdService userIdService,
                         AuthenticationStateProvider authenticationStateProvider,
                         DatabaseManager databaseManager,
                         NexusOptions options,
                         DataService dataService)
        {
            this.Logger = logger;

            _jsRuntime                   = jsRuntime;
            _serviceProvider             = serviceProvider;
            _appState                    = appState;
            _userIdService               = userIdService;
            _authenticationStateProvider = authenticationStateProvider;
            _databaseManager             = databaseManager;
            _options        = options;
            _dataService    = dataService;
            _codeDefinition = this.CreateCodeDefinition(CodeType.Filter);

            this.VisualizeBeginAtZero = true;
            this.SampleRateValues     = new List <string>();
            this.ExportParameters     = new ExportParameters();

            _appState.PropertyChanged += this.OnAppStatePropertyChanged;

            if (_appState.IsDatabaseInitialized)
            {
                this.Initialize(_databaseManager.Database);
            }
        }
Exemple #2
0
        public AppState(ILogger <AppState> logger,
                        DatabaseManager databaseManager,
                        UserManager userManager,
                        NexusOptions options)
        {
            this.Logger      = logger;
            _databaseManager = databaseManager;
            _userManager     = userManager;
            _options         = options;

            this.CsvRowIndexFormatValues = Utilities.GetEnumValues <CsvRowIndexFormat>();
            this.CodeLanguageValues      = Utilities.GetEnumValues <CodeLanguage>();
            this.CodeTypeValues          = Utilities.GetEnumValues <CodeType>();
            this.FileFormatValues        = Utilities.GetEnumValues <FileFormat>();
            this.FileGranularityValues   = Utilities.GetEnumValues <FileGranularity>();
            this.Version = Assembly.GetEntryAssembly().GetName().Version.ToString();

            if (!string.IsNullOrWhiteSpace(options.DataBaseFolderPath))
            {
                if (!this.TryInitializeApp(out var ex))
                {
                    throw ex;
                }
            }
        }
 public LazyPhysicalFileProvider(NexusOptions options, string relativePath)
 {
     _options      = options;
     _relativePath = relativePath;
 }
 public ApplicationDbContext(NexusOptions options)
 {
     _options = options;
 }