Microsoft.Silverlight.Testing.Client.TestMethodData.CheckForKnownBugs C# (CSharp) Method

CheckForKnownBugs() private method

Runs through the metadata for bugs.
private CheckForKnownBugs ( ) : void
return void
        private void CheckForKnownBugs()
        {
            // TODO: Instead move this logic into the model manager.
            // This needs to be a set of events off of the main harness!

            List<string> knownBugs = new List<string>(2);
            List<string> fixedBugs = new List<string>(2);

            ICollection<Attribute> bugs = ReflectionUtility.GetAttributes(_metadata, typeof(BugAttribute), false);
            if (bugs != null && bugs.Count > 0)
            {
                foreach (Attribute attribute in bugs)
                {
                    BugAttribute bug = (BugAttribute)attribute;
                    if (bug.Fixed)
                    {
                        fixedBugs.Add(bug.Description);
                    }
                    else
                    {
                        knownBugs.Add(bug.Description);
                    }
                }
            }

            if (knownBugs.Count > 0)
            {
                KnownBugs = knownBugs;
            }
            if (fixedBugs.Count > 0)
            {
                FixedBugs = fixedBugs;
            }
        }