語言

JsonRpcResult 類別

定義

描述成功方法調用的結果。

[System.Runtime.Serialization.DataContract]
public class JsonRpcResult : StreamJsonRpc.Protocol.JsonRpcMessage
[System.Runtime.Serialization.DataContract]
public class JsonRpcResult : StreamJsonRpc.Protocol.JsonRpcMessage, StreamJsonRpc.Protocol.IJsonRpcMessageWithId
[<System.Runtime.Serialization.DataContract>]
type JsonRpcResult = class
    inherit JsonRpcMessage
[<System.Runtime.Serialization.DataContract>]
type JsonRpcResult = class
    inherit JsonRpcMessage
    interface IJsonRpcMessageWithId
Public Class JsonRpcResult
Inherits JsonRpcMessage
Public Class JsonRpcResult
Inherits JsonRpcMessage
Implements IJsonRpcMessageWithId
繼承
JsonRpcResult
衍生
屬性
實作

建構函式

名稱 Description
JsonRpcResult()

描述成功方法調用的結果。

屬性

名稱 Description
DebuggerDisplay

取得該字串在除錯器中顯示的實例。

Id
已淘汰.

若預期會有回應,則取得或設定由用戶端建立的識別碼。

RequestId

若預期會有回應,則取得或設定由用戶端建立的識別碼。

Result

取得或設定呼叫結果的值(如果有的話)。

ResultDeclaredType

取得或設定回傳值的宣告型別。

Version

取得或設定該訊息所遵循的 JSON-RPC 協定版本。

(繼承來源 JsonRpcMessage)

方法

名稱 Description
GetResult<T>()

得到 的值 Result,考慮任何可能的型別強制。

SetExpectedResultType(Type)

提供延遲反序列化 Result 的提示,說明後續呼叫 GetResult<T>() 時會使用的型別參數。

ToString()

描述成功方法調用的結果。

TryGetTopLevelProperty<T>(String, T)

從收到的訊息中取得頂層屬性,該屬性是 JSON-RPC 規範的延伸。

(繼承來源 JsonRpcMessage)
TrySetTopLevelProperty<T>(String, T)

在訊息中設定一個頂層屬性,作為 JSON-RPC 規範的擴展。

(繼承來源 JsonRpcMessage)

適用於