source: azure_iot_hub_f767zi/trunk/asp_baseplatform/lwip/contrib-2.1.0/apps/LwipMibCompiler/SharpSnmpLib/Mib/Elements/TrapType.cs@ 457

Last change on this file since 457 was 457, checked in by coas-nagasima, 4 years ago

ファイルを追加

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-csharp;charset=UTF-8
File size: 1.1 KB
Line 
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
10namespace 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}
Note: See TracBrowser for help on using the repository browser.