FocusSessionManager.TryStartFocusSession Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
TryStartFocusSession() |
Attempts to start a focus session with no fixed end time. Important The FocusSessionManager.TryStartFocusSession API is part of a Limited Access Feature (see LimitedAccessFeatures class). For more information or to request an unlock token, please use the LAF Access Token Request Form. |
TryStartFocusSession(DateTime) |
Attempts to start a focus session that is active until explicitly cancelled. Important The FocusSessionManager.TryStartFocusSession API is part of a Limited Access Feature (see LimitedAccessFeatures class). For more information or to request an unlock token, please use the LAF Access Token Request Form. |
TryStartFocusSession()
Attempts to start a focus session with no fixed end time.
Important
The FocusSessionManager.TryStartFocusSession API is part of a Limited Access Feature (see LimitedAccessFeatures class). For more information or to request an unlock token, please use the LAF Access Token Request Form.
public:
virtual FocusSession ^ TryStartFocusSession() = TryStartFocusSession;
/// [Windows.Foundation.Metadata.Overload("TryStartFocusSession")]
FocusSession TryStartFocusSession();
[Windows.Foundation.Metadata.Overload("TryStartFocusSession")]
public FocusSession TryStartFocusSession();
function tryStartFocusSession()
Public Function TryStartFocusSession () As FocusSession
Returns
A FocusSession object if a focus session was successfully started; otherwise, null.
- Attributes
Applies to
TryStartFocusSession(DateTime)
Attempts to start a focus session that is active until explicitly cancelled.
Important
The FocusSessionManager.TryStartFocusSession API is part of a Limited Access Feature (see LimitedAccessFeatures class). For more information or to request an unlock token, please use the LAF Access Token Request Form.
public:
virtual FocusSession ^ TryStartFocusSession(DateTime endTime) = TryStartFocusSession;
/// [Windows.Foundation.Metadata.Overload("TryStartFocusSession2")]
FocusSession TryStartFocusSession(DateTime const& endTime);
[Windows.Foundation.Metadata.Overload("TryStartFocusSession2")]
public FocusSession TryStartFocusSession(System.DateTimeOffset endTime);
function tryStartFocusSession(endTime)
Public Function TryStartFocusSession (endTime As DateTimeOffset) As FocusSession
Parameters
- endTime
- DateTime DateTimeOffset
The end time for the created focus session.
Returns
A FocusSession object if a focus session was successfully started; otherwise, null.
- Attributes