コード例 #1
0
ファイル: FileActionFactory.cs プロジェクト: sidiandi/hagen
        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);
        }
コード例 #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);
        }