一款简单易用的基础网络通讯组件库。

JsonRpcAttribute 类

适用于JsonRpc的标记

Definition

命名空间: TouchSocket.JsonRpc
程序集: TouchSocket.JsonRpc (在 TouchSocket.JsonRpc.dll 中) 版本:3.0.0+ccaf96084d09f972257496d1dd63b8ba3c1e44f0
C#
[AttributeUsageAttribute(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
[DynamicMethodAttribute]
public sealed class JsonRpcAttribute : RpcAttribute
Inheritance
Object    Attribute    RpcAttribute    JsonRpcAttribute

构造函数

JsonRpcAttribute 适用于JsonRpc的标记
JsonRpcAttribute(Boolean) 适用于JsonRpc的标记.

是否仅以函数名调用,当为True是,调用时仅需要传入方法名即可。


已过时。
JsonRpcAttribute(String) 适用于JsonRpc的标记.
已过时。

属性

ClassCodeGenerator 类生成器
(继承自 RpcAttribute。)
Exceptions 异常提示
(继承自 RpcAttribute。)
GeneratorFlag 生成代码
(继承自 RpcAttribute。)
GenericConstraintTypes 生成泛型方法的约束
(继承自 RpcAttribute。)
InvokeKey 调用键。
(继承自 RpcAttribute。)
MethodInvoke 是否仅以函数名调用,当为True是,调用时仅需要传入方法名即可。
(继承自 RpcAttribute。)
MethodName 重新指定生成的函数名称。可以使用类似“JsonRpc_{0}”的模板格式。
(继承自 RpcAttribute。)
Namespaces 生成代理时,额外的命名空间
(继承自 RpcAttribute。)
PropertyNames 获取或设置属性名称的字典。
(继承自 RpcAttribute。)
TypeIdWhen implemented in a derived class, gets a unique identifier for this Attribute.
(继承自 Attribute。)

方法

EqualsReturns a value that indicates whether this instance is equal to a specified object.
(继承自 Attribute。)
GetDescription 获取注释信息
(继承自 RpcAttribute。)
GetExtensionsMethodProxyCode 获取扩展的代理代码
(继承自 RpcAttribute。)
GetGenericConstraintTypes 获取生成的函数泛型限定名称。默认IRpcClient
(重写 RpcAttributeGetGenericConstraintTypes)
GetHashCodeReturns the hash code for this instance.
(继承自 Attribute。)
GetInstanceProxyCode 获取生成实体类时的代码块
(继承自 RpcAttribute。)
GetInterfaceProxyCode 获取接口的代理代码
(继承自 RpcAttribute。)
GetInvokeKey 获取调用键
(继承自 RpcAttribute。)
GetInvokeOption 获取调用配置
(继承自 RpcAttribute。)
GetMethodName 获取生成的函数名称
(继承自 RpcAttribute。)
GetParameters 根据指定的RPC方法获取参数信息。
(继承自 RpcAttribute。)
GetProxyParameterName 从类型获取代理名
(继承自 RpcAttribute。)
GetReturn 获取返回值
(继承自 RpcAttribute。)
GetTypeGets the Type of the current instance.
(继承自 Object。)
IsDefaultAttributeWhen overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.
(继承自 Attribute。)
MatchWhen overridden in a derived class, returns a value that indicates whether this instance equals a specified object.
(继承自 Attribute。)
ToStringReturns a string that represents the current object.
(继承自 Object。)

扩展方法

Map
(由 Mapper 定义。)
Map
(由 Mapper 定义。)
MapTTarget
(由 Mapper 定义。)
ToJsonString 转换为Json
(由 SerializeConvert 定义。)

参见