public TfsSourceControlContext(TfsSourceControlProvider provider, string sourcePath, string label, string workspaceDiskPath) { this.Label = label; if (string.IsNullOrEmpty(sourcePath)) { this.SourcePath = EmptyPathString; } else { this.SourcePath = sourcePath.TrimStart(provider.DirectorySeparator); } this.SplitPath = SplitPathParts(this.SourcePath); this.LastSubDirectoryName = this.SplitPath.LastOrDefault() ?? string.Empty; this.WorkspaceDiskPath = workspaceDiskPath; if (string.IsNullOrEmpty(provider.CustomWorkspaceName)) { this.WorkspaceName = BuildWorkspaceName(this.WorkspaceDiskPath); } else { this.WorkspaceName = provider.CustomWorkspaceName; } }
public TfsSourceControlContext(TfsSourceControlProvider provider, string sourcePath, string label) { this.Label = label; if (string.IsNullOrEmpty(sourcePath)) { this.SourcePath = EmptyPathString; } else { this.SourcePath = sourcePath.TrimStart(provider.DirectorySeparator); } this.SplitPath = SplitPathParts(this.SourcePath); this.LastSubDirectoryName = this.SplitPath.LastOrDefault() ?? string.Empty; var tmpRepo = new SourceRepository() { RemoteUrl = BuildAbsoluteDiskPath(provider.BaseUrl, this.SplitPath) }; this.WorkspaceDiskPath = tmpRepo.GetDiskPath(provider.Agent.GetService <IFileOperationsExecuter>()); //this.RepositoryRelativePath = this.SourcePath.TrimStart(EmptyPathString.ToCharArray()); //this.AbsoluteDiskPath = BuildAbsoluteDiskPath(this.WorkspaceDiskPath, this.SplitPath); this.WorkspaceName = BuildWorkspaceName(this.WorkspaceDiskPath); }
public TfsSourceControlContext(TfsSourceControlProvider provider, string sourcePath, string label) { this.Label = label; if (string.IsNullOrEmpty(sourcePath)) this.SourcePath = EmptyPathString; else this.SourcePath = sourcePath.TrimStart(provider.DirectorySeparator); this.SplitPath = SplitPathParts(this.SourcePath); this.LastSubDirectoryName = this.SplitPath.LastOrDefault() ?? string.Empty; var tmpRepo = new SourceRepository() { RemoteUrl = BuildAbsoluteDiskPath(provider.BaseUrl, this.SplitPath) }; this.WorkspaceDiskPath = tmpRepo.GetDiskPath(provider.Agent.GetService<IFileOperationsExecuter>()); //this.RepositoryRelativePath = this.SourcePath.TrimStart(EmptyPathString.ToCharArray()); //this.AbsoluteDiskPath = BuildAbsoluteDiskPath(this.WorkspaceDiskPath, this.SplitPath); this.WorkspaceName = BuildWorkspaceName(this.WorkspaceDiskPath); }
public TfsSourceControlContext(TfsSourceControlProvider provider, string sourcePath, string workspaceDiskPath) : this(provider, sourcePath, null, workspaceDiskPath) { }
//public string AbsoluteDiskPath { get; private set; } public TfsSourceControlContext(TfsSourceControlProvider provider, string sourcePath) : this(provider, sourcePath, null) { }