AcUtils
A high performance abstraction layer for AccuRev
List of all members
AcUtils.AcSessions Class Reference

A container for AcSession objects that define AccuRev user sessions. More...

Collaboration diagram for AcUtils.AcSessions:
Collaboration graph
[legend]

Public Member Functions

Two-part object construction:
 AcSessions ()
 A container for AcSession objects that define AccuRev user sessions. More...
 
async Task< bool > initAsync ()
 Populate this container with AcSession objects, the currently active login sessions. More...
 

Detailed Description

A container for AcSession objects that define AccuRev user sessions.

Definition at line 218 of file AcSessions.cs.

Constructor & Destructor Documentation

AcUtils.AcSessions.AcSessions ( )
inline

A container for AcSession objects that define AccuRev user sessions.

public static async Task<bool> showSessionsAsync()
{
AcSessions sessions = new AcSessions();
if (!(await sessions.initAsync())) return false;
foreach (AcSession session in sessions
.Where(n => n.Duration != TimeSpan.Zero).OrderBy(n => n))
{
Console.WriteLine(session);
}
return true;
}
See also
initAsync, default comparer

Definition at line 246 of file AcSessions.cs.

Member Function Documentation

async Task<bool> AcUtils.AcSessions.initAsync ( )
inline

Populate this container with AcSession objects, the currently active login sessions.

Returns
true if no failure occurred and list was initialized successfully, false otherwise.
Exceptions
AcUtilsExceptioncaught and logged in %LOCALAPPDATA%\AcTools\Logs\<prog_name>-YYYY-MM-DD.log on show command failure.
Exceptioncaught and logged in same on failure to handle a range of exceptions.
show command:
show -fx sessions

Definition at line 256 of file AcSessions.cs.