Switched out the schedulers, this seems to be a better implimentation to the previous and is easier to add new "jobs" in.

This commit is contained in:
tidusjar 2016-04-19 13:37:58 +01:00
commit 9c61f909de
32 changed files with 1237 additions and 1091 deletions

View file

@ -24,11 +24,13 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// ************************************************************************/
#endregion
using System;
using Nancy.TinyIoc;
namespace PlexRequests.UI.Helpers
{
public class ServiceLocator
public class ServiceLocator : IServiceLocator
{
static ServiceLocator()
{
@ -46,5 +48,16 @@ namespace PlexRequests.UI.Helpers
{
return Container?.Resolve<T>();
}
public object Resolve(Type type)
{
return Container.Resolve(type);
}
}
public interface IServiceLocator
{
T Resolve<T>() where T : class;
object Resolve(Type type);
}
}