Exemplo n.º 1
0
        public Action FromFile(IFileSystemInfo fileSystemInfo)
        {
            var path = fileSystemInfo.FullName.GetUniversalName();

            var action = new Action()
            {
                Name          = path.IsRoot ? path.StringRepresentation : fileSystemInfo.FileNameWithContext(),
                CommandObject = StartProcess.FromFileName(path),
                LastUseTime   = fileSystemInfo.LastWriteTimeUtc,
            };

            log.InfoFormat("Created action for {0}", path);
            return(action);
        }
Exemplo n.º 2
0
        public static StartProcess FromFileName(string fileName)
        {
            var p = new StartProcess()
            {
                FileName = fileName,
            };

            // verb selection for roboform cards
            if (Path.GetExtension(fileName).Equals(".rfp", StringComparison.InvariantCultureIgnoreCase))
            {
                p.Verb = "Login";
            }

            return(p);
        }