TryCreate()

Uri::TryCreate(const String&, UriKind, SharedPtr<Uri>&) method

Constructs a Uri object that represents the specified URI; an argument specifies the URI kind.

static bool System::Uri::TryCreate(const String &uriString, UriKind uriKind, SharedPtr<Uri> &result)

Arguments

ParameterTypeDescription
uriStringconst String&The string URI to be represented by the object being constructed
uriKindUriKindSpecifies the URI kind
resultSharedPtr<Uri>&The output argument that, if the construction succeeds, points to the newly constructed Uri object on method return

Return Value

True if the construction succeeded, otherwise - false

Uri::TryCreate(const SharedPtr<Uri>&, const String&, SharedPtr<Uri>&) method

Constructs an Uri abject from the specified Uri object representing the base URI and the string representation of relative URI.

static bool System::Uri::TryCreate(const SharedPtr<Uri> &baseUri, const String &relativeUri, SharedPtr<Uri> &result)

Arguments

ParameterTypeDescription
baseUriconst SharedPtr<Uri>&The base URI
relativeUriconst String&The relative URI that is added to the base URI
resultSharedPtr<Uri>&The output argument that, if the construction succeeds, points to the newly constructed Uri object on method return

Return Value

True if the construction succeeded, otherwise - false

Uri::TryCreate(const SharedPtr<Uri>&, const SharedPtr<Uri>&, SharedPtr<Uri>&) method

Constructs an Uri abject from the specified base and relative URIs.

static bool System::Uri::TryCreate(const SharedPtr<Uri> &baseUri, const SharedPtr<Uri> &relativeUri, SharedPtr<Uri> &result)

Arguments

ParameterTypeDescription
baseUriconst SharedPtr<Uri>&The base URI
relativeUriconst SharedPtr<Uri>&The relative URI that is added to the base URI
resultSharedPtr<Uri>&The output argument that, if the construction succeeds, points to the newly constructed Uri object on method return

Return Value

True if the construction succeeded, otherwise - false

See Also