示例#1
0
        /// <summary>
        /// Bind additional fields.
        /// </summary>
        private void BindField(FieldMap[] map, bool caseSensitive, PSObject targetObject)
        {
            var hashtable = new ImmutableHashtable();

            if (map == null || map.Length == 0)
            {
                return;
            }

            for (var i = 0; i < map.Length; i++)
            {
                if (map[i] == null || map[i].Count == 0)
                {
                    continue;
                }

                foreach (var field in map[i])
                {
                    if (hashtable.ContainsKey(field.Key))
                    {
                        continue;
                    }

                    hashtable.Add(field.Key, _BindField(field.Value, caseSensitive, targetObject));
                }
            }
            hashtable.Protect();
            Field = hashtable;
        }
示例#2
0
 private MRQState(ImmutableHashtable<string, Converter<object,QueryMatcher>> qm,
                  ImmutableHashtable<string, Converter<object,HitCombiner>> hc) {
   QMFact = qm;
   HCFact = hc;
 }
示例#3
0
 public MRQState() {
   QMFact = ImmutableHashtable<string, Converter<object,QueryMatcher>>.Empty;
   HCFact = ImmutableHashtable<string, Converter<object,HitCombiner>>.Empty;
 }