Now, assuming you have set a reference to your MathServiceLibrary.dll and System.ServiceModel.
dll assemblies, all you need to do is make use of the ServiceHost type within the OnStart() and
OnStop() methods of your Windows service type. Open the code file for your service host class (by
right-clicking the designer and selecting View Code), and add the following logic:
// Be sure to import these namespaces:
I N T R O D U C I N G W I N D O W S C O M M U N I C AT I O N F O U N D AT I O N
public partial class MathWinService: ServiceBase
{
Do'stlaringiz bilan baham: