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;
            }
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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)
 {
 }
Esempio n. 5
0
        //public string AbsoluteDiskPath { get; private set; }

        public TfsSourceControlContext(TfsSourceControlProvider provider, string sourcePath) 
            : this(provider, sourcePath, null) { }
Esempio n. 6
0
        //public string AbsoluteDiskPath { get; private set; }

        public TfsSourceControlContext(TfsSourceControlProvider provider, string sourcePath)
            : this(provider, sourcePath, null)
        {
        }