VersionSpec Class

A utility class to parse version specifications.

Inheritance Hierarchy

System.Object
Microsoft.TeamFoundation.VersionControl.Client.VersionSpec
Microsoft.TeamFoundation.VersionControl.Client.ChangesetVersionSpec
Microsoft.TeamFoundation.VersionControl.Client.DateVersionSpec
Microsoft.TeamFoundation.VersionControl.Client.LabelVersionSpec
Microsoft.TeamFoundation.VersionControl.Client.LatestVersionSpec
Microsoft.TeamFoundation.VersionControl.Client.WorkspaceVersionSpec

Namespace: Microsoft.TeamFoundation.VersionControl.Client
Assembly: Microsoft.TeamFoundation.VersionControl.Client (in Microsoft.TeamFoundation.VersionControl.Client.dll)

Syntax

'Declaration
Public MustInherit Class VersionSpec
public abstract class VersionSpec
public ref class VersionSpec abstract
[<AbstractClass>]
type VersionSpec =  class end
public abstract class VersionSpec

The VersionSpec type exposes the following members.

Constructors

Name Description
Protected method VersionSpec Initializes a new VersionSpec instance.

Top

Properties

Name Description
Public property DisplayString Gets the string representation of the version specification.
Public propertyStatic member Latest Gets the latest version of this VersionSpec in the repository.

Top

Methods

Name Description
Public methodStatic member AddDeletionModifierIfNecessary(Item) Formats an item path to include the deletion ID if it is nonzero.
Public methodStatic member AddDeletionModifierIfNecessary(String, Int32) Formats a path to include the deletion ID if it is nonzero.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method Format Formats a path by using the version specifier.
Public methodStatic member FormatRange Formats a server or local path by using the version range that is specified.
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public methodStatic member Parse(String, String) Converts a version specification string to an array of VersionSpec objects. Accommodates a range specifier.
Public methodStatic member Parse(String, String, String) Given a version string convert it to an array VersionSpec objects. If the version specification did not contain a range specifier then this will return an array of size one. Otherwise, an array of size two.
Public methodStatic member ParseSingleSpec(String, String) Converts a version specification string to a VersionSpec object.
Public methodStatic member ParseSingleSpec(String, String, String) Given a version string (without a range specifier), convert it to a VersionSpec object.
Public methodStatic member ParseVersionedFileSpec(String, String, String%, array<VersionSpec[]%) Parses a versioned file specification string of the form "filename;version".
Public methodStatic member ParseVersionedFileSpec(String, String, Int32%, String%, array<VersionSpec[]%) Parses a versioned file specification string of the form "filename;version" or "filename;version;deletionID".
Public methodStatic member ParseVersionedFileSpec(String, String, String, Int32%, String%, array<VersionSpec[]%) Parse a versioned file spec of the form filename;version or filename;version;deletionID.
Public methodStatic member ReorderVersionSpecs Swaps two VersionSpec instances if they are out of order.
Public method ToString Creates a user-readable string that describes this VersionSpec instance. (Overrides Object.ToString().)

Top

Fields

Name Description
Public fieldStatic member DeletionModifier Deletion identifier; a version modifier.
Public fieldStatic member RangeSeparator Character that is used to separate the components of a version specification range.
Public fieldStatic member Separator Character that is used to separate a file name from its version specification.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.TeamFoundation.VersionControl.Client Namespace