3 namespace Lextm.SharpSnmpLib.Mib.Elements.Types
11 private string _description;
12 private string _reference;
15 [
System.Diagnostics.CodeAnalysis.SuppressMessage(
"Microsoft.Usage",
"CA1801:ReviewUnusedParameters", MessageId =
"module")]
21 _displayHint = ParseDisplayHint(symbols);
22 _status = ParseStatus(symbols);
23 _description = ParseDescription(symbols);
24 _reference = ParseReference(symbols);
25 _syntax = ParseSyntax(module, symbols);
34 return new DisplayHint(symbols.NextNonEOLSymbol().ToString().Trim(
new char[] {
'"' }));
48 return (
Status)Enum.Parse(typeof(
Status), symbols.NextNonEOLSymbol().ToString());
50 catch (ArgumentException)
52 current.Assert(
false,
"Invalid/Unknown status");
63 return symbols.NextNonEOLSymbol().ToString().Trim(
new char[] {
'"' });
72 string reference = symbols.NextNonEOLSymbol().ToString();
73 if ((reference.Length >= 2) && reference.StartsWith(
"\"") && reference.EndsWith(
"\""))
75 return reference.Substring(1, reference.Length-2);
125 get {
return _module; }
130 get {
return _name; }
135 get {
return _displayHint == null ? null : _displayHint.
ToString(); }
140 get {
return _status; }
143 public string Description
145 get {
return _description; }
148 public string Reference
150 get {
return _reference; }
155 get {
return _syntax; }
211 #region ITypeReferrer Member 215 get {
return _syntax; }
216 set { _syntax = value; }
override string ToString()
static readonly Symbol Reference
static readonly Symbol Status
bool PutBack(Symbol item)
TextualConvention(IModule module, string name, ISymbolEnumerator symbols)
static readonly Symbol Description
static readonly Symbol DisplayHint
Lexer class that parses MIB files into symbol list.
ITypeAssignment ReferredType
static ITypeAssignment ParseBasicTypeDef(IModule module, string name, ISymbolEnumerator symbols, bool isMacroSyntax=false)
static readonly Symbol Syntax