STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
Imports.cs
Go to the documentation of this file.
1 /*
2  * Created by SharpDevelop.
3  * User: lextm
4  * Date: 2008/5/31
5  * Time: 12:07
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.Elements
13 {
17  public sealed class Imports : List<ImportsFrom>, IElement
18  {
19  private IModule _module;
20 
25  public Imports(IModule module, ISymbolEnumerator symbols)
26  {
27  _module = module;
28 
30  while ((current = symbols.NextSymbol()) != Symbol.Semicolon)
31  {
32  if (current == Symbol.EOL)
33  {
34  continue;
35  }
36 
37  ImportsFrom imports = new ImportsFrom(current, symbols);
38 
39  this.Add(imports);
40  }
41  }
42 
43  public IList<string> Dependents
44  {
45  get
46  {
47  List<string> result = new List<string>();
48 
49  foreach (ImportsFrom import in this)
50  {
51  result.Add(import.Module);
52  }
53 
54  return result;
55  }
56  }
57 
58  public ImportsFrom GetImportFromType(string type)
59  {
60  foreach (ImportsFrom import in this)
61  {
62  if (import.Types.Contains(type))
63  {
64  return import;
65  }
66  }
67 
68  return null;
69  }
70 
71  #region IElement Member
72 
73  public IModule Module
74  {
75  get { return _module; }
76  }
77 
78  #endregion
79 
80  }
81 }
MIB Module interface.
Definition: IModule.cs:36
static readonly Symbol EOL
Definition: Symbol.cs:198
ImportsFrom GetImportFromType(string type)
Definition: Imports.cs:58
static readonly Symbol Semicolon
Definition: Symbol.cs:189
The IMPORTS construct is used to specify items used in the current MIB module which are defined in an...
Definition: Imports.cs:17
Imports(IModule module, ISymbolEnumerator symbols)
Creates an Imports instance.
Definition: Imports.cs:25
Description of Symbol.
Definition: Symbol.cs:20