2019-03-31 17:21:31 +08:00
|
|
|
|
using Longbow.Cache;
|
|
|
|
|
using System;
|
2019-02-28 16:44:50 +08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace Bootstrap.Admin
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IOnlineUsers
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
IEnumerable<OnlineUser> OnlineUsers { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="key"></param>
|
|
|
|
|
/// <param name="addValueFactory"></param>
|
|
|
|
|
/// <param name="updateValueFactory"></param>
|
|
|
|
|
/// <returns></returns>
|
2019-03-31 17:21:31 +08:00
|
|
|
|
AutoExpireCacheEntry<OnlineUser> AddOrUpdate(string key, Func<string, AutoExpireCacheEntry<OnlineUser>> addValueFactory, Func<string, AutoExpireCacheEntry<OnlineUser>, AutoExpireCacheEntry<OnlineUser>> updateValueFactory);
|
2019-03-02 15:15:47 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="key"></param>
|
|
|
|
|
/// <param name="onlineUserCache"></param>
|
|
|
|
|
/// <returns></returns>
|
2019-03-31 17:21:31 +08:00
|
|
|
|
bool TryRemove(string key, out AutoExpireCacheEntry<OnlineUser> onlineUserCache);
|
2019-03-02 15:15:47 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="ip"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
string RetrieveLocaleByIp(string ip = null);
|
2019-02-28 16:44:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|