JsonRpcIgnoreAttribute 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
用于标识 不应 通过 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
- 属性
注解
通过 AddLocalRpcTarget(Object) 或其他 API 添加 RPC 目标对象时,对象上的所有公共方法默认都公开给客户端的调用。 设置后 AllowNonPublicInvocation ,还会公开更多方法。 将此属性应用于任何方法可确保 RPC 客户端永远无法直接调用此属性。
如果 JsonRpcMethodAttribute 并 JsonRpcIgnoreAttribute 应用于同一方法,则会在将对象添加为 RPC 目标时引发异常。
构造函数
| 名称 | 说明 |
|---|---|
| JsonRpcIgnoreAttribute() |
用于标识 不应 通过 RPC 调用的方法的属性。 |