Skip to content
This repository has been archived by the owner on Apr 16, 2022. It is now read-only.

vizyviz/atlas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Atlas

Atlas is a .NET application framework which allows .NET developers to easily write, run, debug, and deploy Windows Services using a robust configuration model.

Atlas can be configured fluently, or through the app.config. Please refer to the Documentation for more advanced configuration options.

Use Nuget? - Atlas is also available via NuGet. It is recommended to use NuGet to get Atlas to ease your upgrade path as new builds are released.

####PM> Install-Package Atlas

###How do I use Atlas?### Simply implement the interface IAmAHostedProcess

public class MyService : IAmAHostedProcess
{
    public void Start()
    {
        // start processing
    }

    public void Stop()
    {
        // stop processing
    }

    public void Pause()
    {
        // pause processing
    }

    public void Resume()
    {
        // resume processing
    }

}

Then configure the Host and start the configuration in your Main() method. Refer to the Documentation for more configuration options.

static void Main(string[] args)
{
    var configuration = Host.Configure<MyService>().WithArguments(args); // creates configuration with defaults

    // then just start the configuration and away you go
    Host.Start(configuration);
}

Last, simply run your .exe from the command line with the arguments you desire. Refer to the Documentation for arguments list.

C:\myservice.exe /console