Ejemplo n.º 1
0
 private void AddObjectType(ObjectTypeRecord record)
 {
     lock (AccessLock)
     {
         _profile.ObjectTypeList.Add(record);
     }
     NotifyPropertyChange("ObjectTypeList"); // this forces the set property / INotifyPropertyCHange
 }
Ejemplo n.º 2
0
        public List <AHAItem> Search(String query, Dictionary <String, List <String> > types)
        {
            log.Debug("Searching " + query);
            query = removeAHASymbol(query);
            query = query.Replace("/", "*");

            this.options = new SearchStreamOptionsRecord();
            options.Q    = query;

            List <ObjectTypeRecord> typeFilters = new List <ObjectTypeRecord>();

            if (types != null && types.Count > 0)
            {
                foreach (String typeKey in types.Keys)
                {
                    ObjectTypeRecord typeFilter = new ObjectTypeRecord();
                    typeFilter.Type     = typeKey;
                    typeFilter.Subtypes = types[typeKey];

                    typeFilters.Add(typeFilter);
                    if (typeFilter.Subtypes == null)
                    {
                        log.Debug("Type " + typeFilter.Type);
                    }
                    else
                    {
                        log.Debug("Type " + typeFilter.Type + ", Subtypes " + string.Join(",", typeFilter.Subtypes.ToArray()));
                    }
                }
            }
            options.TypeFilters = typeFilters;
            options.SortAttr    = new List <String> {
                "USAGE_SORT"
            };
            return(InvokeSearch(options));
        }
Ejemplo n.º 3
0
 public KvpResult(ObjectTypeRecord record)
 {
     _name   = record.Index.ToString();
     _value  = record.Name;
     _object = record;
 }