mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add out of bound exception for pattern matching
This commit is contained in:
parent
a806f7d05a
commit
4d5119f17d
1 changed files with 3 additions and 2 deletions
|
|
@ -61,7 +61,7 @@ namespace Flow.Launcher.Infrastructure.Http
|
|||
{
|
||||
(_proxy.Address, _proxy.Credentials) = property switch
|
||||
{
|
||||
ProxyProperty.Enabled => (Proxy.Enabled) switch
|
||||
ProxyProperty.Enabled => Proxy.Enabled switch
|
||||
{
|
||||
true => Proxy.UserName switch
|
||||
{
|
||||
|
|
@ -75,7 +75,8 @@ namespace Flow.Launcher.Infrastructure.Http
|
|||
ProxyProperty.Server => (new Uri($"http://{Proxy.Server}:{Proxy.Port}"), _proxy.Credentials),
|
||||
ProxyProperty.Port => (new Uri($"http://{Proxy.Server}:{Proxy.Port}"), _proxy.Credentials),
|
||||
ProxyProperty.UserName => (_proxy.Address, new NetworkCredential(Proxy.UserName, Proxy.Password)),
|
||||
ProxyProperty.Password => (_proxy.Address, new NetworkCredential(Proxy.UserName, Proxy.Password))
|
||||
ProxyProperty.Password => (_proxy.Address, new NetworkCredential(Proxy.UserName, Proxy.Password)),
|
||||
_ => throw new ArgumentOutOfRangeException()
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue