Пример #1
0
        bool HasOnlyNeededComponents(IEnumerable <string> installedComponents)
        {
            var needed = new List <string>(RequiredMsmqComponentsXp);

            foreach (var i in installedComponents)
            {
                if (UndesirableMsmqComponentsXp.Contains(i))
                {
                    return(false);
                }

                if (UndesirableMsmqComponentsV4.Contains(i))
                {
                    return(false);
                }
                needed.Remove(i);
            }

            if (needed.Count == 0)
            {
                return(true);
            }

            return(false);
        }
Пример #2
0
        private static bool HasOnlyNeededComponents(IEnumerable <string> installedComponents)
        {
            var needed = new List <string>(RequiredMsmqComponentsXp);

            foreach (var i in installedComponents)
            {
                if (UndesirableMsmqComponentsXp.Contains(i))
                {
                    Console.WriteLine("Undesirable MSMQ component installed: " + i);
                    return(false);
                }

                if (UndesirableMsmqComponentsV4.Contains(i))
                {
                    Console.WriteLine("Undesirable MSMQ component installed: " + i);
                    return(false);
                }

                needed.Remove(i);
            }

            if (needed.Count == 0)
            {
                return(true);
            }

            return(false);
        }