using System;
using Kreta.Framework.Security;
namespace Kreta.Framework.Session
{
///
/// Provides data for the , , , and events.
/// is the base class for classes containing based session event data.
///
public class SessionEventArgs : EventArgs
{
internal SessionEventArgs(LoginInfo loginInfo, string serverName)
{
SessionId = loginInfo.SessionID;
IntezmenyAzonosito = loginInfo.IntezmenyAzonosito;
UserUniqueIdentifier = loginInfo.UniqueIdentifier;
FelhasznaloId = loginInfo.FelhasznaloId;
GondviseloId = loginInfo.GondviseloId;
ClientIP = loginInfo.ClientIP;
ServerName = serverName;
}
public string IntezmenyAzonosito { get; protected set; }
///
/// Gets the current session-identifier for the user
///
public string SessionId { get; protected set; }
///
/// Gets the globally unique user identifier for the user.
///
public int UserUniqueIdentifier { get; protected set; }
///
/// Gets the user related information
///
public string ClientIP { get; protected set; }
///
/// Gets the local user identifier for the user.
///
public int FelhasznaloId { get; protected set; }
public int? GondviseloId { get; protected set; }
///
/// Gets the server identifier.
///
public string ServerName { get; protected set; }
}
///
/// Represents the delegate that will handle the event
///
/// The source of the event. When this event is raised by the class, the sender is the object that raises the event.
/// A instance that contains the event data.
///
/// When you create a delegate, you identify the method that will handle the event.
/// To associate the event with your event handler, add an instance of the delegate to the event.
/// The event handler is called whenever the event occurs, unless you remove the delegate.
///
public delegate void SessionCreatedEventHandler(object sender, SessionEventArgs e);
///
///
///
/// The sender.
/// The instance containing the event data.
public delegate void SessionAccessEventHandler(object sender, SessionEventArgs e);
///
/// Represents the delegate that will handle the event
///
/// The source of the event. When this event is raised by the class, the sender is the object that raises the event.
/// A instance that contains the event data.
///
/// When you create a delegate, you identify the method that will handle the event.
/// To associate the event with your event handler, add an instance of the delegate to the event.
/// The event handler is called whenever the event occurs, unless you remove the delegate.
///
public delegate void SessionActivatedEventHandler(object sender, SessionEventArgs e);
///
/// Represents the delegate that will handle the event
///
/// The source of the event. When this event is raised by the class, the sender is the object that raises the event.
/// A instance that contains the event data.
///
/// When you create a delegate, you identify the method that will handle the event.
/// To associate the event with your event handler, add an instance of the delegate to the event.
/// The event handler is called whenever the event occurs, unless you remove the delegate.
///
public delegate void SessionDeactivatedEventHandler(object sender, SessionEventArgs e);
///
/// Represents the delegate that will handle the event
///
/// The source of the event. When this event is raised by the class, the sender is the object that raises the event.
/// A instance that contains the event data.
///
/// When you create a delegate, you identify the method that will handle the event.
/// To associate the event with your event handler, add an instance of the delegate to the event.
/// The event handler is called whenever the event occurs, unless you remove the delegate.
///
public delegate void SessionDeletedEventHandler(object sender, SessionEventArgs e);
}