STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
TrapType.cs
Go to the documentation of this file.
1 /*
2  * Created by SharpDevelop.
3  * User: lextm
4  * Date: 2008/5/31
5  * Time: 12:20
6  *
7  * To change this template use Tools | Options | Coding | Edit Standard Headers.
8  */
9 
10 namespace Lextm.SharpSnmpLib.Mib.Elements
11 {
12  public sealed class TrapType : IDeclaration
13  {
14  private readonly IModule _module;
15  private readonly string _name;
16  private readonly int _value;
17 
18  public TrapType(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols)
19  {
20  _module = module;
21  _name = preAssignSymbols[0].ToString();
22 
23  Symbol valueSymbol = symbols.NextNonEOLSymbol();
24 
25  bool succeeded = int.TryParse(valueSymbol.ToString(), out _value);
26  valueSymbol.Assert(succeeded, "not a decimal");
27  }
28 
29  public int Value
30  {
31  get { return _value; }
32  }
33 
34  #region IDeclaration Member
35 
36  public IModule Module
37  {
38  get { return _module; }
39  }
40 
41  public string Name
42  {
43  get { return _name; }
44  }
45 
46  #endregion
47  }
48 }
MIB Module interface.
Definition: IModule.cs:36
TrapType(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols)
Definition: TrapType.cs:18
Description of Symbol.
Definition: Symbol.cs:20
override string ToString()
Returns a String that represents this Symbol.
Definition: Symbol.cs:83