Delen via


VersionSpec Class

A base class for encapsulating version specifications.

Allows several different types of versions.

Inheritance Hierarchy

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

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

Syntax

'Declaration
Public MustInherit Class VersionSpec _
    Implements IComparable(Of VersionSpec)
public abstract class VersionSpec : IComparable<VersionSpec>
public ref class VersionSpec abstract : IComparable<VersionSpec^>
[<AbstractClass>]
type VersionSpec =  
    class 
        interface IComparable<VersionSpec>
    end
public abstract class VersionSpec implements IComparable<VersionSpec>

The VersionSpec type exposes the following members.

Constructors

  Name Description
Protected method VersionSpec

Top

Methods

  Name Description
Public method CompareTo Compares two version specs. Sorts by type name followed by version data.
Public method Equals (Overrides Object.Equals(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 GetHashCode (Overrides Object.GetHashCode().)
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) Given a version string convert it to an array of 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 Parse(String, String, String) Given a version string convert it to an array of 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) Given a version string (without a range specifier), convert it 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 method ToChangeset Translates this version spec into a changeset number for the given item spec. If the version specifier cannot be represented as a changeset, returns UnknownChangeset.
Public method ToDBString Translates this version spec into a string version spec to be passed to the database.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Fields

  Name Description
Protected field m_useMappings
Public fieldStatic member Separator
Public fieldStatic member UnknownChangeset

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.Server Namespace