VsTeXProject.VisualStudio.Project.ProjectNode.ProcessFiles C# (CSharp) Метод

ProcessFiles() защищенный Метод

Loads file items from the project file into the hierarchy.
protected ProcessFiles ( ) : void
Результат void
        protected internal virtual void ProcessFiles()
        {
            var subitemsKeys = new List<string>();
            var subitems = new Dictionary<string, MSBuild.ProjectItem>();

            // Define a set for our build items. The value does not really matter here.
            var items = new Dictionary<string, MSBuild.ProjectItem>();

            // Process Files
            foreach (var item in buildProject.Items)
            {
                // Ignore the item if it is a reference or folder
                if (FilterItemTypeToBeAddedToHierarchy(item.ItemType))
                    continue;

                // MSBuilds tasks/targets can create items (such as object files),
                // such items are not part of the project per say, and should not be displayed.
                // so ignore those items.
                if (!IsItemTypeFileType(item.ItemType))
                    continue;

                // If the item is already contained do nothing.
                // TODO: possibly report in the error list that the the item is already contained in the project file similar to Language projects.
                if (items.ContainsKey(item.EvaluatedInclude.ToUpperInvariant()))
                    continue;

                // Make sure that we do not want to add the item, dependent, or independent twice to the ui hierarchy
                items.Add(item.EvaluatedInclude.ToUpperInvariant(), item);

                var dependentOf = item.GetMetadataValue(ProjectFileConstants.DependentUpon);

                if (!CanFileNodesHaveChilds || string.IsNullOrEmpty(dependentOf))
                {
                    AddIndependentFileNode(item);
                }
                else
                {
                    // We will process dependent items later.
                    // Note that we use 2 lists as we want to remove elements from
                    // the collection as we loop through it
                    subitemsKeys.Add(item.EvaluatedInclude);
                    subitems.Add(item.EvaluatedInclude, item);
                }
            }

            // Now process the dependent items.
            if (CanFileNodesHaveChilds)
            {
                ProcessDependentFileNodes(subitemsKeys, subitems);
            }
        }
ProjectNode