示例#1
0
        private static void BuildMap(List <ExtractedResult> results, WhatMap whatMap, TrustMap trustMap, HashSet <string> otherRunLocations)
        {
            // Populate the WhatMap and TrustMap
            for (int i = 0; i < results.Count; ++i)
            {
                ExtractedResult result = results[i];

                // Find the LocationSpecifier for the Result (the first Uri or FQN also in the other Run)
                string locationSpecifier = WhereComparer.LocationSpecifier(result, otherRunLocations);

                foreach (WhatComponent component in WhatComparer.WhatProperties(result, locationSpecifier))
                {
                    // Add Result attributes used as matching hints in a "bucket" for the Rule x LocationSpecifier x AttributeName
                    whatMap.Add(component, i);

                    // Track attribute usage to determine per-attribute trust
                    trustMap.Add(component);
                }
            }
        }