Browse Source

Check if uri scheme is registered so tests won't fall apart

pull/2104/head
Nikita Tsukanov 8 years ago
parent
commit
d69116b475
  1. 11
      src/Shared/PlatformSupport/AssetLoader.cs

11
src/Shared/PlatformSupport/AssetLoader.cs

@ -385,10 +385,13 @@ namespace Avalonia.Shared.PlatformSupport
public static void RegisterResUriParsers()
{
UriParser.Register(new GenericUriParser(GenericUriParserOptions.GenericAuthority |
GenericUriParserOptions.NoUserInfo |
GenericUriParserOptions.NoPort | GenericUriParserOptions.NoQuery |
GenericUriParserOptions.NoFragment), "avares", -1);
if (!UriParser.IsKnownScheme("avares"))
UriParser.Register(new GenericUriParser(
GenericUriParserOptions.GenericAuthority |
GenericUriParserOptions.NoUserInfo |
GenericUriParserOptions.NoPort |
GenericUriParserOptions.NoQuery |
GenericUriParserOptions.NoFragment), "avares", -1);
}
}
}

Loading…
Cancel
Save