当前位置: 首页 > news >正文

怎么建设网站怎么样如何做网站内部优化

怎么建设网站怎么样,如何做网站内部优化,做公益网站有什么要求,广告接单有什么平台有些时候需要在程序中启动和管理其他应用进程#xff0c;当碰到这样的需求的时候可以通过Process对象来完成#xff1b;为了让使用和管理更方便在这基础上封装 了BeetleX.ServicesProcess组件#xff0c;通过组件的管理中心让进程操作更方便#xff0c;同时还集成了Web套件…         有些时候需要在程序中启动和管理其他应用进程当碰到这样的需求的时候可以通过Process对象来完成为了让使用和管理更方便在这基础上封装 了BeetleX.ServicesProcess组件通过组件的管理中心让进程操作更方便同时还集成了Web套件可直接集成在BeetleX.FastHttpApi中进行Web管理。        BeetleX.ServicesProcess组件提供了ProcessCenter对象来添加管理启动和停止等进程管理功能。具体功能方法如下:public class ProcessCenter : IDisposable{public ProcessCenter();public ProcessCenter(ILogHandler logHandler);public ServiceManagementConfig Config { get; }public void Add(string name, string file, string path, string args, bool autoStartup false);public void Add(ProcessInfo info);public void AutoStartup();public void ChangeUser(string admin, string pwd);public void Delete(string id);public void Dispose();public ServiceProcess GetProcess(string id);public void Modify(string id, ProcessInfo info);public void Start(string id);public void StartAll();public void Stop(string id);public void StopAll();}以上是组件封装的方法使用起来非常简单。        接下来主要介绍如何在BeetleX.FastHttpApi中集成它的web管理功能创建一个控制台项目引用BeetleX.WebFamily组件引用后编写以下代码class Program{static void Main(string[] args){WebHost host new WebHost();host.IsWindowsServices true;WebHost.Title Service Management;WebHost.HeaderModel beetlex-process-header;WebHost.HomeModel beetlex-process-home;WebHost.TabsEnabled false;host.RegisterComponentProgram();host.RegisterComponentBeetleX.ServicesProcess.ProcessCenter();host.UseFontawesome();host.UseElement(PageStyle.Element);host.Setting(o {o.SetDebug();o.Port 80;o.LogLevel LogType.Info;});host.Initialize((http, vue, rec) {BeetleX.ServicesProcess.WebController controller new BeetleX.ServicesProcess.WebController();controller.Init(new logHandler(http));http.ActionFactory.Register(controller, new BeetleX.FastHttpApi.ControllerAttribute { BaseUrl process });rec.AddCss(website.css);vue.Debug();});host.Run();}}class logHandler : BeetleX.ServicesProcess.ILogHandler{public logHandler(BeetleX.FastHttpApi.HttpApiServer sever){mServer sever;}private BeetleX.FastHttpApi.HttpApiServer mServer;public void Error(string message){mServer.GetLog(LogType.Error)?.Log(LogType.Error, null, message);}public void Info(string message){mServer.GetLog(LogType.Info)?.Log(LogType.Info, null, message);}}启动项目后可以查看启动日志接下来就可以通过浏览器访问进程管理页面如果有需要还可以把当前示例项目发布成windows service发布后即可以使用sc命令来创建、启动、停止和删除服务。完整示例代码https://github.com/beetlex-io/BeetleX-Samples/tree/master/Web.ServiceManagement
http://www.sadfv.cn/news/242116/

相关文章:

  • 上海创意型网站建设网站建设制作 南京公司
  • 做网站 徐州wordpress 合法评论
  • 使用php做的学校网站退役厅门户网站建设中标公告
  • 做网站开发要安装哪些软件网站 建设 步骤是
  • 管理网站 开发html企业网站模板免费下载
  • 网站建设公司一般几个人杭州网站建设价格
  • 怎么建立一个网站广告h5海报是怎么做出来的
  • 关于设计网站西安做网站公司必达
  • 用百度地图 做gis网站广告设计与制作培训机构
  • 哈尔滨服务好的建站方案昆明短视频制作公司
  • 宿州网站建设多少钱12380举报网站建设经验
  • 怎样设立网站顶呱呱做网站
  • 微网站建设制作设计兴化网站网站建设
  • 沈阳大型网站建设上海微网站制作建设
  • 上海十大it外包公司搜索引擎优化哪些方面
  • 做国外网站调查挣取零花钱怎么做网站内部搜索功能
  • 惠州 网站建设杭州网站制作工作室
  • 精品课程网站建设 碧辉腾乐wordpress主题插件免费下载
  • 网站开发项目提成制作ppt的步骤
  • 拨号地址怎么做网站wordpress缓存怎么清理
  • 用jsp源码做网站上海网站制作方法
  • 住房城乡建设局网站首页点点网 wordpress
  • 网站有标题网站怎么做友情连接
  • 做网站的边框wordpress 404模板
  • 学网站开发网页制作安装百度到桌面
  • 医药类网站建设评价酒类营销网站
  • 优跃达官网网站建设项目外贸网站建设公司流程
  • 手机单页网站生成系统wordpress文件
  • 网站后台运营怎么做嵌入式转行到网站开发
  • 网站建设创新点网站开发技术网站模板