SessionEndingEventArgs 类

定义

SessionEnding 事件提供数据。Provides data for the SessionEnding event.

public ref class SessionEndingEventArgs : EventArgs
public class SessionEndingEventArgs : EventArgs
type SessionEndingEventArgs = class
    inherit EventArgs
Public Class SessionEndingEventArgs
Inherits EventArgs
继承
SessionEndingEventArgs

注解

当用户尝试注销或关闭系统时, 将引发事件。SessionEndingA SessionEnding event is raised when the user is trying to log off or shut the system down.

SessionEnding事件有时会被取消。This SessionEnding event can sometimes be canceled. 将的SessionEndingEventArgs false属性设置为将要求会话继续, 而不是结束。 CancelSetting the Cancel property of a SessionEndingEventArgs to false will request that the session continue instead of ending. 发出此类请求不能保证会话不会结束。Making such a request provides no guarantee that the session will not end.

构造函数

SessionEndingEventArgs(SessionEndReasons)

使用指定的值(该值指明正在发生的会话关闭事件的类型)初始化 SessionEndingEventArgs 类的新实例。Initializes a new instance of the SessionEndingEventArgs class using the specified value indicating the type of session close event that is occurring.

属性

Cancel

获取或设置一个值,该值指示是否取消用户请求以结束会话。Gets or sets a value indicating whether to cancel the user request to end the session.

Reason

获取会话结束的原因。Gets the reason the session is ending.

方法

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅