MembershipProvider.GetNumberOfUsersOnline 方法
定义
获取当前正在访问应用程序的用户数。Gets the number of users currently accessing the application.
public:
abstract int GetNumberOfUsersOnline();
public abstract int GetNumberOfUsersOnline ();
abstract member GetNumberOfUsersOnline : unit -> int
Public MustOverride Function GetNumberOfUsersOnline () As Integer
返回
当前正在访问应用程序的用户数。The number of users currently accessing the application.
示例
有关实现的示例 MembershipProvider ,请参阅 实现配置文件提供程序。For an example of a MembershipProvider implementation, see Implementing a Profile Provider.
注解
返回一个整数值,该值是数据源中 LastActivityDate 大于当前日期和时间减去的所有用户的计数 UserIsOnlineTimeWindow 。Returns an integer value that is the count of all the users in the data source where the LastActivityDate is greater than the current date and time minus the UserIsOnlineTimeWindow. UserIsOnlineTimeWindow是一个正整数值,指定确定用户是否处于联机状态时要使用的分钟数。The UserIsOnlineTimeWindow is a positive integer value specifying the number of minutes to use when determining whether a user is online.