Boo.BooLangStudioSpecs.Intellisense.IntellisenseDeclarationsTestExtensionMethods.GetExpectedDeclarations C# (CSharp) Method

GetExpectedDeclarations() private static method

private static GetExpectedDeclarations ( this declarations, string expectedDeclarationNames ) : bool>.Dictionary
declarations this
expectedDeclarationNames string
return bool>.Dictionary
        private static Dictionary<string, bool> GetExpectedDeclarations(this IntellisenseDeclarations declarations, string[] expectedDeclarationNames)
        {
            var foundDeclarations = new Dictionary<string, bool>();

            // setup expectations
            foreach (var name in expectedDeclarationNames)
            {
                foundDeclarations[name] = false;
            }

            // iterate declarations, setting each found one in the foundDecs dictionary
            for (int i = 0; i < declarations.GetCount(); i++)
            {
                string name = declarations.GetName(i);

                if (foundDeclarations.ContainsKey(name))
                    foundDeclarations[name] = true;
            }
            return foundDeclarations;
        }