C# library to monitor all external dependencies of your app. An external dependency or "The Other", can be anything that your current app is depentent, like others systems, web apis, web services and databases.
CSS JavaScript C#
Switch branches/tags
Nothing to show
Clone or download
Latest commit 7ef4c5c Nov 26, 2013

README.md

TheOthers

Build Status

C# library to monitor all external dependencies of your app. An external dependency or "The Other", can be anything that your current app is depentent, like others systems, web apis, web services and databases.


Features


Setup

For ASP .NET MVC projects

PM> Install-Package TheOthers.Mvc

For any other .NET projects

PM> Install-Package TheOthers

Usage

Creating your external dependency from scratch

public class LegacySystemExternalDependecy : ExternalDependencyBase
{
	public LegacySystemExternalDependecy () : base("Legacy system")
	{
	}

	protected override ExternalDependencyStatus PerformCheckStatus ()
	{
		var result = new ExternalDependencyStatus();
		
		if(LegacySystemService.Login())
		{
			result.IsFailing = false;
		}
		else {
			result.IsFailing = true;
			result.Description = "Login failed.";
		}
	}
}

Creating your external dependency for database

public class StatisticsDbExternalDependency : DbExternalDependencyBase
{
    public StatisticsDbExternalDependency()
        : base("Statistis Database", "StatisticsDb") // StatisticsDb is the name of connection string on .config file.
    {
    }
}

Creating your external dependency for web

public class GitHubExternalDependency : WebExternalDependencyBase
{
    public GitHubExternalDependency()
        : base("GitHub", "http://www.github.com", HttpStatusCode.OK)
    {
    }
}

Discovering all external dependencies

var theOthers = ExternalDependencyService.GetAllExternalDepencies ();

Checking all external dependencies status at once

var theOthersStatus = ExternalDependencyService.CheckAllExternalDependenciesStatus ();

Rendering a TheOthers monitor on your MVC project

@Html.TheOthers().BootstrapMonitor()

// or

@Html.TheOthers().BasicTableMonitor()

Roadmap

  • Implement others external dependencies base classes:
    • WmiExternalDependencyBase
    • WcfExternalDependencyBase
    • RestExternalDependencyBase
  • Create a .config section handler to configure some external dependecies.

How to improve it?

Create a fork of TheOthers.

Did you change it? Submit a pull request.

License

Licensed under the The MIT License (MIT). In others words, you can use this library for developement any kind of software: open source, commercial, proprietary and alien.

Change Log

  • 0.5.0 First version.