Contract.Requires(completeURL.IsUri()); // Error: Contract.Requires(completeURL != null)
Can I do this without Contract.Assume()?
I mean something like this:
[Pure]
[DefinitelyNotANullStringAfterThatMethod]
public static bool IsUri(this string str)
{
return Uri.IsWellFormedUriString(str, UriKind.Absolute);
}
Maybe?