STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
MibDocument.cs
Go to the documentation of this file.
1 /*
2  * Created by SharpDevelop.
3  * User: lextm
4  * Date: 2008/5/17
5  * Time: 17:38
6  *
7  * To change this template use Tools | Options | Coding | Edit Standard Headers.
8  */
9 
10 using System.Collections.Generic;
11 
12 namespace Lextm.SharpSnmpLib.Mib
13 {
17  public sealed class MibDocument
18  {
19  private readonly List<IModule> _modules = new List<IModule>();
20 
25  public MibDocument(string file)
26  : this(new Lexer(file))
27  {
28  }
29 
34  public MibDocument(Lexer lexer)
35  {
36  ISymbolEnumerator symbols = lexer.GetEnumerator();
37 
39  while ((current = symbols.NextNonEOLSymbol()) != null)
40  {
41  symbols.PutBack(current);
42  _modules.Add(new MibModule(symbols));
43  }
44  }
45 
49  public IList<IModule> Modules
50  {
51  get
52  {
53  return _modules;
54  }
55  }
56  }
57 }
MibDocument(string file)
Initializes a new instance of the MibDocument class.
Definition: MibDocument.cs:25
ISymbolEnumerator GetEnumerator()
Definition: Lexer.cs:36
MibDocument(Lexer lexer)
Initializes a new instance of the MibDocument class.
Definition: MibDocument.cs:34
Lexer class that parses MIB files into symbol list.
Definition: Lexer.cs:21
Description of Symbol.
Definition: Symbol.cs:20