Skip to content

Commit de6a788

Browse files
Kapil Borledaviwil
Kapil Borle
authored andcommitted
Add AbstractMessageType base class for request types
1 parent c31b01f commit de6a788

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
//
2+
// Copyright (c) Microsoft. All rights reserved.
3+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
4+
//
5+
6+
namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol
7+
{
8+
/// <summary>
9+
/// Defines an event type with a particular method name.
10+
/// </summary>
11+
/// <typeparam name="TParams">The parameter type for this event.</typeparam>
12+
public class AbstractMessageType
13+
{
14+
private string _method;
15+
private int _numberOfParams;
16+
17+
/// <summary>
18+
/// Gets the method name for the event type.
19+
/// </summary>
20+
public string Method { get { return _method; } }
21+
22+
/// <summary>
23+
/// Gets the number of parameters.
24+
/// </summary>
25+
public int NumberOfParams { get; }
26+
27+
public AbstractMessageType(string method, int numberOfParams)
28+
{
29+
_method = method;
30+
_numberOfParams = numberOfParams;
31+
}
32+
}
33+
}
34+
35+

0 commit comments

Comments
 (0)