Last change
on this file 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:
898 bytes
|
Rev | Line | |
---|
[457] | 1 | using System.Collections.Generic;
|
---|
| 2 |
|
---|
| 3 | namespace Lextm.SharpSnmpLib.Mib.Elements.Types
|
---|
| 4 | {
|
---|
| 5 | public class OctetStringType : BaseType
|
---|
| 6 | {
|
---|
| 7 | private ValueRanges _size;
|
---|
| 8 |
|
---|
| 9 | public OctetStringType(IModule module, string name, ISymbolEnumerator symbols)
|
---|
| 10 | : base(module, name)
|
---|
| 11 | {
|
---|
| 12 | Symbol current = symbols.NextNonEOLSymbol();
|
---|
| 13 | if (current == Symbol.OpenParentheses)
|
---|
| 14 | {
|
---|
| 15 | symbols.PutBack(current);
|
---|
| 16 | _size = Lexer.DecodeRanges(symbols);
|
---|
| 17 | current.Assert(_size.IsSizeDeclaration, "SIZE keyword is required for ranges of octet string!");
|
---|
| 18 | }
|
---|
| 19 | else
|
---|
| 20 | {
|
---|
| 21 | symbols.PutBack(current);
|
---|
| 22 | _size = new ValueRanges(isSizeDecl: true);
|
---|
| 23 | }
|
---|
| 24 | }
|
---|
| 25 |
|
---|
| 26 | public ValueRanges Size
|
---|
| 27 | {
|
---|
| 28 | get { return _size; }
|
---|
| 29 | }
|
---|
| 30 | }
|
---|
| 31 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.