示例#1
0
        private ProcessStartInfo CreateUpdateProcessStartInfo(string arguments)
        {
            var updateExecutable = _updateExecutableLocationService.FindUpdateExecutable();
            //var executableFileName = _updateExecutableLocationService.GetApplicationExecutable();

            var startInfo = new ProcessStartInfo(updateExecutable)
            {
                Arguments              = arguments,
                WorkingDirectory       = Path.GetDirectoryName(updateExecutable),
                RedirectStandardOutput = true,
                UseShellExecute        = false,
                CreateNoWindow         = true
            };

            return(startInfo);
        }
示例#2
0
        public void GetDirectoryName_RootDirectory()
        {
            string result = Path.GetDirectoryName(@"C:\");

            Assert.AreEqual(string.Empty, result);
        }
示例#3
0
        public void GetDirectoryName_NormalDirectory()
        {
            string result = Path.GetDirectoryName(@"C:\ParentDirectory\ChildDirectory");

            Assert.AreEqual(@"C:\ParentDirectory", result);
        }