Created
May 23, 2015 18:57
-
-
Save anonymous/557284161332bf9d1d1d to your computer and use it in GitHub Desktop.
Simple IoC container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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