using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SuperSocket.SocketBase.Protocol;
namespace SuperSocket.SocketBase.Command
{
///
/// Command basic interface
///
public interface ICommand
{
///
/// Gets the name.
///
string Name { get; }
}
///
/// Command basic interface
///
/// The type of the app session.
/// The type of the request info.
public interface ICommand : ICommand
where TRequestInfo : IRequestInfo
where TAppSession : IAppSession
{
///
/// Executes the command.
///
/// The session.
/// The request info.
void ExecuteCommand(TAppSession session, TRequestInfo requestInfo);
}
///
/// Mockup command
///
/// The type of the app session.
/// The type of the request info.
public class MockupCommand : ICommand
where TRequestInfo : IRequestInfo
where TAppSession : IAppSession
{
///
/// Initializes a new instance of the class.
///
/// The name.
public MockupCommand(string name)
{
Name = name;
}
///
/// Executes the command.
///
/// The session.
/// The request info.
public void ExecuteCommand(TAppSession session, TRequestInfo requestInfo)
{
}
///
/// Gets the name.
///
public string Name { get; private set; }
}
}