예제 #1
0
        internal string Check()
        {
            var result = new StringBuilder();

            foreach (var missingRequirement in Required.Where(req => !Provided.Contains(req)))
            {
                result.AppendLine("ERROR: " + missingRequirement.Source + " requires " + Context + " " + missingRequirement.Value + " but it's missing");
            }

            if (CheckForAdditionals)
            {
                foreach (var additional in Provided.Where(req => !Required.Contains(req)))
                {
                    result.AppendLine("WARN: " + additional.Source + " provides " + Context + " " + additional.Value + " but it's never used");
                }
            }

            return(result.ToString());
        }