using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SuperSocket.SocketBase.Protocol;
using SuperSocket.SocketBase.Command;
namespace SuperSocket.SocketBase
{
///
/// Command Executing Context
///
public class CommandExecutingContext
{
///
/// Gets the session.
///
public IAppSession Session { get; private set; }
///
/// Gets the request info.
///
public IRequestInfo RequestInfo { get; private set; }
///
/// Gets the current command.
///
public ICommand CurrentCommand { get; private set; }
///
/// Gets the exception.
///
///
/// The exception.
///
public Exception Exception { get; internal set; }
///
/// Gets a value indicating whether [exception handled].
///
///
/// true if [exception handled]; otherwise, false.
///
public bool ExceptionHandled { get; internal set; }
///
/// Gets or sets a value indicating whether this command executing is cancelled.
///
///
/// true if cancel; otherwise, false.
///
public bool Cancel { get; set; }
///
/// Initializes a new instance of the class.
///
/// The session.
/// The request info.
/// The command.
public void Initialize(IAppSession session, IRequestInfo requestInfo, ICommand command)
{
Session = session;
RequestInfo = requestInfo;
CurrentCommand = command;
}
}
}