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

The attributes of a stream or workspace include or exclude rule: RuleKind, ElementType, location affected by the rule, stream or workspace the rule was applied to, and (if applicable) the basis stream for cross-links. More...

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

Public Member Functions

string ToString (string format, IFormatProvider provider)
 The ToString implementation. More...
 
Equality comparison
bool Equals (AcRule other)
 IEquatable implementation to determine the equality of instances of type AcRule. Values used to compare instances are RuleKind, depot-relative path of the element the rule affects, and name of stream or workspace the rule is applied to. More...
 
override bool Equals (object other)
 Overridden to determine equality. More...
 
override int GetHashCode ()
 Override appropriate for type AcRule. More...
 

Internal Functions

 AcRule ()
 Constructor used during AcRules list construction. It is called internally and not by user code. More...
 

Properties

RuleKind Kind [get, set]
 Kind of AccuRev rule in use. More...
 
ElementType Type [get, set]
 Type of element the rule was placed on: dir, text, binary, ptext, elink, or slink. More...
 
string Location [get, set]
 Depot-relative path of the element the rule affects. More...
 
string SetInStream [get, set]
 Name of stream or workspace the rule is applied to. More...
 
string XlinkToStream [get, set]
 In the case of a cross-link this is the basis stream for SetInStream. More...
 

Order comparison

int CompareTo (AcRule other)
 Generic IComparable implementation (default) for comparing AcRule objects. Sorts by the stream or workspace name the rule is applied to and then location; the depot-relative path of the element the rule affects. More...
 
int IComparable. CompareTo (object other)
 Pre-generic interface implementation for code using reflection. More...
 

Detailed Description

The attributes of a stream or workspace include or exclude rule: RuleKind, ElementType, location affected by the rule, stream or workspace the rule was applied to, and (if applicable) the basis stream for cross-links.

Definition at line 58 of file AcRules.cs.

Constructor & Destructor Documentation

AcUtils.AcRule.AcRule ( )
inlinepackage

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

Definition at line 71 of file AcRules.cs.

Referenced by AcUtils.AcRule.CompareTo().

Member Function Documentation

int AcUtils.AcRule.CompareTo ( AcRule  other)
inline

Generic IComparable implementation (default) for comparing AcRule objects. Sorts by the stream or workspace name the rule is applied to and then location; the depot-relative path of the element the rule affects.

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

Definition at line 128 of file AcRules.cs.

Referenced by AcUtils.AcRule.CompareTo().

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

Pre-generic interface implementation for code using reflection.

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

Definition at line 149 of file AcRules.cs.

bool AcUtils.AcRule.Equals ( AcRule  other)
inline

IEquatable implementation to determine the equality of instances of type AcRule. Values used to compare instances are RuleKind, depot-relative path of the element the rule affects, and name of stream or workspace the rule is applied to.

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

Definition at line 83 of file AcRules.cs.

Referenced by AcUtils.AcRule.Equals().

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

Overridden to determine equality.

Returns
Return value of generic Equals(AcRule) version.

Definition at line 96 of file AcRules.cs.

override int AcUtils.AcRule.GetHashCode ( )
inline

Override appropriate for type AcRule.

Returns
Hash of RuleKind, depot-relative path of the element the rule affects, and name of stream or workspace the rule is applied to.

Definition at line 109 of file AcRules.cs.

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

The ToString implementation.

Parameters
formatThe format specifier to use, e.g. Console.WriteLine(rule.ToString("k"));
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 Long version and default when not using a format specifier.
  • K RuleKind - Kind of rule in use.
  • T ElementType - Type of element the rule was placed on: dir, text, binary, ptext, elink, or slink.
  • L Location - Depot-relative path of the element the rule affects.
  • S SetInStream - Stream or workspace the rule is applied to.
  • X XlinkToStream - If cross-link the basis stream for the SetInStream.

Definition at line 219 of file AcRules.cs.

Property Documentation

RuleKind AcUtils.AcRule.Kind
getset

Kind of AccuRev rule in use.

Definition at line 163 of file AcRules.cs.

Referenced by AcUtils.AcRule.GetHashCode(), and AcUtils.AcRules.initAsync().

string AcUtils.AcRule.Location
getset

Depot-relative path of the element the rule affects.

Definition at line 181 of file AcRules.cs.

Referenced by AcUtils.AcRule.CompareTo(), AcUtils.AcRule.GetHashCode(), and AcUtils.AcRules.initAsync().

string AcUtils.AcRule.SetInStream
getset

Name of stream or workspace the rule is applied to.

Definition at line 190 of file AcRules.cs.

Referenced by AcUtils.AcRule.CompareTo(), AcUtils.AcRule.GetHashCode(), and AcUtils.AcRules.initAsync().

ElementType AcUtils.AcRule.Type
getset

Type of element the rule was placed on: dir, text, binary, ptext, elink, or slink.

Definition at line 172 of file AcRules.cs.

Referenced by AcUtils.AcRules.initAsync().

string AcUtils.AcRule.XlinkToStream
getset

In the case of a cross-link this is the basis stream for SetInStream.

Definition at line 199 of file AcRules.cs.

Referenced by AcUtils.AcRules.initAsync().