JsonRpc.AddLocalRpcMethod 메서드

정의

오버로드

AddLocalRpcMethod(String, Delegate)

지정된 이름의 RPC 메서드에 대한 처리기를 추가합니다.

AddLocalRpcMethod(MethodInfo, Object, JsonRpcMethodAttribute)

지정된 이름의 RPC 메서드에 대한 처리기를 추가합니다.

AddLocalRpcMethod(String, MethodInfo, Object)

지정된 이름의 RPC 메서드에 대한 처리기를 추가합니다.

AddLocalRpcMethod(String, Delegate)

지정된 이름의 RPC 메서드에 대한 처리기를 추가합니다.

public void AddLocalRpcMethod (string rpcMethodName, Delegate handler);
public void AddLocalRpcMethod (string? rpcMethodName, Delegate handler);
member this.AddLocalRpcMethod : string * Delegate -> unit
Public Sub AddLocalRpcMethod (rpcMethodName As String, handler As Delegate)

매개 변수

rpcMethodName
String

들어오는 JSON-RPC 메시지로 식별되는 메서드의 이름입니다. 여기에 지정된 CLR 메서드/대리자의 이름과 일치하지 않아도 합니다.

handler
Delegate

일치하는 RPC 메시지가 도착할 때 호출할 메서드 또는 대리자입니다. 이 메서드는 들어오는 JSON-RPC 메시지의 매개 변수를 허용할 수 있습니다.

예외

호출된 후 StartListening() 호출 AllowModificationWhileListening 되고 호출되면 throw됩니다 false.

적용 대상

AddLocalRpcMethod(MethodInfo, Object, JsonRpcMethodAttribute)

지정된 이름의 RPC 메서드에 대한 처리기를 추가합니다.

public void AddLocalRpcMethod (System.Reflection.MethodInfo handler, object? target, StreamJsonRpc.JsonRpcMethodAttribute? methodRpcSettings);
member this.AddLocalRpcMethod : System.Reflection.MethodInfo * obj * StreamJsonRpc.JsonRpcMethodAttribute -> unit
Public Sub AddLocalRpcMethod (handler As MethodInfo, target As Object, methodRpcSettings As JsonRpcMethodAttribute)

매개 변수

handler
MethodInfo

일치하는 RPC 메시지가 도착할 때 호출할 메서드 또는 대리자입니다. 이 메서드는 들어오는 JSON-RPC 메시지의 매개 변수를 허용할 수 있습니다.

target
Object

호출을 처리해야 하는 형식을 handler 정의하는 형식의 인스턴스입니다.

methodRpcSettings
JsonRpcMethodAttribute

이 메서드를 처리하는 방법에 대한 설명입니다. 실제로 적용 handler된 특성일 필요는 없습니다. 이 값null이 있더라도 특성은 리플렉션을 handler통해 검색되지 않습니다.

적용 대상

AddLocalRpcMethod(String, MethodInfo, Object)

지정된 이름의 RPC 메서드에 대한 처리기를 추가합니다.

public void AddLocalRpcMethod (string rpcMethodName, System.Reflection.MethodInfo handler, object target);
public void AddLocalRpcMethod (string? rpcMethodName, System.Reflection.MethodInfo handler, object? target);
member this.AddLocalRpcMethod : string * System.Reflection.MethodInfo * obj -> unit
Public Sub AddLocalRpcMethod (rpcMethodName As String, handler As MethodInfo, target As Object)

매개 변수

rpcMethodName
String

들어오는 JSON-RPC 메시지로 식별되는 메서드의 이름입니다. 여기에 지정된 CLR 메서드/대리자의 이름과 일치하지 않아도 합니다.

handler
MethodInfo

일치하는 RPC 메시지가 도착할 때 호출할 메서드 또는 대리자입니다. 이 메서드는 들어오는 JSON-RPC 메시지의 매개 변수를 허용할 수 있습니다.

target
Object

호출을 처리해야 하는 형식을 handler 정의하는 형식의 인스턴스입니다.

예외

호출된 후 StartListening() 호출 AllowModificationWhileListening 되고 호출되면 throw됩니다 false.

적용 대상