Beispiel #1
0
        /// <summary>
        ///  Add a Result attribute to the map.
        /// </summary>
        /// <param name="component">WhatComponent for a Result attribute used in baselining</param>
        public void Add(WhatComponent component)
        {
            TrustKey key = new TrustKey(component);

            TrustValue value = null;

            if (!_map.TryGetValue(key, out value))
            {
                value     = new TrustValue();
                _map[key] = value;
            }

            value.Add(component);
        }
Beispiel #2
0
        public void Add(WhatComponent component, int index)
        {
            if (component.PropertyValue == null)
            {
                return;
            }

            if (_map.TryGetValue(component, out int existingIndex) && existingIndex != index)
            {
                // If the map has another of this value, set index -1 to indicate non-unique.
                _map[component] = -1;
            }
            else
            {
                // Otherwise, point to the result.
                _map[component] = index;
            }
        }
Beispiel #3
0
 public TrustKey(WhatComponent component) : this(component.PropertySet, component.PropertyName)
 {
 }
Beispiel #4
0
 public void Add(WhatComponent component)
 {
     this.UseCount++;
     this.UniqueValues.Add(component.PropertyValue);
 }