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

A property object that defines the attributes of an AccuRev property assigned to a stream or principal by the setproperty command. More...

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

Public Member Functions

string ToString (string format, IFormatProvider provider)
 The ToString implementation. More...
 
Equality comparison
bool Equals (AcProperty other)
 IEquatable implementation to determine the equality of instances of type AcProperty. Uses Kind, depot (when Kind is stream, otherwise null), stream or principal ID number, and property name to compare instances. More...
 
override bool Equals (object other)
 Overridden to determine equality. More...
 
override int GetHashCode ()
 Override appropriate for type AcProperty. More...
 

Internal Functions

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

Properties

PropKind Kind [get, set]
 Kind of property, either principal or stream. More...
 
AcDepot Depot [get, set]
 Depot when Kind is stream, otherwise null. More...
 
int ID [get, set]
 Stream or principal ID number this property is assigned to. More...
 
string Name [get, set]
 Stream or principal name this property is assigned to. More...
 
string PropName [get, set]
 Property name. More...
 
string PropValue [get, set]
 Property value. More...
 

Order comparison

int CompareTo (AcProperty other)
 Generic IComparable implementation (default) for comparing AcProperty objects. Sorts by [[depot, stream] | principal] name then property name. More...
 
int IComparable. CompareTo (object other)
 Pre-generic interface implementation for code using reflection. More...
 

Detailed Description

A property object that defines the attributes of an AccuRev property assigned to a stream or principal by the setproperty command.

Definition at line 45 of file AcProperties.cs.

Constructor & Destructor Documentation

AcUtils.AcProperty.AcProperty ( )
inlinepackage

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

Definition at line 59 of file AcProperties.cs.

Referenced by AcUtils.AcProperty.CompareTo().

Member Function Documentation

int AcUtils.AcProperty.CompareTo ( AcProperty  other)
inline

Generic IComparable implementation (default) for comparing AcProperty objects. Sorts by [[depot, stream] | principal] name then property name.

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

Definition at line 115 of file AcProperties.cs.

Referenced by AcUtils.AcProperty.CompareTo().

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

Pre-generic interface implementation for code using reflection.

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

Definition at line 139 of file AcProperties.cs.

bool AcUtils.AcProperty.Equals ( AcProperty  other)
inline

IEquatable implementation to determine the equality of instances of type AcProperty. Uses Kind, depot (when Kind is stream, otherwise null), stream or principal ID number, and property name to compare instances.

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

Definition at line 71 of file AcProperties.cs.

Referenced by AcUtils.AcProperty.Equals().

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

Overridden to determine equality.

Returns
Return value of generic Equals(AcProperty) version.

Definition at line 84 of file AcProperties.cs.

override int AcUtils.AcProperty.GetHashCode ( )
inline

Override appropriate for type AcProperty.

Returns
Hash of Kind, depot (when Kind is stream, otherwise null), stream or principal number, and property name.

Definition at line 97 of file AcProperties.cs.

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

The ToString implementation.

Parameters
formatThe format specifier to use, e.g. Console.WriteLine(stream.ToString("pn"));
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 Depot stream/principal name along with the name-value property pair (default when not using a format specifier).
  • K Kind.
  • D Depot name when Kind is a stream, otherwise empty.
  • I Stream or principal ID number this property is assigned to.
  • N Stream or principal name this property is assigned to.
  • PN Property name.
  • PV Property value.

Definition at line 219 of file AcProperties.cs.

Property Documentation

AcDepot AcUtils.AcProperty.Depot
getset

Depot when Kind is stream, otherwise null.

Definition at line 162 of file AcProperties.cs.

Referenced by AcUtils.AcProperty.CompareTo(), and AcUtils.AcProperty.GetHashCode().

int AcUtils.AcProperty.ID
getset

Stream or principal ID number this property is assigned to.

Definition at line 171 of file AcProperties.cs.

Referenced by AcUtils.AcProperty.GetHashCode().

PropKind AcUtils.AcProperty.Kind
getset

Kind of property, either principal or stream.

Definition at line 153 of file AcProperties.cs.

Referenced by AcUtils.AcProperty.GetHashCode().

string AcUtils.AcProperty.Name
getset

Stream or principal name this property is assigned to.

Definition at line 180 of file AcProperties.cs.

Referenced by AcUtils.AcProperty.CompareTo().

string AcUtils.AcProperty.PropName
getset

Property name.

Definition at line 189 of file AcProperties.cs.

Referenced by AcUtils.AcProperty.CompareTo(), and AcUtils.AcProperty.GetHashCode().

string AcUtils.AcProperty.PropValue
getset

Property value.

Definition at line 198 of file AcProperties.cs.