Windows 喜欢在 LINUX 中使用 MONO 进行服务开发? [英] Windows like services development in LINUX using MONO?

查看:31
本文介绍了Windows 喜欢在 LINUX 中使用 MONO 进行服务开发?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚从 .net 开发转到 LINUX MONO 开发……而且我之前在 linux 开发方面没有太多经验……

I just moved from .net development to LINUX MONO development... and i don have much experience with linux dev earlier..

  1. 我需要在mono c#中创建一个后台服务(如windows服务)..有可能吗..

  1. I have a requirement to create a background service (like windows services) in mono c#.. is it possible..

是否可以从 mono c# 访问 LINUX 本机 API.(比如来自 win c# 的 winAPI 调用)..

And is it possible to access the LINUX native APIs from mono c#. (like winAPI calls from win c#)..

推荐答案

  1. Mono 附带一个名为 mono-service 的 Windows 服务兼容系统.

  1. Mono ships with a Windows Service compatible system called mono-service.

  • 服务的 Unix 词是 Daemon.常规守护程序可以在/etc/init.d/中找到,并通过从/etc/rc.* 目录进行符号链接安装到它们应该运行的运行级别.

像往常一样使用 p/invoke.您还可以查看其他一些基于单声道的简单项目(如 Banshee)的源代码,了解它们如何在 Linux 上执行 p/invokes.只需在 google.com/codesearch 上搜索女妖.

Just use p/invoke like you normally would. You can also check out the source code of some other simple mono-based projects like Banshee to see how they do p/invokes on Linux. Just search for banshee on google.com/codesearch.

这篇关于Windows 喜欢在 LINUX 中使用 MONO 进行服务开发?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆