using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace SuperSocket.SocketBase.Protocol { /// /// RequestInfo basic class /// /// The type of the request body. public class RequestInfo : IRequestInfo { /// /// Initializes a new instance of the class. /// protected RequestInfo() { } /// /// Initializes a new instance of the class. /// /// The key. /// The body. public RequestInfo(string key, TRequestBody body) { Initialize(key, body); } /// /// Initializes the specified key. /// /// The key. /// The body. protected void Initialize(string key, TRequestBody body) { Key = key; Body = body; } /// /// Gets the key of this request. /// public string Key { get; private set; } /// /// Gets the body. /// public TRequestBody Body { get; private set; } } /// /// RequestInfo with header /// /// The type of the request header. /// The type of the request body. public class RequestInfo : RequestInfo, IRequestInfo { /// /// Initializes a new instance of the class. /// public RequestInfo() { } /// /// Initializes a new instance of the class. /// /// The key. /// The header. /// The body. public RequestInfo(string key, TRequestHeader header, TRequestBody body) : base(key, body) { Header = header; } /// /// Initializes the specified key. /// /// The key. /// The header. /// The body. public void Initialize(string key, TRequestHeader header, TRequestBody body) { base.Initialize(key, body); Header = header; } /// /// Gets the header. /// public TRequestHeader Header { get; private set; } } }