forked from Astn/JSON-RPC.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAttributes.cs
More file actions
27 lines (24 loc) · 815 Bytes
/
Attributes.cs
File metadata and controls
27 lines (24 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
namespace AustinHarris.JsonRpc
{
/// <summary>
/// Required to expose a method to the JsonRpc service.
/// </summary>
[AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = true)]
public sealed class JsonRpcMethodAttribute : Attribute
{
readonly string jsonMethodName;
/// <summary>
/// Required to expose a method to the JsonRpc service.
/// </summary>
/// <param name="jsonMethodName">Lets you specify the method name as it will be referred to by JsonRpc.</param>
public JsonRpcMethodAttribute(string jsonMethodName = "")
{
this.jsonMethodName = jsonMethodName;
}
public string JsonMethodName
{
get { return jsonMethodName; }
}
}
}