Exemplo n.º 1
0
        private List <string> GetAllUniqueConditions()
        {
            var allConditions = new List <string>();

            foreach (var templateId in _templateIds)
            {
                allConditions.AddRange(
                    _munkiManifestTemplateServices.GetAllManagedInstallsForMt(templateId)
                    .Where(x => !string.IsNullOrEmpty(x.Condition))
                    .Select(x => x.Condition)
                    .ToList());

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

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

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

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

            return(allConditions.Distinct(StringComparer.CurrentCultureIgnoreCase).ToList());
        }
Exemplo n.º 2
0
 public IEnumerable <MunkiManifestIncludedManifestEntity> GetManifestIncludedManifests(int id)
 {
     return(_munkiManifestTemplateServices.GetAllIncludedManifestsForMt(id));
 }