AcUtils
A high performance abstraction layer for AccuRev
Public Member Functions | Internal Functions | Properties | List of all members
AcUtils.AcPermission Class Reference

A permission object that defines the attributes of an AccuRev access control list (ACL) entry. More...

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

Public Member Functions

string ToString (string format, IFormatProvider provider)
 The ToString implementation. More...
 
Equality comparison
bool Equals (AcPermission other)
 IEquatable implementation to determine the equality of instances of type AcPermission. Uses Kind, Name, and AppliesTo to compare instances. More...
 
override bool Equals (object other)
 Overridden to determine equality. More...
 
override int GetHashCode ()
 Override appropriate for type AcPermission. More...
 

Internal Functions

 AcPermission (PermKind kind)
 Constructor used during AcPermissions list construction. It is called internally and not by user code. More...
 

Properties

PermKind Kind [get, set]
 Whether the permission pertains to a depot or stream. More...
 
string Name [get, set]
 Name of the depot or stream this permission applies to. More...
 
string AppliesTo [get, set]
 Principal name of the group or user this permission applies to or one of the built-in types anyuser or authuser. More...
 
PermType Type [get, set]
 Whether AppliesTo is the principal name for a group, user, or a builtin type. More...
 
PermRights Rights [get, set]
 Whether permission rights to Name in AppliesTo is all or none. More...
 
bool Inheritable [get, set]
 For depots, when true permission applies to the depot and its entire stream hierarchy, when false permission applies only to AccuWork issues in the depot and not its version-controlled elements.
For streams, when true permission applies to the stream and its entire subhierarchy, when false permission applies only to the stream. More...
 

Order comparison

int CompareTo (AcPermission other)
 Generic IComparable implementation (default) for comparing AcPermission objects to sort by Name and then AppliesTo. More...
 
int IComparable. CompareTo (object other)
 Pre-generic interface implementation for code using reflection. More...
 

Detailed Description

A permission object that defines the attributes of an AccuRev access control list (ACL) entry.

Definition at line 77 of file AcPermissions.cs.

Constructor & Destructor Documentation

AcUtils.AcPermission.AcPermission ( PermKind  kind)
inlinepackage

Constructor used during AcPermissions list construction. It is called internally and not by user code.

Definition at line 96 of file AcPermissions.cs.

Referenced by AcUtils.AcPermission.CompareTo().

Member Function Documentation

int AcUtils.AcPermission.CompareTo ( AcPermission  other)
inline

Generic IComparable implementation (default) for comparing AcPermission objects to sort by Name and then AppliesTo.

Parameters
otherAn AcPermission object to compare with this instance.
Returns
Value indicating the relative order of the AcPermission objects being compared.
See also
AcPermissions constructor example

Definition at line 155 of file AcPermissions.cs.

Referenced by AcUtils.AcPermission.CompareTo().

int IComparable. AcUtils.AcPermission.CompareTo ( object  other)
inlineprivate

Pre-generic interface implementation for code using reflection.

Parameters
otherAn AcPermission object to compare with this instance.
Returns
Return value of generic CompareTo(AcPermission) version.
Exceptions
ArgumentExceptionthrown if argument is not an AcPermission object.

Definition at line 176 of file AcPermissions.cs.

bool AcUtils.AcPermission.Equals ( AcPermission  other)
inline

IEquatable implementation to determine the equality of instances of type AcPermission. Uses Kind, Name, and AppliesTo to compare instances.

Parameters
otherThe AcPermission object being compared to this instance.
Returns
true if AcPermission other is the same, false otherwise.

Definition at line 111 of file AcPermissions.cs.

Referenced by AcUtils.AcPermission.Equals().

override bool AcUtils.AcPermission.Equals ( object  other)
inline

Overridden to determine equality.

Returns
Return value of generic Equals(AcPermission) version.

Definition at line 124 of file AcPermissions.cs.

override int AcUtils.AcPermission.GetHashCode ( )
inline

Override appropriate for type AcPermission.

Returns
Hash of Kind, Name and AppliesTo.

Definition at line 137 of file AcPermissions.cs.

string AcUtils.AcPermission.ToString ( string  format,
IFormatProvider  provider 
)
inline

The ToString implementation.

Parameters
formatThe format specifier to use, e.g. Console.WriteLine(permission.ToString("A"));
providerAllow clients to format output for their own types using ICustomFormatter.
Returns
The formatted string.
Exceptions
FormatExceptionthrown if an invalid format string is specified.
Format specifiers:
  • G Default when not using a format specifier.
  • K Kind - whether the permission pertains to a depot or stream.
  • N Name - name of the depot or stream this permission applies to.
  • A AppliesTo - principal name of the group or user this permission applies to or one of the built-in types anyuser or authuser.
  • T Type - whether AppliesTo is the principal name for a group, user, or builtin type.
  • R Rights - whether permission rights to Name in AppliesTo is all or none.
  • I Inheritable - For depots, when true permission applies to the depot and its entire stream hierarchy, when false permission applies only to AccuWork issues in the depot and not its version-controlled elements. For streams, when true permission applies to the stream and its entire subhierarchy, when false permission applies only to the stream.

Definition at line 267 of file AcPermissions.cs.

Property Documentation

string AcUtils.AcPermission.AppliesTo
getset

Principal name of the group or user this permission applies to or one of the built-in types anyuser or authuser.

Definition at line 209 of file AcPermissions.cs.

Referenced by AcUtils.AcPermission.CompareTo(), AcUtils.AcPermission.GetHashCode(), and AcUtils.AcPermissions.initAsync().

bool AcUtils.AcPermission.Inheritable
getset

For depots, when true permission applies to the depot and its entire stream hierarchy, when false permission applies only to AccuWork issues in the depot and not its version-controlled elements.
For streams, when true permission applies to the stream and its entire subhierarchy, when false permission applies only to the stream.

Definition at line 242 of file AcPermissions.cs.

Referenced by AcUtils.AcPermissions.initAsync().

PermKind AcUtils.AcPermission.Kind
getset

Whether the permission pertains to a depot or stream.

Definition at line 190 of file AcPermissions.cs.

Referenced by AcUtils.AcPermission.GetHashCode().

string AcUtils.AcPermission.Name
getset

Name of the depot or stream this permission applies to.

Definition at line 199 of file AcPermissions.cs.

Referenced by AcUtils.AcPermission.CompareTo(), AcUtils.AcPermission.GetHashCode(), and AcUtils.AcPermissions.initAsync().

PermRights AcUtils.AcPermission.Rights
getset

Whether permission rights to Name in AppliesTo is all or none.

Definition at line 229 of file AcPermissions.cs.

Referenced by AcUtils.AcPermissions.initAsync().

PermType AcUtils.AcPermission.Type
getset

Whether AppliesTo is the principal name for a group, user, or a builtin type.

Definition at line 219 of file AcPermissions.cs.

Referenced by AcUtils.AcPermissions.initAsync().