godsharp - GodSharp.Mina 0.0.1-preview1

Package Description

PM> Install-Package GodSharp.Mina -Version 0.0.1-preview1 -Source https://www.myget.org/F/godsharp/api/v3/index.json

Copy to clipboard

> nuget.exe install GodSharp.Mina -Version 0.0.1-preview1 -Source https://www.myget.org/F/godsharp/api/v3/index.json

Copy to clipboard

> dotnet add package GodSharp.Mina --version 0.0.1-preview1 --source https://www.myget.org/F/godsharp/api/v3/index.json

Copy to clipboard
<PackageReference Include="GodSharp.Mina" Version="0.0.1-preview1" />
Copy to clipboard
source https://www.myget.org/F/godsharp/api/v3/index.json

nuget GodSharp.Mina  ~> 0.0.1-preview1
Copy to clipboard

> choco install GodSharp.Mina --version 0.0.1-preview1 --source https://www.myget.org/F/godsharp/api/v2

Copy to clipboard
Import-Module PowerShellGet
Register-PSRepository -Name "godsharp" -SourceLocation "https://www.myget.org/F/godsharp/api/v2"
Install-Module -Name "GodSharp.Mina" -RequiredVersion "0.0.1-preview1" -Repository "godsharp" -AllowPreRelease
Copy to clipboard

Mina

license GitHub code size in bytes

A simple window service library for .net .

Build Status

Branch Status
master Build status
dev Build status
release Build status
Name Stable Preview
Mina MyGet NuGet MyGet NuGet

Usage

Install

You can install Mina via NuGet:

PM> Install-Package GodSharp.Mina

Use

  1. Add a class and inherited from MinaService, then override methods OnInitialize, OnStart, OnStop, OnPause, OnContinue, OnCustomCommand, OnShutdown, which you need.
public class MinaSampleService:MinaService
{
    public override void OnStart(string[] args)
    {
    }

    public override void OnStop()
    {
    }

    public override void OnPause()
    {
    }

    public override void OnContinue()
    {
    }

    public override void OnShutdown()
    {
    }

    public override void OnCustomCommand(int command)
    {
    }
}
  1. Run service, you can use the following method.
MinaHost.Run(new MinaOption(),new MinaSampleService(),args);
MinaHost.Run((o)=>{},new MinaSampleService(),args);
MinaHost.Run<MinaSampleService>(new MinaOption(),args);
MinaHost.Run<MinaSampleService>((o)=>{},args);

Service

The service install/uninstall, start/restart/pause/continue/stop, command.

The example service name is sample.exe.

Help

Syntax:

service.exe -h[elp]
service.exe /h[elp]

Sample:

sample.exe -h
sample.exe -help
sample.exe /h
sample.exe /help

Install

Syntax:

service.exe -i[nstall]
service.exe /i[nstall]

Sample:

sample.exe -i
sample.exe -install
sample.exe /i
sample.exe /install

Uninstall

Syntax:

service.exe -u[ninstall]
service.exe /u[ninstall]

Sample:

sample.exe -u
sample.exe -uninstall
sample.exe /u
sample.exe /uninstall

Start

Syntax:

service.exe -start
service.exe /start

Sample:

sample.exe -start
sample.exe /start

Restart

Syntax:

service.exe -r[estart]
service.exe /r[estart]

Sample:

sample.exe -r
sample.exe -restart
sample.exe /r
sample.exe /restart

Pause

Syntax:

service.exe -p[ause]
service.exe /p[ause]

Sample:

sample.exe -p
sample.exe -pause
sample.exe /p
sample.exe /pause

Continue

Syntax:

service.exe -c[ontinue]
service.exe /c[ontinue]

Sample:

sample.exe -c
sample.exe -continue
sample.exe /c
sample.exe /continue

Stop

Syntax:

service.exe -stop
service.exe /stop

Sample:

sample.exe -stop
sample.exe /stop

Command

Syntax:

service.exe -cmd|command command-parameter
service.exe /cmd|command command-parameter

command-parameter is int type.

Sample:

sample.exe -cmd 1
sample.exe -command 1
sample.exe /cmd 1
sample.exe /command 1

Sample

See sample project

  • .NETFramework 3.5
  • .NETFramework 4.0
  • .NETFramework 4.5
  • .NETFramework 4.6
  • .NETFramework 4.7
  • .NETFramework 3.5: 3.5.0.0
  • .NETFramework 4.0: 4.0.0.0
  • .NETFramework 4.5: 4.5.0.0
  • .NETFramework 4.6: 4.6.0.0
  • .NETFramework 4.7: 4.7.0.0

Owners

Seay

Authors

seayxu

Project URL

https://github.com/godsharp/Mina

License

MIT

Info

3 total downloads
3 downloads for version 0.0.1-preview1
Download (56.47 KB)
Found on the current feed only

Package history

Version Size Last updated Downloads Mirrored?
0.0.1-preview1 56.47 KB Tue, 24 Apr 2018 15:09:20 GMT 3