Esempio n. 1
0
        public async Task BackupAsync(BackupContext context,
                                      CancellationToken ct)
        {
            var json = await appUISettings.GetAsync(context.AppId, null);

            await context.Writer.WriteJsonAsync(SettingsFile, json, ct);
        }
Esempio n. 2
0
        public async Task Should_writer_user_settings()
        {
            var settings = JsonValue.Object();

            var context = CreateBackupContext();

            A.CallTo(() => appUISettings.GetAsync(appId, null))
            .Returns(settings);

            await sut.BackupAsync(context, ct);

            A.CallTo(() => context.Writer.WriteJsonAsync(A <string> ._, settings, ct))
            .MustHaveHappened();
        }
Esempio n. 3
0
        public async Task <IActionResult> GetSettings(string app)
        {
            var result = await appUISettings.GetAsync(AppId, null);

            return(Ok(result));
        }
Esempio n. 4
0
        public async Task BackupAsync(BackupContext context)
        {
            var json = await appUISettings.GetAsync(context.AppId, null);

            await context.Writer.WriteJsonAsync(SettingsFile, json);
        }
Esempio n. 5
0
        private async Task WriteSettingsAsync(BackupWriter writer, Guid appId)
        {
            var json = await appUISettings.GetAsync(appId, null);

            await writer.WriteJsonAsync(SettingsFile, json);
        }