[英]c# application that runs GPG commands
I am currently trying to create a c# service application
that uses service to encrypt files and decrypt files using gpg
commands automatically. 我目前正在尝试创建一个c# service application
,该c# service application
使用服务自动使用gpg
命令加密文件和解密文件。 Since there will be little to no user interaction, how do I implement inputting paths and file names to the service? 由于几乎没有用户交互,因此如何实现服务的输入路径和文件名? Currently, I did a simple hard-coded gpg
command in the service that runs the encryption. 当前,我在运行加密的服务中做了一个简单的硬编码gpg
命令。
A fairly simple option would be to configure input and output directories in your app.config and poll the input periodically using the Timer class. 一个相当简单的选项是在app.config中配置输入和输出目录,并使用Timer类定期轮询输入。
A slightly more complicated option would be to host a simple WCF service inside a win service that took input and output paths as parameters. 稍微复杂一点的选择是在win服务中托管一个简单的WCF服务,该服务将输入和输出路径作为参数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.