MembershipSection.UserIsOnlineTimeWindow 属性
定义
获取或设置将某一用户视为脱机前的时间长度(以分钟为单位)。Gets or sets the length of time, in minutes, before a user is no longer considered to be online.
public:
property TimeSpan UserIsOnlineTimeWindow { TimeSpan get(); void set(TimeSpan value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanMinutesConverter))]
[System.Configuration.ConfigurationProperty("userIsOnlineTimeWindow", DefaultValue=Mono.Cecil.CustomAttributeArgument)]
[System.Configuration.TimeSpanValidator(MaxValueString="10675199.02:48:05.4775807", MinValueString="00:01:00")]
public TimeSpan UserIsOnlineTimeWindow { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanMinutesConverter))>]
[<System.Configuration.ConfigurationProperty("userIsOnlineTimeWindow", DefaultValue=Mono.Cecil.CustomAttributeArgument)>]
[<System.Configuration.TimeSpanValidator(MaxValueString="10675199.02:48:05.4775807", MinValueString="00:01:00")>]
member this.UserIsOnlineTimeWindow : TimeSpan with get, set
Public Property UserIsOnlineTimeWindow As TimeSpan
属性值
时间长度(以分钟为单位)。A length of time in minutes.
- 属性
示例
下面的代码示例演示如何使用 UserIsOnlineTimeWindow 属性。The following code example demonstrates how to use the UserIsOnlineTimeWindow property. 此代码示例是为类提供的更大示例的一部分 MembershipSection 。This code example is part of a larger example provided for the MembershipSection class.
// Display UserIsOnlineTimeWindow value.
Console.WriteLine("UserIsOnlineTimeWindow: {0}",
configSection.UserIsOnlineTimeWindow);
' Display UserIsOnlineTimeWindow value.
Console.WriteLine("UserIsOnlineTimeWindow: {0}", _
configSection.UserIsOnlineTimeWindow)
注解
此属性的值 UserIsOnlineTimeWindow 是通过比较当前时间减去具有用户的值的属性来计算的 UserIsOnlineTimeWindow LastActivityDate 。The value for the UserIsOnlineTimeWindow property is calculated by comparing the current time minus the UserIsOnlineTimeWindow property with the LastActivityDate value for the user.