JsonRpcMethodAttribute Class

Definition

Attribute which changes the name by which this method can be invoked over JSON-RPC. If applied on a method, the method's CLR name can no longer be used for remote invocation.

[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public class JsonRpcMethodAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type JsonRpcMethodAttribute = class
    inherit Attribute
Public Class JsonRpcMethodAttribute
Inherits Attribute
Inheritance
JsonRpcMethodAttribute
Attributes

Remarks

This attribute should be used when rpc message method names can be different from the actual CLR method names. Useful in cases where rpc message method names contain illegal characters for CLR method names, i.e. "text/OnDocumentChanged".

If methods are overloaded, each overload must define its own JsonRpcMethodAttribute with all the same values. Conflicts will result in error being thrown during JsonRpc construction.

If methods are overridden, the base class can define a JsonRpcMethodAttribute and derived classes will inherit the attribute. If derived class and base class have conflicting JsonRpcMethodAttribute values for a method, an error will be thrown during JsonRpc construction.

Constructors

JsonRpcMethodAttribute()

Initializes a new instance of the JsonRpcMethodAttribute class.

JsonRpcMethodAttribute(String)

Initializes a new instance of the JsonRpcMethodAttribute class.

Properties

Name

Gets the public RPC name by which this method will be invoked.

UseSingleObjectParameterDeserialization

Gets or sets a value indicating whether JSON-RPC named arguments should all be deserialized into this method's first parameter.

Applies to