共用方式為


Workspace Class

Describes the properties and methods of a workspace.

Inheritance Hierarchy

System.Object
  Microsoft.TeamFoundation.VersionControl.Client.Workspace

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

Syntax

'宣告
Public NotInheritable Class Workspace _
    Implements IComparable, IEqualityComparer(Of Workspace)
public sealed class Workspace : IComparable, 
    IEqualityComparer<Workspace>
public ref class Workspace sealed : IComparable, 
    IEqualityComparer<Workspace^>
[<Sealed>]
type Workspace =  
    class
        interface IComparable
        interface IEqualityComparer<Workspace>
    end
public final class Workspace implements IComparable, IEqualityComparer<Workspace>

The Workspace type exposes the following members.

Properties

  Name Description
Public property Comment Gets the comment about the workspace.
Public property Computer Gets the name of the computer on which this workspace exists.
Public property DisplayName Gets the formatted display name of the workspace.
Public property EffectivePermissions Gets the effective permissions that the AuthenticatedUser has on this workspace.
Public property Folders Gets the mappings for this workspace.
Public property HasAdministerPermission Gets a flag describing whether the AuthorizedUser has Administer permissions for this workspace.
Public property HasCheckInPermission Gets a flag describing whether the AuthorizedUser has CheckIn permissions for this workspace.
Public property HasReadPermission Gets a flag describing whether the AuthorizedUser has Read permissions for this workspace.
Public property HasUsePermission Gets a flag describing whether the AuthorizedUser has Use permissions for this workspace.
Public property IsDeleted Gets a flag that describes whether this workspace has been deleted.
Public property IsLocal Gets a flag that describes whether this workspace exists on the current machine.
Public property LastAccessDate Gets the last access date of this workspace.
Public property LastSavedCheckin Gets or sets the metadata from the last unshelving or unsuccessful checkin.
Public property Name Gets the name of this workspace.
Public property OwnerDescriptor Gets the IdentityDescriptor for the workspace owner, if it is available.
Public property OwnerIdentifier Gets or sets the identifier of the owner of this workspace.
Public property OwnerIdentityType Gets or sets the identity type of the owner of this workspace.
Public property OwnerName Gets the owner of this workspace.
Public property PermissionsProfile Gets the effective permissions that the AuthenticatedUser has on this workspace.
Public propertyStatic member RepositoryComparer Gets a comparer for repositories. It is culture-sensitive and case-insensitive.
Public property SecurityToken Gets the security token of this workspace for the workspace security namespace.
Public property VersionControlServer Gets the VersionControlServer object that hosts this workspace.

Top

Methods

  Name Description
Public method CheckIn(WorkspaceCheckInParameters) Performs a check-in of the specified set of pending changes to the server.
Public method CheckIn(array<PendingChange[], String) Performs a check-in of the specified set of pending changes to the server.
Public method CheckIn(array<PendingChange[], String, CheckinNote, array<WorkItemCheckinInfo[], PolicyOverrideInfo) Performs a check-in of the specified set of pending changes to the server.
Public method CheckIn(array<PendingChange[], String, String, CheckinNote, array<WorkItemCheckinInfo[], PolicyOverrideInfo) Performs a check-in of the specified set of pending changes to the server.
Public method CheckIn(array<PendingChange[], String, String, CheckinNote, array<WorkItemCheckinInfo[], PolicyOverrideInfo, CheckinOptions) Performs a check-in of the specified set of pending changes to the server.
Public method Cloak Marks a file or folder in the repository as being excluded from this workspace.
Public method CreateMapping Adds mapping associating the specified server path with a location on the local disk.
Public method Delete Delete this workspace.
Public method DeleteMapping Removes a working folder mapping from the workspace.
Public method Equals(Object) Compares this Workspace instance to another Workspace object. (Overrides Object.Equals(Object).)
Public method Equals(Workspace, Workspace) Compares two Workspace objects for equivalence.
Public method EvaluateCheckin Evaluates the pending changes to verify they are ready for check-in.
Public method EvaluateCheckin2(CheckinEvaluationOptions, IEnumerable<PendingChange>, String, CheckinNote, array<WorkItemCheckinInfo[]) Evaluate the pending changes to verify they are ready for check-in.
Public method EvaluateCheckin2(CheckinEvaluationOptions, IEnumerable<PendingChange>, IEnumerable<PendingChange>, String, CheckinNote, array<WorkItemCheckinInfo[]) Evaluate the pending changes to verify they are ready to check-in.
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 FormatWorkspaceNameForException Formats the conflicting workspace name for exception when a conflict between names occurs.
Public method Get() Request the server to update the current workspace with the latest version of all mapped items.
Public method Get(GetRequest, GetOptions) Request server to update specified items.
Public method Get(array<GetRequest[], GetOptions) Request server to update specified items.
Public method Get(VersionSpec, GetOptions) Request the server to update the current workspace with the specified version of all mapped items.
Public method Get(array<String[], VersionSpec, RecursionType, GetOptions) Request server to update specified items.
Public method Get(GetRequest, GetOptions, GetFilterCallback, Object) Request server to update specified items.
Public method Get(array<GetRequest[], GetOptions, GetFilterCallback, Object) Request server to update specified items.
Public method Get(array<GetRequest[], GetOptions, GetFilterCallback, Object, array<String[]) Request server to update specified items.
Public method GetExtendedItems(array<ItemSpec[], DeletedState, ItemType) Gets an array of extended items in the repository that match the specified criteria, for each itemSpec.
Public method GetExtendedItems(array<ItemSpec[], DeletedState, ItemType, GetItemsOptions) Gets an array of extended items in the repository that match the specified criteria, for each itemSpec.
Public method GetHashCode() Gets the hash code for this Workspace instance. (Overrides Object.GetHashCode().)
Public method GetHashCode(Workspace) Gets the hash code for the specified Workspace instance.
Public method GetLocalItemForServerItem(String) Gets the corresponding local item for the specified server item.
Public method GetLocalItemForServerItem(String, Boolean) Gets the corresponding local item for the specified server item.
Public method GetLocalVersions Gets local item information about items in a workspace.
Public method GetPendingChanges() Gets the pending changes for this workspace.
Public method GetPendingChanges(String) Gets the pending changes for the specified item in this workspace.
Public method GetPendingChanges(array<String[]) Gets the pending changes for these items in this workspace.
Public method GetPendingChanges(array<ItemSpec[]) Gets the pending changes for these items and sub-items in this workspace.
Public method GetPendingChanges(String, RecursionType) Gets the pending changes for this item and sub-items in this workspace.
Public method GetPendingChanges(array<String[], RecursionType) Gets the pending changes for these items and sub-items in this workspace.
Public method GetPendingChanges(array<ItemSpec[], Boolean) Get the pending changes for specified items in this workspace.
Public method GetPendingChanges(String, RecursionType, Boolean) Gets the pending changes for this item and sub-items in this workspace.
Public method GetPendingChanges(array<String[], RecursionType, Boolean) Gets the pending changes for these items and sub-items in this workspace.
Public method GetPendingChanges(array<ItemSpec[], Boolean, Int32, String) Gets the pending changes for these items and sub-items in this workspace.
Public method GetPendingChanges(array<ItemSpec[], Boolean, Int32, String, Boolean) Gets the pending changes for these items and sub-items in this workspace.
Public method GetPendingChangesEnumerable() Gets an enumerable collection of the pending changes for this workspace.
Public method GetPendingChangesEnumerable(String) Gets an enumerable collection of the pending changes for the specified item in this workspace.
Public method GetPendingChangesEnumerable(array<ItemSpec[]) Gets an enumerable collection of the pending changes for these items and sub-items in this workspace.
Public method GetPendingChangesEnumerable(String, RecursionType) Gets an enumerable collection of pending changes for this item and sub-items in this workspace.
Public method GetServerItemForLocalItem Gets the corresponding server item for the specified local item.
Public method GetTeamProjectForLocalPath Gets the TeamProject instance that contains the specified path.
Public method GetTeamProjectsForLocalPaths Gets the team projects in the repository that have the specified paths.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method GetWorkingFolderForLocalItem Gets a WorkingFolder instance describing how the specified local item is mapped in the workspace.
Public method GetWorkingFolderForServerItem(String) Gets a WorkingFolder instance describing how the specified server item is mapped in the workspace.
Public methodStatic member GetWorkingFolderForServerItem(String, array<WorkingFolder[]) Gets a WorkingFolder instance describing how the specified server item is mapped by the specified WorkingFolder objects.
Public method HasWorkspacePermission Checks to see whether the AuthorizedUser has the provided WorkspacePermissions on this workspace.
Public method IsLocalPathMapped Checks to see if the specified local path is mapped and not cloaked.
Public method IsServerPathMapped(String) Returns true if the server item is mapped and not cloaked. This method may return a false positive for implicitly cloaked server paths.
Public method IsServerPathMapped(String, Boolean) Checks to see if the specified server item is mapped and not cloaked.
Public method Map Adds a mapping associating the specified server path with a location on the local disk.
Public methodStatic member MatchName Compares two workspace names.
Public methodStatic member MatchOwnerName Compares two workspace owner names.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Merge(String, String, VersionSpec, VersionSpec) Performs a merge of the source to the target.
Public method Merge(ItemSpec, String, VersionSpec, VersionSpec, LockLevel, MergeOptionsEx) Performs a merge of the source to the target.
Public method Merge(String, String, VersionSpec, VersionSpec, LockLevel, RecursionType, MergeOptions) Performs a merge of the source to the target.
Public method Merge(String, String, VersionSpec, VersionSpec, LockLevel, RecursionType, MergeOptionsEx) Performs a merge of the source to the target.
Public method Merge(ItemSpec, String, VersionSpec, VersionSpec, LockLevel, MergeOptionsEx, array<String[]) Performs a merge of the source to the target.
Public method MergeContent Performs a content merge that is based on the requested conflict.
Public method PendAdd(String) Queues files or a folder for addition to the repository.
Public method PendAdd(array<String[]) Queues files or folders for addition to the repository.
Public method PendAdd(String, Boolean) Queues files, folders, and subitems for addition to the repository.
Public method PendAdd(array<String[], Boolean) Queues files or folders for addition to the repository.
Public method PendAdd(array<String[], Boolean, String, LockLevel) Queues files or folders for addition to the repository.
Public method PendAdd(array<String[], Boolean, String, LockLevel, Boolean) Queues files or folders for addition to the repository.
Public method PendAdd(array<String[], Boolean, String, LockLevel, Boolean, Boolean) Queues files or folders for addition to the repository.
Public method PendBranch(String, String, VersionSpec) Schedules a file or folder for branching.
Public method PendBranch(String, String, VersionSpec, LockLevel, Boolean) Schedules a file or folder for branching.
Public method PendBranch(String, String, VersionSpec, LockLevel, Boolean, Boolean) Schedules a file or folder for branching.
Public method PendBranch(String, String, VersionSpec, LockLevel, Boolean, Boolean, Boolean) Schedules a file or folder for branching.
Public method PendDelete(String) Queues files or folders for deletion from the repository.
Public method PendDelete(array<String[]) Queues files or folders for deletion from the repository.
Public method PendDelete(String, RecursionType) Queues files or folders for deletion from the repository.
Public method PendDelete(array<String[], RecursionType) Queues files or folders for deletion from the repository.
Public method PendDelete(array<String[], RecursionType, LockLevel) Queues files or folders for deletion from the repository.
Public method PendDelete(array<String[], RecursionType, LockLevel, Boolean) Queues files or folders for deletion from the repository.
Public method PendDelete(array<String[], RecursionType, LockLevel, Boolean, Boolean) Queues files or folders for deletion from the repository.
Public method PendDelete(array<String[], RecursionType, LockLevel, Boolean, Boolean, array<String[]) Queues files or folders for deletion from the repository.
Public method PendEdit(String) Checks out files for editing from the repository.
Public method PendEdit(array<String[]) Checks out files for editing from the repository.
Public method PendEdit(String, RecursionType) Checks out files for editing from the repository.
Public method PendEdit(array<String[], RecursionType) Checks out files for editing from the repository.
Public method PendEdit(array<String[], RecursionType, String, LockLevel) Checks out files for editing from the repository.
Public method PendEdit(array<String[], RecursionType, String, LockLevel, Boolean) Checks out files for editing from the repository.
Public method PendEdit(array<String[], RecursionType, String, LockLevel, Boolean, PendChangesOptions) Checks out files for editing from the repository.
Public method PendEdit(array<String[], RecursionType, String, LockLevel, Boolean, PendChangesOptions, array<String[]) Checks out files for editing from the repository.
Public method PendRename(String, String) Moves or renames a file or directory.
Public method PendRename(String, String, LockLevel, Boolean, Boolean) Moves or renames a file or directory.
Public method PendRename(String, String, LockLevel, Boolean, Boolean, Boolean) Moves or renames a file or directory.
Public method PendRename(String, String, LockLevel, Boolean, Boolean, Boolean, array<String[]) Moves or renames a file or directory.
Public method PendUndelete(String, Int32) Queues files or folders for undeletion from the repository.
Public method PendUndelete(String, Int32, String) Queues files or folders for undeletion from the repository.
Public method PendUndelete(array<ItemSpec[], LockLevel, Boolean) Queues files or folders for undeletion from the repository.
Public method PendUndelete(array<ItemSpec[], LockLevel, Boolean, Boolean) Queues files or folders for undeletion from the repository.
Public method PendUndelete(String, Int32, String, LockLevel, Boolean) Queues files or folders for undeletion from the repository.
Public method PendUndelete(array<ItemSpec[], LockLevel, Boolean, Boolean, Boolean) Queues files or folders for undeletion from the repository.
Public method PendUndelete(String, Int32, String, LockLevel, Boolean, Boolean) Queues files or folders for undeletion from the repository.
Public method PendUndelete(String, Int32, String, LockLevel, Boolean, Boolean, Boolean) Queues files or folders for undeletion from the repository.
Public method PendUndelete(String, Int32, String, LockLevel, Boolean, Boolean, Boolean, array<String[]) Queues files or folders for undeletion from the repository.
Public method QueryConflicts Gets the array of conflicts that match the specified path filters.
Public method QueryPendingSets(array<ItemSpec[], String, String, Boolean) Gets the pending changes for the specified query.
Public method QueryPendingSets(array<String[], RecursionType, String, String, Boolean) Gets the pending changes for the specified query.
Public method QueryShelvedChanges(String, String, array<ItemSpec[]) Gets the shelved changes for the specified query.
Public method QueryShelvedChanges(String, String, array<ItemSpec[], Boolean) Gets the shelved changes for the specified query.
Public method Refresh Refreshes this Workspace instance from the server.
Public method RefreshIfNeeded Refreshes this Workspace instance from the server if properties that cannot be cached are stale or have not been loaded. Properties that cannot be cached include working folders and effective permissions.
Public method RefreshMappings Obsolete. Gets the current set of mappings for this Workspace instance from the server.
Public method RemoveLocalConflict Removes a local conflict from the list of conflicts on the server for this workspace.
Public method ResolveConflict(Conflict) Attempt to resolve a conflict according to the conflict's Resolution property.
Public method ResolveConflict(Conflict, array<Conflict[]%) Attempt to resolve a conflict according to the conflict's Resolution property.
Public method ResolveConflict(Conflict, array<Conflict[]%, array<String[]) Attempt to resolve a conflict according to the conflict's Resolution property.
Public method Rollback(VersionSpec, VersionSpec, LockLevel, RollbackOptions) Pends a rollback for all changes between the specified versions.
Public method Rollback(array<String[], RecursionType, VersionSpec, VersionSpec, VersionSpec, LockLevel, RollbackOptions, array<String[]) Pends a rollback for changes on a certain path, within the specified versions.
Public method SetLock(String, LockLevel) Applies the selected lock level to the specified path.
Public method SetLock(array<String[], LockLevel) Applies the selected lock level to the specified paths.
Public method SetLock(String, LockLevel, RecursionType) Applies the selected lock level to the specified path.
Public method SetLock(array<String[], LockLevel, RecursionType) Applies the selected lock level to the specified paths.
Public method SetLock(array<String[], LockLevel, RecursionType, Boolean) Applies the selected lock level to the specified paths.
Public method SetLock(array<String[], LockLevel, RecursionType, Boolean, array<String[]) Applies the selected lock level to the specified paths.
Public method SetPendingChangeProperty Sets properties on existing pending changes.
Public method Shelve Collects a set of pending changes and shelves them to the server.
Public method ToString Creates a user-readable string that describes the properties of this workspace. (Overrides Object.ToString().)
Public method TryGetLocalItemForServerItem(String) Gets the corresponding local item for the specified server item.
Public method TryGetLocalItemForServerItem(String, Boolean) Gets the corresponding local item for the specified server item.
Public method TryGetServerItemForLocalItem(String) Gets the corresponding server item for the specified local item. Does not throw exceptions.
Public methodStatic member TryGetServerItemForLocalItem(String, array<WorkingFolder[]) Gets the corresponding server item for the specified local item.
Public method TryGetWorkingFolderForLocalItem Gets a WorkingFolder instance describing how the local item is mapped in the workspace.
Public method TryGetWorkingFolderForServerItem(String) Gets a WorkingFolder instance describing how the server item is mapped in the workspace.
Public methodStatic member TryGetWorkingFolderForServerItem(String, array<WorkingFolder[]) Gets a WorkingFolder instance describing how the server item is mapped by the specified WorkingFolder objects.
Public methodStatic member TryGetWorkingFolderForServerItem(String, array<WorkingFolder[], Boolean) Gets a WorkingFolder instance describing how the server item is mapped by the specified WorkingFolder objects.
Public method Undo(String) Undo the pending changes for the specified item.
Public method Undo(array<String[]) Undo the pending changes for the specified items.
Public method Undo(array<ItemSpec[]) Undo the pending changes for the specified items.
Public method Undo(array<PendingChange[]) Undo the pending changes for the specified items.
Public method Undo(String, RecursionType) Undo the pending changes for the specified items.
Public method Undo(array<String[], RecursionType) Undo the pending changes for the specified items.
Public method Undo(array<String[], Boolean) Undo the pending changes for the specified items.
Public method Undo(array<ItemSpec[], Boolean) Undo the pending changes for the specified items.
Public method Undo(array<String[], RecursionType, Boolean) Undo the pending changes for the specified items.
Public method Undo(array<ItemSpec[], Boolean, array<String[]) Undo the pending changes for the specified items.
Public method Unshelve(String, String) Reproduces in this workspace a set of pending changes that have been previously shelved to the server.
Public method Unshelve(String, String, array<ItemSpec[]) Reproduces in this workspace a set of pending changes that have been previously shelved to the server.
Public method Unshelve(String, String, array<ItemSpec[], array<PendingChange[]%) Reproduces in this workspace a set of pending changes that have been previously shelved to the server.
Public method Unshelve(String, String, array<ItemSpec[], array<PendingChange[]%, array<String[]) Reproduces in this workspace a set of pending changes that have been previously shelved to the server.
Public method Update(String, String, array<WorkingFolder[]) Updates the properties of a workspace.
Public method Update(String, String, array<WorkingFolder[], Boolean) Update the properties of a workspace.
Public method Update(String, String, String, array<WorkingFolder[], Boolean) Updates the properties of a workspace.
Public method Update(String, String, String, String, array<WorkingFolder[], WorkspacePermissionProfile, Boolean) Updates the properties of a workspace.
Public method UpdateComputerName Updates the name of the computer in the repository.
Public method UpdateLastSavedCheckin(Shelveset) Updates the last attempted check-in information with the information from the shelveset.
Public method UpdateLastSavedCheckin(Shelveset, array<PendingChange[]) Updates the last attempted check-in information with the information from the shelveset and ensures that the specified set of pending changes have a checked state set.

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IComparable.CompareTo Compares two workspace objects, first comparing the repository URLs, then comparing the workspace names, and finally comparing owners.

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