BLL.Workflows.EffectiveMunkiTemplate.GetAllUniqueConditions C# (CSharp) Метод

GetAllUniqueConditions() приватный Метод

private GetAllUniqueConditions ( ) : List
Результат List
        private List<string> GetAllUniqueConditions()
        {
            var allConditions = new List<string>();

            foreach (var templateId in _templateIds)
            {

                allConditions.AddRange(
                    BLL.MunkiManagedInstall.GetAllManagedInstallsForMt(templateId)
                        .Where(x => !string.IsNullOrEmpty(x.Condition))
                        .Select(x => x.Condition)
                        .ToList());

                allConditions.AddRange(
                    BLL.MunkiManagedUninstall.GetAllManagedUnInstallsForMt(templateId)
                        .Where(x => !string.IsNullOrEmpty(x.Condition))
                        .Select(x => x.Condition)
                        .ToList());

                allConditions.AddRange(
                    BLL.MunkiOptionalInstall.GetAllOptionalInstallsForMt(templateId)
                        .Where(x => !string.IsNullOrEmpty(x.Condition))
                        .Select(x => x.Condition)
                        .ToList());

                allConditions.AddRange(
                    BLL.MunkiManagedUpdate.GetAllManagedUpdatesForMt(templateId)
                        .Where(x => !string.IsNullOrEmpty(x.Condition))
                        .Select(x => x.Condition)
                        .ToList());

                allConditions.AddRange(
                    BLL.MunkiIncludedManifest.GetAllIncludedManifestsForMt(templateId)
                        .Where(x => !string.IsNullOrEmpty(x.Condition))
                        .Select(x => x.Condition)
                        .ToList());
            }

            return allConditions.Distinct(StringComparer.CurrentCultureIgnoreCase).ToList();
        }