public ServicesHolder(IReadOnlyList <IServices> services) { for (int i = 0; i < services.Count; i++) { // Put in here services // Can be more optimized than that, but I don't have time if (sceneService == null) { sceneService = services[i] as SceneManagementService; } if (jsonConverter == null) { jsonConverter = services[i] as IConverter; } if (webLoader == null) { webLoader = services[i] as URLLoader; } if (bundleService == null) { bundleService = services[i] as BundleService; } } }
private static void FillContainers(IReadOnlyList <IServices> services) { for (int i = 0; i < services.Count; i++) { // Put in here services // Can be more optimized than that, but I don't have time if (sceneService == null) { sceneService = services[i] as SceneManagementService; } if (jsonConverter == null) { jsonConverter = services[i] as IConverter; } } }