Listings

Listings uit Service Locator Pattern – SDN Magazine #141

Listing 7: using System; using System.Collections.Generic; using UnityEngine; /// <summary> /// Simple service locator for <see cref="IApplicationService"/> instances. /// </summary> public class ServiceLocator {     private ServiceLocator() { }     /// <summary>     /// currently registered services.     /// </summary>     private readonly Dictionary<string, IApplicationService> services = new Dictionary<string, IApplicationService>();     /// <summary>     /// Gets the currently active service …

Read More »