public string GetCurrentExecutableFilename()
        {
            var filename = GetCurrentFilename();

            if (PortableExecutableFileHelpers.IsExecutable(filename))
            {
                return(filename);
            }
            return(null);
        }
예제 #2
0
        public override bool IsSupported(string filename, out ProcessStarterResult result)
        {
            result = ProcessStarterResult.None;

            if (!PortableExecutableFileHelpers.IsExecutable(filename))
            {
                return(false);
            }

            if (!StringComparer.OrdinalIgnoreCase.Equals(Path.GetExtension(filename), ".exe"))
            {
                result |= ProcessStarterResult.WrongExtension;
            }
            return(true);
        }
예제 #3
0
 public override bool IsSupported(string filename) => PortableExecutableFileHelpers.IsExecutable(filename);