38 instantiations of ConfigSourceException
aspire (26)
Configuration\ConfigSource.cs (4)
53throw new ConfigSourceException(ConfigSourceStrings.InvalidBinding); 57throw new ConfigSourceException(ConfigSourceStrings.InvalidRepository); 64throw new ConfigSourceException(ConfigSourceStrings.InvalidPath); 69throw new ConfigSourceException(ConfigSourceStrings.InvalidRef);
Configuration\ConfigSourceService.cs (22)
169throw new ConfigSourceException(string.Format(CultureInfo.CurrentCulture, 187throw new ConfigSourceException(string.Format(CultureInfo.CurrentCulture, 208throw new ConfigSourceException(ConfigSourceStrings.ConsentRequired); 298?? throw new ConfigSourceException(ConfigSourceStrings.ConfigLockFailed); 302throw new ConfigSourceException(ConfigSourceStrings.BindingChanged); 380?? throw new ConfigSourceException(ConfigSourceStrings.ConfigLockFailed); 389throw new ConfigSourceException(ConfigSourceStrings.BindingChanged); 436throw new ConfigSourceException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.InvalidJsonInConfigFile, path, ex.Message)); 537?? throw new ConfigSourceException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationFileMustBeJsonObject, path)); 559?? throw new ConfigSourceException(ConfigSourceStrings.InvalidBinding); 566throw new ConfigSourceException(ConfigSourceStrings.InvalidBinding); 573throw new ConfigSourceException(ConfigSourceStrings.InvalidBinding); 699throw new ConfigSourceException(ConfigSourceStrings.InvalidCache); 704throw new ConfigSourceException(ConfigSourceStrings.InvalidCache); 752?? throw new ConfigSourceException(ConfigSourceStrings.InvalidConfiguration); 759throw new ConfigSourceException(ConfigSourceStrings.NestedSource); 772throw new ConfigSourceException(ConfigSourceStrings.InvalidConfiguration); 781throw new ConfigSourceException(ConfigSourceStrings.GitTimeout) 806throw new ConfigSourceException(ConfigSourceStrings.GitTimeout) 825throw new ConfigSourceException(ConfigSourceStrings.RepositoryUnavailable); 843throw new ConfigSourceException(ConfigSourceStrings.MissingFile); 850new(exception.Failure switch
Aspire.Cli.Tests (12)
Commands\ConfigSourceCommandTests.cs (7)
159? throw new ConfigSourceException(ConfigSourceStrings.GitTimeout) { GitOutput = prompt } 456git.ReadConfiguration = (_, _) => throw new ConfigSourceException(timeout ? ConfigSourceStrings.GitTimeout : ConfigSourceStrings.AuthenticationFailed) 520git.InspectConfiguration = (_, _) => throw new ConfigSourceException(ConfigSourceStrings.AuthenticationFailed); 1422git.ReadConfiguration = (_, _) => throw new ConfigSourceException(ConfigSourceStrings.AuthenticationFailed); 1475git.ReadConfiguration = (_, _) => throw new ConfigSourceException(errorMessage); 1519git.ReadConfiguration = (_, _) => throw new ConfigSourceException(errorMessage); 1554git.ReadConfiguration = (_, _) => throw new ConfigSourceException(ConfigSourceStrings.GitTimeout);
Commands\NewCommandLocalTemplateTests.InitConfig.cs (1)
102ReadConfiguration = (_, _) => throw new ConfigSourceException("Configuration source unavailable.")
Configuration\ConfigSourceServiceTests.cs (4)
425throw new ConfigSourceException("Source unavailable"); 1267ReadConfiguration = (_, _) => throw new ConfigSourceException(ConfigSourceStrings.AuthenticationFailed) 1678git.InspectConfiguration = (_, _) => throw new ConfigSourceException(ConfigSourceStrings.AuthenticationFailed); 1851throw new ConfigSourceException("Test acquisition failed");
40 references to ConfigSourceException
aspire (6)
Commands\BaseCommand.cs (1)
195catch (ConfigSourceException ex)
Configuration\ConfigSourceService.cs (5)
501catch (Exception ex) when (!force && ex is ConfigSourceException or JsonException or IOException or UnauthorizedAccessException or TimeoutException) 510var message = exception is ConfigSourceException 513ReportOnce(message, (exception as ConfigSourceException)?.GitOutput); 659catch (ConfigSourceException ex) 849private static ConfigSourceException TranslateGitFailure(GitCommandException exception) =>
Aspire.Cli.Tests (34)
Commands\ConfigSourceCommandTests.cs (2)
119var exception = await Assert.ThrowsAsync<ConfigSourceException>(() =>
Configuration\AspireConfigFileTests.cs (2)
178var error = Assert.Throws<ConfigSourceException>(result.ConfigSource.Validate);
Configuration\ConfigSourceServiceGitTests.cs (13)
67var error = await Assert.ThrowsAsync<ConfigSourceException>(() => client.AcquireAsync(source, workspace.Path, TestContext.Current.CancellationToken)); 104var error = await Assert.ThrowsAsync<ConfigSourceException>(() => client.AcquireAsync(source, workspace.Path, TestContext.Current.CancellationToken, time)); 166var error = await Assert.ThrowsAsync<ConfigSourceException>(RunAsync); 505await Assert.ThrowsAsync<ConfigSourceException>(() => CreateClient(TestHelpers.CreateNonInteractiveHostEnvironment()).AcquireAsync( 515var error = await Assert.ThrowsAsync<ConfigSourceException>(() => CreateClient(TestHelpers.CreateNonInteractiveHostEnvironment()).AcquireAsync( 612var error = await Assert.ThrowsAsync<ConfigSourceException>(() => client.AcquireAsync( 645var error = await Assert.ThrowsAsync<ConfigSourceException>(() =>
Configuration\ConfigSourceServiceTests.cs (17)
177[InlineData("""{"templateSources":{"enterprise":{"repository":"https://git.example/templates","displayName":42}}}""", typeof(ConfigSourceException))] 760Assert.Throws<ConfigSourceException>(() => new ConfigSource { Repository = repository, Path = s_source.Path }.Validate()); 769Assert.Throws<ConfigSourceException>(() => new ConfigSource { Repository = repository, Path = s_source.Path }.Validate()); 783Assert.Throws<ConfigSourceException>(() => new ConfigSource { Repository = s_source.Repository, Path = path }.Validate()); 814Assert.Throws<ConfigSourceException>(() => new ConfigSource { Repository = s_source.Repository, Path = s_source.Path, Ref = reference }.Validate()).Message); 887var error = await Assert.ThrowsAsync<ConfigSourceException>(() => 980var error = await Assert.ThrowsAsync<ConfigSourceException>(() => 1072Assert.Equal(ConfigSourceStrings.ConsentRequired, (await Assert.ThrowsAsync<ConfigSourceException>(() => 1165var error = await Assert.ThrowsAsync<ConfigSourceException>(() => 1272var exception = await Assert.ThrowsAsync<ConfigSourceException>(() => 1860await Assert.ThrowsAsync<ConfigSourceException>(() => service.CheckProjectAsync(workspace.WorkspaceRoot, true, CancellationToken.None)); 1927var error = await Assert.ThrowsAsync<ConfigSourceException>(() =>