private void SkypeStopped() { _skypeHelper = null; CurrentSkypeStatus = SKYPE_NOT_STARTED; _onlineStatus?.ChangeOnlineStatus(UserStatus.LoggedOut); _onlineStatus = null; IsSkypeRunning = false; }
private void SkypeUserStatusChanged(UserStatus status) { CurrentSkypeStatus = status.ToString(); if (_onlineStatus == null && _skypeHelper.IsLoggedIn()) { _onlineStatus = new FtpOnline(_skypeHelper.GetAccountName()); } _onlineStatus?.ChangeOnlineStatus(status); }
/// <summary>更新在线信息,登录前、心跳时 调用</summary> /// <param name="name"></param> /// <param name="ps">附加参数</param> protected virtual void CheckOnline(String name, IDictionary <String, Object> ps) { var ns = Session as NetSession; var sid = ns.Remote.EndPoint + ""; var olt = Online ?? CreateOnline(sid); //if (olt is UserOnline dolt) Fill(dolt, ps); olt.Name = name; olt.SessionID = sid; olt.UpdateTime = DateTime.Now; Online = olt; }
void IActionFilter.OnActionExecuting(ControllerContext filterContext) { Parameters = filterContext.Parameters; var act = filterContext.ActionName; if (act == nameof(Login) || act.EndsWith("/" + nameof(Login))) { return; } var ns = Session as INetSession; if (Session["Current"] is IManageUser user) { Current = user; } else { throw new ApiException(401, $"{ns.Remote}未登录!不能执行{act}"); } Online = Session["Online"] as IOnline; }
private void _SupplyOnline(IOnline obj) { _Online = obj; }
private void _UnsupplyOnline(IOnline obj) { _Online = null; }
private void _Restart(IOnline obj) { Log.Instance.WriteInfo("Storage disconnect , need restart."); _ToConnectStorage(); }
private void OnlineProvider_Unsupply(IOnline obj) { obj_DisconnectEvent(); }
private void SkypeUserStatusChanged(UserStatus status) { CurrentSkypeStatus = status.ToString(); if (_onlineStatus==null && _skypeHelper.IsLoggedIn()) { _onlineStatus = new FtpOnline(_skypeHelper.GetAccountName()); } _onlineStatus?.ChangeOnlineStatus(status); }