Ejemplo n.º 1
0
        public static string GetAffectedVolume(this VssWMFileDescriptor fileDesc, IUIHost host)
        {
            string expandedPath = AppendBackslash(Environment.ExpandEnvironmentVariables(fileDesc.Path));

            try
            {
                return(Volume.GetUniqueVolumeNameForPath(host, expandedPath, true));
            }
            catch
            {
                return(expandedPath);
            }
        }
Ejemplo n.º 2
0
            private static string GetAffectedVolume(VssWMFileDescriptor fileDesc)
            {
                string expandedPath = AppendBackslash(Environment.ExpandEnvironmentVariables(fileDesc.Path));

                try
                {
                    return(Volume.GetUniqueVolumeNameForPath(expandedPath));
                }
                catch
                {
                    return(expandedPath);
                }
            }
Ejemplo n.º 3
0
        private string FileToPathSpecification(VssWMFileDescriptor file)
        {
            // Environment variables are common.
            string path = Environment.ExpandEnvironmentVariables(file.Path);

            // Use the alternate location if it's present.
            if (!String.IsNullOrEmpty(file.AlternateLocation))
            {
                path = Environment.ExpandEnvironmentVariables(file.AlternateLocation);
            }

            // Normalize wildcard usage.
            string specification = file.FileSpecification.Replace("*.*", "*");

            // Combine the file specification and the directory name.
            return(Path.Combine(path, file.FileSpecification));
        }
Ejemplo n.º 4
0
 public static string GetExpandedPath(this VssWMFileDescriptor fileDesc)
 {
     return(AppendBackslash(Environment.ExpandEnvironmentVariables(fileDesc.Path)));
 }