31 instantiations of ConfigSourceException
aspire (24)
Configuration\ConfigSource.cs (4)
47throw new ConfigSourceException(ConfigSourceStrings.InvalidBinding); 73throw new ConfigSourceException(ConfigSourceStrings.InvalidRepository); 80throw new ConfigSourceException(ConfigSourceStrings.InvalidPath); 95throw new ConfigSourceException(ConfigSourceStrings.InvalidRef);
Configuration\ConfigSourceService.cs (20)
156throw new ConfigSourceException(string.Format(CultureInfo.CurrentCulture, 182throw new ConfigSourceException(ConfigSourceStrings.ConsentRequired); 226?? throw new ConfigSourceException(ConfigSourceStrings.ConfigLockFailed); 235throw new ConfigSourceException(ConfigSourceStrings.BindingChanged); 268throw new ConfigSourceException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.InvalidJsonInConfigFile, path, ex.Message)); 383?? throw new ConfigSourceException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationFileMustBeJsonObject, path)) 401?? throw new ConfigSourceException(ConfigSourceStrings.InvalidBinding); 404throw new ConfigSourceException(ConfigSourceStrings.InvalidBinding); 411throw new ConfigSourceException(ConfigSourceStrings.InvalidBinding); 516throw new ConfigSourceException(ConfigSourceStrings.InvalidCache); 521throw new ConfigSourceException(ConfigSourceStrings.InvalidCache); 565throw new ConfigSourceException(ConfigSourceStrings.InvalidConfiguration); 572?? throw new ConfigSourceException(ConfigSourceStrings.InvalidConfiguration); 579throw new ConfigSourceException(ConfigSourceStrings.NestedSource); 592throw new ConfigSourceException(ConfigSourceStrings.InvalidConfiguration); 601throw new ConfigSourceException(ConfigSourceStrings.GitTimeout) 623throw new ConfigSourceException(ConfigSourceStrings.GitTimeout) 642throw new ConfigSourceException(ConfigSourceStrings.RepositoryUnavailable); 659throw new ConfigSourceException(ConfigSourceStrings.MissingFile); 666new(exception.Failure switch
Aspire.Cli.Tests (7)
Commands\ConfigSourceCommandTests.cs (4)
62? throw new ConfigSourceException(ConfigSourceStrings.GitTimeout) { GitOutput = prompt } 270git.ReadConfiguration = (_, _) => throw new ConfigSourceException(timeout ? ConfigSourceStrings.GitTimeout : ConfigSourceStrings.AuthenticationFailed) 332git.InspectConfiguration = (_, _) => throw new ConfigSourceException(ConfigSourceStrings.AuthenticationFailed); 1046git.ReadConfiguration = (_, _) => throw new ConfigSourceException(ConfigSourceStrings.AuthenticationFailed);
Configuration\ConfigSourceServiceTests.cs (3)
277throw new ConfigSourceException("Source unavailable"); 1118git.InspectConfiguration = (_, _) => throw new ConfigSourceException(ConfigSourceStrings.AuthenticationFailed); 1236throw new ConfigSourceException("Test acquisition failed");
35 references to ConfigSourceException
aspire (5)
Commands\BaseCommand.cs (1)
186catch (ConfigSourceException ex)
Configuration\ConfigSourceService.cs (4)
351catch (Exception ex) when (!force && ex is ConfigSourceException or JsonException or IOException or UnauthorizedAccessException or TimeoutException) 360var message = exception is ConfigSourceException 363ReportOnce(message, (exception as ConfigSourceException)?.GitOutput); 665private static ConfigSourceException TranslateGitFailure(GitCommandException exception) =>
Aspire.Cli.Tests (30)
Configuration\AspireConfigFileTests.cs (2)
87var error = Assert.Throws<ConfigSourceException>(result.ConfigSource.Validate);
Configuration\ConfigSourceServiceGitTests.cs (15)
65var error = await Assert.ThrowsAsync<ConfigSourceException>(() => client.AcquireAsync(source, workspace.Path, TestContext.Current.CancellationToken)); 100var error = await Assert.ThrowsAsync<ConfigSourceException>(() => client.AcquireAsync(source, workspace.Path, TestContext.Current.CancellationToken, time)); 161var error = await Assert.ThrowsAsync<ConfigSourceException>(RunAsync); 498await Assert.ThrowsAsync<ConfigSourceException>(() => CreateClient(TestHelpers.CreateNonInteractiveHostEnvironment()).AcquireAsync( 508var error = await Assert.ThrowsAsync<ConfigSourceException>(() => CreateClient(TestHelpers.CreateNonInteractiveHostEnvironment()).AcquireAsync( 532var error = await Assert.ThrowsAsync<ConfigSourceException>(() => 629var error = await Assert.ThrowsAsync<ConfigSourceException>(() => client.AcquireAsync( 650var error = await Assert.ThrowsAsync<ConfigSourceException>(() => CreateClient(TestHelpers.CreateNonInteractiveHostEnvironment()).AcquireAsync(
Configuration\ConfigSourceServiceTests.cs (13)
302var error = await Assert.ThrowsAsync<ConfigSourceException>(() => service.CheckProjectAsync(project, force, cancellation.Token)); 624Assert.Throws<ConfigSourceException>(() => new ConfigSource { Repository = repository, Path = s_source.Path }.Validate()); 633Assert.Throws<ConfigSourceException>(() => new ConfigSource { Repository = repository, Path = s_source.Path }.Validate()); 647Assert.Throws<ConfigSourceException>(() => new ConfigSource { Repository = s_source.Repository, Path = path }.Validate()); 678Assert.Throws<ConfigSourceException>(() => new ConfigSource { Repository = s_source.Repository, Path = s_source.Path, Ref = reference }.Validate()).Message); 749var error = await Assert.ThrowsAsync<ConfigSourceException>(() => 763Assert.Equal(ConfigSourceStrings.ConsentRequired, (await Assert.ThrowsAsync<ConfigSourceException>(() => 915await Assert.ThrowsAsync<ConfigSourceException>(() => 1245await Assert.ThrowsAsync<ConfigSourceException>(() => service.CheckProjectAsync(workspace.WorkspaceRoot, true, CancellationToken.None)); 1312var error = await Assert.ThrowsAsync<ConfigSourceException>(() =>