// Retrieve entries of a type
 public ItemInfo GetEntries(EntryInfoKind kind)
 {
     if (Selector.IsTest)
     {
         return(new ItemInfo());
     }
     if (Gateway == null)
     {
         return(new ItemInfo());
     }
     return(new ItemInfo()
     {
         Name = Name,
         Items = Gateway.GetEntryInfoDict(kind),
     });
 }
Esempio n. 2
0
        ///------------------------------------------------------------------------
        /// Functions to provide formatted dictionary of strings for external tools
        ///

        // Searches current scope, not parent
        public Dictionary <string, string> GetEntryInfoDict(EntryInfoKind kind)
        {
            switch (kind)
            {
            case EntryInfoKind.Relation:
                return(GetEntryValuesDict(ce => ce.IsDatabase, ce => ce.RelationToStringValue()));

            case EntryInfoKind.Variable:
                return(GetEntryValuesDict(ce => ce.IsVariable, ce => ce.ValueToStringValue()));

            case EntryInfoKind.Operator:
                return(GetEntryValuesDict(ce => ce.IsCode, ce => ce.CodeToStringValue()));

            case EntryInfoKind.Type:
                return(GetEntryValuesDict(ce => ce.IsType, ce => ce.TypeToStringValue()));

            default:
                break;
            }
            return(new Dictionary <string, string>());
        }
Esempio n. 3
0
        //--- A gateway for catalog level access

        public abstract Dictionary <string, string> GetEntryInfoDict(EntryInfoKind kind);
Esempio n. 4
0
 public override Dictionary <string, string> GetEntryInfoDict(EntryInfoKind kind)
 {
     return(_catalog.PersistentVars.GetEntryInfoDict(kind));
 }