PathString 結構

定義

當需要重新建構要求或重新導向 URI 字串時,提供 Path 和 PathBase 值的正確逸出

public value class PathString : IEquatable<Microsoft::AspNetCore::Http::PathString>
public struct PathString : IEquatable<Microsoft.AspNetCore.Http.PathString>
[System.ComponentModel.TypeConverter(typeof(Microsoft.AspNetCore.Http.PathStringConverter))]
public struct PathString : IEquatable<Microsoft.AspNetCore.Http.PathString>
public readonly struct PathString : IEquatable<Microsoft.AspNetCore.Http.PathString>
[System.ComponentModel.TypeConverter(typeof(Microsoft.AspNetCore.Http.PathStringConverter))]
public readonly struct PathString : IEquatable<Microsoft.AspNetCore.Http.PathString>
type PathString = struct
[<System.ComponentModel.TypeConverter(typeof(Microsoft.AspNetCore.Http.PathStringConverter))>]
type PathString = struct
Public Structure PathString
Implements IEquatable(Of PathString)
繼承
PathString
屬性
實作

建構函式

PathString(String)

初始化具有給定值的路徑字串。 此值必須為未逸出格式。 若您有逸出格式的路徑值,請使用 PathString.FromUriComponent(值)。

欄位

Empty

表示空路徑。 此欄位是唯讀的。

屬性

HasValue

若路徑不為空則為 True

Value

未逸出的路徑值

方法

Add(PathString)

新增二個 PathString 執行個體至組合的 PathString 值。

Add(QueryString)

組合 PathString 和 QueryString 到加入的 URI 格式化字串值。

Equals(Object)

比較此 PathString 值和其他值。 預設比較為 StringComparison.OrdinalIgnoreCase。

Equals(PathString)

比較此 PathString 值和其他值。 預設比較為 StringComparison.OrdinalIgnoreCase。

Equals(PathString, StringComparison)

使用特定的 StringComparison 類型比較此 PathString 值和其他值

FromUriComponent(String)

傳回給字路徑為 URI 格式逸出的 PathString 。 字串不能含任何不是路徑的值。

FromUriComponent(Uri)

根據來自 URI 物件的路徑傳回 PathString。 擷取不支援的 URI 物件。

GetHashCode()

傳回 PathString 值的雜湊碼。 雜湊碼由 OrdinalIgnoreCase implementation 提供。

StartsWithSegments(PathString)

判斷這個 PathString 實例的開頭是否符合指定的 PathString

StartsWithSegments(PathString, PathString)

判斷這個 PathString 實例的開頭是否符合指定的 PathString ,並傳回其餘的區段。

StartsWithSegments(PathString, PathString, PathString)

判斷這個 PathString 實例的開頭是否符合指定的 PathString ,並傳回相符和剩餘的區段。

StartsWithSegments(PathString, StringComparison)

使用指定的比較選項,判斷這個 PathString 實例的開頭是否符合指定的 PathString

StartsWithSegments(PathString, StringComparison, PathString)

判斷這個 PathString 實例 PathString 的開頭是否符合使用指定的比較選項來比較指定的 ,並傳回其餘的區段。

StartsWithSegments(PathString, StringComparison, PathString, PathString)

使用指定的比較選項來判斷這個 PathString 實例的開頭是否符合指定的 PathString ,並傳回相符和剩餘的區段。

ToString()

提供路徑字串,其逸出方法對於結合至 URI 表示式來說是正確的。

ToUriComponent()

提供路徑字串,其逸出方法對於結合至 URI 表示式來說是正確的。

運算子

Addition(PathString, PathString)

Add 的運算子呼叫

Addition(PathString, QueryString)

Add 的運算子呼叫

Addition(PathString, String)

當需要重新建構要求或重新導向 URI 字串時,提供 Path 和 PathBase 值的正確逸出

Addition(String, PathString)

當需要重新建構要求或重新導向 URI 字串時,提供 Path 和 PathBase 值的正確逸出

Equality(PathString, PathString)

Equals 的運算子呼叫

Implicit(PathString to String)

隱含呼叫 ToString () 。

Implicit(String to PathString)

從指定的字串隱含建立新的 PathString。

Inequality(PathString, PathString)

Equals 的運算子呼叫

適用於