PathString Structure

Provides correct escaping for Path and PathBase values when needed to reconstruct a request or redirect URI string.

Namespace:  Microsoft.Owin
Assembly:  Microsoft.Owin (in Microsoft.Owin.dll)

Syntax

'Declaration
Public Structure PathString _
    Implements IEquatable(Of PathString)
'Usage
Dim instance As PathString
public struct PathString : IEquatable<PathString>
public value class PathString : IEquatable<PathString>
[<SealedAttribute>]
type PathString =  
    struct 
        interface IEquatable<PathString>
    end
JScript suports the use of structures, but not the declaration of new ones.

The PathString type exposes the following members.

Constructors

  Name Description
Public method PathString Initialize the path string with a given value. This value must be in unescaped format. Use PathString.FromUriComponent(value) if you have a path value which is in an escaped format.

Top

Properties

  Name Description
Public property HasValue True if the path is not empty.
Public property Value The unescaped path value.

Top

Methods

  Name Description
Public method Add(PathString) Adds two PathString instances into a combined PathString value.
Public method Add(QueryString) Combines a PathString and QueryString into the joined URI formatted string value.
Public method Equals(Object) Compares this PathString value to another value. The default comparison is StringComparison.OrdinalIgnoreCase. (Overrides ValueType.Equals(Object).)
Public method Equals(PathString) Compares this PathString value to another value. The default comparison is StringComparison.OrdinalIgnoreCase.
Public method Equals(PathString, StringComparison) Compares this PathString value to another value using a specific StringComparison type.
Public methodStatic member FromUriComponent(String) Returns an PathString given the path as it is escaped in the URI format. The string MUST NOT contain any value that is not a path.
Public methodStatic member FromUriComponent(Uri) Returns a PathString given the path as from a Uri object. Relative Uri objects are not supported.
Public method GetHashCode Returns the hash code for the PathString value. The hash code is provided by the OrdinalIgnoreCase implementation. (Overrides ValueType.GetHashCode().)
Public method GetType (Inherited from Object.)
Public method StartsWithSegments(PathString)
Public method StartsWithSegments(PathString, PathString%)
Public method ToString Provides the path string escaped in a way which is correct for combining into the URI representation. (Overrides ValueType.ToString().)
Public method ToUriComponent Provides the path string escaped in a way which is correct for combining into the URI representation.

Top

Operators

  Name Description
Public operatorStatic member Addition(PathString, PathString) Operator call through to Add.
Public operatorStatic member Addition(PathString, QueryString) Operator call through to Add.
Public operatorStatic member Equality Operator call through to Equals.
Public operatorStatic member Inequality Operator call through to Equals.

Top

Fields

  Name Description
Public fieldStatic member Empty Represents the empty path. This field is read-only.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Owin Namespace