語言

JsonRpcIgnoreAttribute 類別

定義

屬性用來識別 不 應該在 RPC 上呼叫的方法。

[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public class JsonRpcIgnoreAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type JsonRpcIgnoreAttribute = class
    inherit Attribute
Public Class JsonRpcIgnoreAttribute
Inherits Attribute
繼承
JsonRpcIgnoreAttribute
屬性

備註

當透過 或其他 API 加入 RPC 目標物件 AddLocalRpcTarget(Object) 時,物件上的所有公開方法預設會被用戶端呼叫。 當 AllowNonPublicInvocation 設定時,會暴露出更多方法。 將此屬性套用於任何方法,將確保 RPC 用戶端永遠無法直接呼叫該方法。

若 JsonRpcMethodAttribute 和 JsonRpcIgnoreAttribute 應用於同一方法,則在將該物件加入為 RPC 目標時會拋出例外。

建構函式

名稱 Description
JsonRpcIgnoreAttribute()

屬性用來識別 不 應該在 RPC 上呼叫的方法。

適用於