我首先举一个例子: 阿帕奇网络服务器(视窗)有一个冰盖特征:它既可以作为独立应用(既有用户特权),也可以作为窗口直接安装和运行(作为地方系统账户),同时使用同样的可执行手段。
申请要作为单独申请,它所需要的一切都符合某些公共部门的静态主(主)的要求。
为使申请能够安装和运行,必须采用某种方式实施“服务基础”和“安装”。 但是,如果像这种申请一样作为单独申请,它将显示电文箱。
如何实现这种阿帕奇类行动模式? 我认为,解决办法是简单的,但我确实没有想法可以开始。
以下守则用于援引服务。 是否可以修改该术语,允许单独使用?
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main()
{
ServiceBase[] ServicesToRun;
ServicesToRun = new ServiceBase[]
{
new Service() // defined elsewhere as Service : ServiceBase
};
ServiceBase.Run(ServicesToRun);
}
}
我选择的语言是C#。
<><>Edit>: 目前,我已将共同守则单独编成大会(请其图书馆查阅),我有两个可执行之处:Console.exe 和 Service.exe, 这两者分别是独立和窗口服务应用程序,两者都只是援引图书馆。
我的目标是将这些两名可起诉者合并成一个,这仍需要图书馆。