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

A container of AcProperty objects that define AccuRev properties assigned to a stream or principal by the setproperty command. More...

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

Public Member Functions

Two-part object construction:
 AcProperties ()
 A container of AcProperty objects that define AccuRev properties assigned to a stream or principal by the setproperty command. More...
 
async Task< bool > initAsync (AcDepot depot, AcStream stream=null, bool includeHidden=false)
 Populate this container with AcProperty objects for all streams in depot or just stream in depot. Optionally include hidden (removed) streams. More...
 
async Task< bool > initAsync (string prncpl=null, bool includeHidden=false)
 Populate this container with AcProperty objects for all principals or a specific principal only. Optionally include hidden (removed) principals. More...
 

Detailed Description

A container of AcProperty objects that define AccuRev properties assigned to a stream or principal by the setproperty command.

Definition at line 278 of file AcProperties.cs.

Constructor & Destructor Documentation

AcUtils.AcProperties.AcProperties ( )
inline

A container of AcProperty objects that define AccuRev properties assigned to a stream or principal by the setproperty command.

public static async Task<bool> showPropertiesAsync()
{
AcDepot depot = new AcDepot("MARS", dynamicOnly: true);
if (!(await depot.initAsync())) return false;
// get the properties for all dynamic streams in the MARS depot
AcProperties properties = new AcProperties();
if (!(await properties.initAsync(depot))) return false;
foreach (AcProperty prop in properties.OrderBy(n => n))
Console.WriteLine(prop);
return true;
}
MARS_DEV3, Release=2015-11-15
MARS_DEV4, Release=2016-01-17
MARS_MAINT, Release=2015-10-27
MARS_MAINT1, Release=2015-10-13
MARS_MAINT2, Release=2015-11-10
...
See also
initAsync(string, bool), initAsync(AcDepot, AcStream, bool)

Definition at line 315 of file AcProperties.cs.

Member Function Documentation

async Task<bool> AcUtils.AcProperties.initAsync ( AcDepot  depot,
AcStream  stream = null,
bool  includeHidden = false 
)
inline

Populate this container with AcProperty objects for all streams in depot or just stream in depot. Optionally include hidden (removed) streams.

Parameters
depotThe depot to query for properties.
streamThe stream for a specific stream only, otherwise null for all streams in depot.
includeHiddentrue to include properties for hidden (removed) streams, false otherwise.
Returns
true if initialization succeeded, false otherwise.
Exceptions
AcUtilsExceptioncaught and logged in %LOCALAPPDATA%\AcTools\Logs\<prog_name>-YYYY-MM-DD.log on getproperty command failure.
Exceptioncaught and logged in same on failure to handle a range of exceptions.
See also
AcProperties constructor, initAsync(string, bool)
getproperty command:
getproperty <-fx | -fix> <-s <stream> | -ks -p <depot>>

Definition at line 330 of file AcProperties.cs.

async Task<bool> AcUtils.AcProperties.initAsync ( string  prncpl = null,
bool  includeHidden = false 
)
inline

Populate this container with AcProperty objects for all principals or a specific principal only. Optionally include hidden (removed) principals.

Parameters
prncplPrincipal name or null for all principals.
includeHiddentrue to include properties for hidden (removed) principals, false for all.
Returns
true if initialization succeeded, false otherwise.
Exceptions
AcUtilsExceptioncaught and logged in %LOCALAPPDATA%\AcTools\Logs\<prog_name>-YYYY-MM-DD.log on getproperty command failure.
Exceptioncaught and logged in same on failure to handle a range of exceptions.
See also
AcProperties constructor, initAsync(AcDepot, AcStream, bool)
getproperty command:
getproperty <-fx | -fix> <-u <prncpl> | -ku>

Definition at line 391 of file AcProperties.cs.