private static Service GetOrAddService(List<Service> services, string name) { var service = services.FirstOrDefault(s => s.Name == name); if (service == null) { service = new Service { Name = name }; services.Add(service); } return service; }
private static string GetServiceName(Service service) { if (service != null) { return service.ProvidedByModule != null ? service.ProvidedByModule.ModuleName : service.Name; } return string.Empty; }