当前位置: 首页>>代码示例>>C#>>正文


C# VersionControlServer.DeleteWorkspace方法代码示例

本文整理汇总了C#中Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer.DeleteWorkspace方法的典型用法代码示例。如果您正苦于以下问题:C# VersionControlServer.DeleteWorkspace方法的具体用法?C# VersionControlServer.DeleteWorkspace怎么用?C# VersionControlServer.DeleteWorkspace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer的用法示例。


在下文中一共展示了VersionControlServer.DeleteWorkspace方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetLatestVerstion

 private string GetLatestVerstion(VersionControlServer versionControl, TfsGetCodeParams objTfsGetCodeParams)
 {
     Workspace[] workspaces = versionControl.QueryWorkspaces(objTfsGetCodeParams.WorkStationName, versionControl.AuthenticatedUser, Workstation.Current.Name);
     if (workspaces.Length > 0)
     {
         versionControl.DeleteWorkspace(objTfsGetCodeParams.WorkStationName, versionControl.AuthenticatedUser);
     }
     Workspace workspace = versionControl.CreateWorkspace(objTfsGetCodeParams.WorkStationName, versionControl.AuthenticatedUser, "Temporary Workspace");
     try
     {
         workspace.Map(objTfsGetCodeParams.SourcePath, objTfsGetCodeParams.TargetPath+"/"+objTfsGetCodeParams.BuildVersion );
         GetRequest request = new GetRequest(new ItemSpec(objTfsGetCodeParams.SourcePath, RecursionType.Full), VersionSpec.Latest);
         GetStatus status = workspace.Get(request, GetOptions.GetAll | GetOptions.Overwrite); // this line doesn't do anything - no failures or errors
         return "done";
     }
     finally
     {
         if (workspace != null)
         {
             workspace.Delete();
         }
     }
 }
开发者ID:RKishore222,项目名称:TestProject,代码行数:23,代码来源:GetLatestCodeFromTFS.cs

示例2: RemoveWorkspace

 private static void RemoveWorkspace(string workspaceName, VersionControlServer server)
 {
     TraceHelper.TraceInformation(TraceSwitches.TfsDeployer, "Removing Workspace{0}", workspaceName);
     if (server.QueryWorkspaces(workspaceName, server.AuthenticatedUser, Environment.MachineName).Length > 0)
     {
         server.DeleteWorkspace(workspaceName, server.AuthenticatedUser);
     }
 }
开发者ID:hopenbr,项目名称:HopDev,代码行数:8,代码来源:SourceCodeControlHelper.cs

示例3: SetupWorkspace

        private void SetupWorkspace(string workingDirectory, string cpSourceBranch, VersionControlServer versionControl)
        {
            List<WorkingFolder> workingFolders = new List<WorkingFolder>();
            workingFolders.Add(new WorkingFolder(cpSourceBranch, workingDirectory));

            // Create a workspace.
            Workspace[] workspaces = versionControl.QueryWorkspaces(sourcePuller.WorkspaceName, versionControl.AuthorizedUser, Environment.MachineName);

            if (workspaces.Length > 0)
                versionControl.DeleteWorkspace(sourcePuller.WorkspaceName, versionControl.AuthorizedUser);

            workspace = versionControl.CreateWorkspace(sourcePuller.WorkspaceName, versionControl.AuthorizedUser, "Work for GetTFSSourceUtil tool", workingFolders.ToArray(), Environment.MachineName);
        }
开发者ID:sushibobdavis,项目名称:GetTFSSourceUtil,代码行数:13,代码来源:SourcePullerManager.cs


注:本文中的Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer.DeleteWorkspace方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。