Skip to content

Instantly share code, notes, and snippets.

Created May 23, 2015 18:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/557284161332bf9d1d1d to your computer and use it in GitHub Desktop.
Save anonymous/557284161332bf9d1d1d to your computer and use it in GitHub Desktop.
Simple IoC container
internal class ResourceManager
{
#region Singleton
private static Lazy<ResourceManager> instance = new Lazy<ResourceManager>(() => new ResourceManager());
internal static ResourceManager Instance { get { return instance.Value; } }
private ResourceManager()
{
}
#endregion
internal IAuthenticationService AuthenticationService { get; private set; }
internal ITripService TripService { get; private set; }
internal IContactService ContactService { get; private set; }
internal IAlertService AlertService { get; private set; }
internal ICheckpointService CheckpointService { get; private set; }
internal void Configure(IAuthenticationService authService, ITripService tripService,
IContactService contactService, IAlertService alertService,
ICheckpointService checkpointService)
{
AuthenticationService = authService;
TripService = tripService;
ContactService = contactService;
AlertService = alertService;
CheckpointService = checkpointService;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment