Exemplo n.º 1
0
        //-----------------------------------
        public static IEnumerable <ITableDefinition> FromMib(
            CEasyQuerySource laBase,
            IDefinition rootDefinition,
            CEasyQuerySourceFolder folderRacine)
        {
            List <ITableDefinition> lst = new List <ITableDefinition>();

            if (laBase.Tables.FirstOrDefault(t => t.GetType() == typeof(CTableDefinitionStructureSNMP)) == null)
            {
                CTableDefinitionStructureSNMP table = new CTableDefinitionStructureSNMP();
                if (folderRacine != null)
                {
                    table.FolderId = folderRacine.Id;
                }
                lst.Add(table);
                table.Fill(rootDefinition);
                laBase.AddTableUniquementPourObjetConnexion(table);
            }
            FillListeTables(laBase, rootDefinition, lst, folderRacine);
            return(lst.AsReadOnly());
        }
Exemplo n.º 2
0
        //-----------------------------------
        public static IEnumerable <ITableDefinition> FromMib(
            CEasyQuerySource laBase,
            ObjectRegistryBase mibBase,
            CEasyQuerySourceFolder folderRacine)
        {
            List <ITableDefinition> lst = new List <ITableDefinition>();

            if (laBase.Tables.FirstOrDefault(t => t.GetType() == typeof(CTableDefinitionStructureSNMP)) == null)
            {
                CTableDefinitionStructureSNMP table = new CTableDefinitionStructureSNMP();
                if (folderRacine != null)
                {
                    table.FolderId = folderRacine.Id;
                }
                lst.Add(table);
                table.Fill(mibBase);
                laBase.AddTable(table);
            }
            FillListeTables(laBase, mibBase.Tree.Root, lst, folderRacine);
            return(lst.AsReadOnly());
        }