[System] UriKind.RelativeOrAbsolute workaround.
authorMarcos Henrich <marcos.henrich@xamarin.com>
Thu, 23 Jul 2015 17:56:33 +0000 (18:56 +0100)
committerMarcos Henrich <marcos.henrich@xamarin.com>
Fri, 24 Jul 2015 08:58:41 +0000 (09:58 +0100)
commitaab7e2a47dad27e048ade9e83d834c6252d9fe69
tree1c9d9c5cee91c1bbaa39d467ec94eee8e6a81347
parentae2f50e57fb39a005a80303d21a956e89ec36a8b
[System] UriKind.RelativeOrAbsolute workaround.

In .NET an URI constructor from "/foo" and UriKind.RelativeOrAbsolute is
relative whereas in mono it is assumed as an absolute file path.

This provides supports for an easy workaround to make mono behave as
.NET.

The workaround consists in defining DotNetRelativeOrAbsolute and using
it instead of UriKind.RelativeOrAbsolute.

DotNetRelativeOrAbsolute should be defined as follows:

static UriKind DotNetRelativeOrAbsolute = (Type.GetType ("Mono.Runtime")
== null)? UriKind.RelativeOrAbsolute : (UriKind) 300;
mcs/class/System/System/Uri.cs
mcs/class/System/Test/System/UriTest.cs