次の方法で共有


CosmosDbKeyEscape.EscapeKey メソッド

定義

オーバーロード

EscapeKey(String)

キーを、Cosmos DB で安全に使用できる DocumentID に変換します。 Id プロパティでは、次の文字は制限されており、'/'、''、'?'、および '#' では使用できません。 詳細については、 を参照 https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.documents.resource.id?view=azure-dotnetしてください。

EscapeKey(String, String, Boolean)

キーを、Cosmos DB で安全に使用できる DocumentID に変換します。 Id プロパティでは、次の文字は制限されており、'/'、''、'?'、および '#' では使用できません。 詳細については、 を参照 https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.documents.resource.id?view=azure-dotnetしてください。

EscapeKey(String)

キーを、Cosmos DB で安全に使用できる DocumentID に変換します。 Id プロパティでは、次の文字は制限されており、'/'、''、'?'、および '#' では使用できません。 詳細については、 を参照 https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.documents.resource.id?view=azure-dotnetしてください。

public static string EscapeKey(string key);
static member EscapeKey : string -> string
Public Shared Function EscapeKey (key As String) As String

パラメーター

key
String

エスケープするキー。

戻り値

CosmosDB で安全に使用できるエスケープされたキー。

適用対象

EscapeKey(String, String, Boolean)

キーを、Cosmos DB で安全に使用できる DocumentID に変換します。 Id プロパティでは、次の文字は制限されており、'/'、''、'?'、および '#' では使用できません。 詳細については、 を参照 https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.documents.resource.id?view=azure-dotnetしてください。

public static string EscapeKey(string key, string suffix, bool compatibilityMode);
static member EscapeKey : string * string * bool -> string
Public Shared Function EscapeKey (key As String, suffix As String, compatibilityMode As Boolean) As String

パラメーター

key
String

エスケープするキー。

suffix
String

すべての行キーの末尾に追加する文字列。

compatibilityMode
Boolean

True を指定すると、以前の CosmosDb の最大キー長 255 をサポートするために、互換性モードで実行し、キーを切り捨てる必要があります。 この動作は、 を false に設定 CompatibilityMode することでオーバーライドできます。

戻り値

CosmosDB で安全に使用できるエスケープされたキー。

適用対象