/// <summary> /// Handler method. Called when an application scope is started. /// </summary> /// <param name="application">Application scope.</param> /// <returns>true if started successful, false otherwise.</returns> public virtual bool AppStart(IScope application) { log.Debug(__Res.GetString(__Res.AppAdapter_AppStart, application.ToString())); foreach (IApplication listener in _listeners) { listener.OnAppStart(application); } return(true); }
/// <summary> /// Handler method. Called every time client leaves room scope. /// </summary> /// <param name="client">Client object that left.</param> /// <param name="room">Room scope.</param> public virtual void RoomLeave(IClient client, IScope room) { log.Debug(__Res.GetString(__Res.AppAdapter_RoomLeave, client.ToString(), room.ToString())); foreach(IApplication listener in _listeners) { listener.OnRoomLeave(client, room); } }
/// <summary> /// Handler method. Called every time client joins room scope. /// </summary> /// <param name="client">Client object.</param> /// <param name="room">Room scope.</param> /// <returns>true if join is successful, false otherwise.</returns> public virtual bool RoomJoin(IClient client, IScope room) { log.Debug(__Res.GetString(__Res.AppAdapter_RoomJoin, client.ToString(), room.ToString())); foreach(IApplication listener in _listeners) { listener.OnRoomJoin(client, room); } return true; }
/// <summary> /// Handler method. Called every time client leaves application scope. /// </summary> /// <param name="client">Client object that left.</param> /// <param name="application">Application scope.</param> public virtual void AppLeave(IClient client, IScope application) { log.Debug(__Res.GetString(__Res.AppAdapter_AppLeave, client.ToString(), application.ToString())); foreach(IApplication listener in _listeners) { listener.OnAppLeave(client, application); } }
/// <summary> /// Handler method. Called every time client joins application scope. /// </summary> /// <param name="client">Client object.</param> /// <param name="application">Application scope.</param> /// <returns>true if join is successful, false otherwise.</returns> public virtual bool AppJoin(IClient client, IScope application) { log.Debug(__Res.GetString(__Res.AppAdapter_AppJoin, client.ToString(), application.ToString())); foreach(IApplication listener in _listeners) { listener.OnAppJoin(client, application); } return true; }
/// <summary> /// Handler method. Called when a room scope is stopped. /// </summary> /// <param name="room">Room scope.</param> public virtual void RoomStop(IScope room) { log.Debug(__Res.GetString(__Res.AppAdapter_RoomStop, room.ToString())); foreach(IApplication listener in _listeners) { listener.OnRoomStop(room); } }
/// <summary> /// Handler method. Called when an application scope is stopped. /// </summary> /// <param name="application">Application scope.</param> public virtual void AppStop(IScope application) { log.Debug(__Res.GetString(__Res.AppAdapter_AppStop, application.ToString())); foreach(IApplication listener in _listeners) { listener.OnAppStop(application); } }
/// <summary> /// Handler method. Called when a room scope is started. /// </summary> /// <param name="room">Room scope.</param> /// <returns>true if started successful, false otherwise.</returns> public virtual bool RoomStart(IScope room) { log.Debug(__Res.GetString(__Res.AppAdapter_RoomStart, room.ToString())); foreach(IApplication listener in _listeners) { listener.OnRoomStart(room); } return true; }
/// <summary> /// Handler method. Called when an application scope is started. /// </summary> /// <param name="application">Application scope.</param> /// <returns>true if started successful, false otherwise.</returns> public virtual bool AppStart(IScope application) { log.Debug(__Res.GetString(__Res.AppAdapter_AppStart, application.ToString())); foreach(IApplication listener in _listeners) { listener.OnAppStart(application); } return true; }
public override string ToString() { return(scope.ToString()); }
public virtual void AppLeave(IClient client, IScope application) { log.Debug(__Res.GetString("AppAdapter_AppLeave", new object[] { client.ToString(), application.ToString() })); foreach (IApplication application2 in this._listeners) { application2.OnAppLeave(client, application); } }
public virtual bool AppJoin(IClient client, IScope application) { log.Debug(__Res.GetString("AppAdapter_AppJoin", new object[] { client.ToString(), application.ToString() })); foreach (IApplication application2 in this._listeners) { application2.OnAppJoin(client, application); } return(true); }
public virtual void RoomLeave(IClient client, IScope room) { log.Debug(__Res.GetString("AppAdapter_RoomLeave", new object[] { client.ToString(), room.ToString() })); foreach (IApplication application in this._listeners) { application.OnRoomLeave(client, room); } }
public virtual bool RoomJoin(IClient client, IScope room) { log.Debug(__Res.GetString("AppAdapter_RoomJoin", new object[] { client.ToString(), room.ToString() })); foreach (IApplication application in this._listeners) { application.OnRoomJoin(client, room); } return(true); }
public override string ToString() { return($"{_parent?.ToString()}:{_state?.ToString()}"); }