CreateProtocolRelativeUrl Method
Definition
CreateProtocolRelativeUrl(Uri, Action<ProtocolRelativeUriStringOptions>)
Creates a protocol-relative URL string representation of the specified Uri.
public static string CreateProtocolRelativeUrl(Uri value, Action<ProtocolRelativeUriStringOptions> setup = null)
Parameters
valueUriThe URI to convert.
setupAction<ProtocolRelativeUriStringOptions>The delegate that configures the protocol-relative URL format.
Returns
- string
A protocol-relative URL string representation of
value.
Exceptions
- ArgumentNullException
valueis null.- ArgumentException
valueis not an absolute URI.