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); }
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); }