History

Renamed folders and separated GSF.Media and GSF.Net into separate projects.

StephenCWills committed 14 years ago

Commit ac1ef661 parent 45bce55628 files · +733 −461Browse files

Showing the changes to Source/Libraries/GSF.ServiceProcess/ClientRequestHandler.cs (1 of 628 files). Show all

Unified · Split

Source/Libraries/GSF.ServiceProcess/ClientRequestHandler.cs+100−0
@@ -0,0 +1,100 @@
1+//******************************************************************************************************
2+// ClientRequestHandler.cs - Gbtc
3+//
4+// Copyright � 2010, Grid Protection Alliance. All Rights Reserved.
5+//
6+// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
7+// the NOTICE file distributed with this work for additional information regarding copyright ownership.
8+// The GPA licenses this file to you under the Eclipse Public License -v 1.0 (the "License"); you may
9+// not use this file except in compliance with the License. You may obtain a copy of the License at:
10+//
11+// http://www.opensource.org/licenses/eclipse-1.0.php
12+//
13+// Unless agreed to in writing, the subject software distributed under the License is distributed on an
14+// "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
15+// License for the specific language governing permissions and limitations.
16+//
17+// Code Modification History:
18+// ----------------------------------------------------------------------------------------------------
19+// 05/02/2007 - Pinal C. Patel
20+// Generated original version of source code.
21+// 09/30/2008 - J. Ritchie Carroll
22+// Converted to C#.
23+// 03/09/2009 - Pinal C. Patel
24+// Edited code comments.
25+// 09/14/2009 - Stephen C. Wills
26+// Added new header and license agreement.
27+// 10/8/2012 - Danyelle Gilliam
28+// Modified Header
29+//
30+//******************************************************************************************************
31+
32+
33+
34+using System;
35+
36+namespace GSF.ServiceProcess
37+{
38+ /// <summary>
39+ /// Represents a handler for <see cref="ClientRequest"/>s sent by <see cref="ClientHelper"/>.
40+ /// </summary>
41+ /// <seealso cref="ClientHelper"/>
42+ /// <seealso cref="ClientRequest"/>
43+ /// <seealso cref="ServiceHelper"/>
44+ public class ClientRequestHandler
45+ {
46+ #region [ Constructors ]
47+
48+ /// <summary>
49+ /// Initializes a new instance of the <see cref="ClientRequestHandler"/> class.
50+ /// </summary>
51+ /// <param name="requestCommand">Command text that the <see cref="ClientRequestHandler"/> will process.</param>
52+ /// <param name="requestDescription">Description of the <see cref="ClientRequestHandler"/>.</param>
53+ /// <param name="handlerMethod"><see cref="Delegate"/> method that will be invoked for processing the <paramref name="requestCommand"/>.</param>
54+ public ClientRequestHandler(string requestCommand, string requestDescription, Action<ClientRequestInfo> handlerMethod)
55+ : this(requestCommand, requestDescription, handlerMethod, true)
56+ {
57+ }
58+
59+ /// <summary>
60+ /// Initializes a new instance of the <see cref="ClientRequestHandler"/> class.
61+ /// </summary>
62+ /// <param name="requestCommand">Command text that the <see cref="ClientRequestHandler"/> will process.</param>
63+ /// <param name="requestDescription">Description of the <see cref="ClientRequestHandler"/>.</param>
64+ /// <param name="handlerMethod"><see cref="Delegate"/> method that will be invoked for processing the <paramref name="requestCommand"/>.</param>
65+ /// <param name="isAdvertised">true if the <see cref="ClientRequestHandler"/> is to be published by the <see cref="ServiceHelper"/>; otherwise false.</param>
66+ public ClientRequestHandler(string requestCommand, string requestDescription, Action<ClientRequestInfo> handlerMethod, bool isAdvertised)
67+ {
68+ Command = requestCommand;
69+ CommandDescription = requestDescription;
70+ HandlerMethod = handlerMethod;
71+ IsAdvertised = isAdvertised;
72+ }
73+
74+ #endregion
75+
76+ #region [ Properties ]
77+
78+ /// <summary>
79+ /// Gets the command text that the <see cref="ClientRequestHandler"/> will process.
80+ /// </summary>
81+ public string Command { get; private set; }
82+
83+ /// <summary>
84+ /// Gets the description of the <see cref="ClientRequestHandler"/>.
85+ /// </summary>
86+ public string CommandDescription { get; private set; }
87+
88+ /// <summary>
89+ /// Gets the <see cref="Delegate"/> method that gets invoked for processing the <see cref="Command"/>.
90+ /// </summary>
91+ public Action<ClientRequestInfo> HandlerMethod { get; private set; }
92+
93+ /// <summary>
94+ /// Gets a boolean value that indicates whether the <see cref="ClientRequestHandler"/> will be published by the <see cref="ServiceHelper"/>.
95+ /// </summary>
96+ public bool IsAdvertised { get; private set; }
97+
98+ #endregion
99+ }
100+}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t