File: EntityBase.cs

package info (click to toggle)
lwip 2.2.1%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 10,008 kB
  • sloc: ansic: 109,524; cs: 6,714; sh: 115; makefile: 112; perl: 81
file content (46 lines) | stat: -rw-r--r-- 1,038 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System;

namespace Lextm.SharpSnmpLib.Mib.Elements.Entities
{
    public abstract class EntityBase: IEntity
    {
        private readonly IModule _module;
        private string _parent;
        private readonly uint   _value;
        private readonly string _name;

        public EntityBase(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols)
        {
            _module = module;
            _name   = preAssignSymbols[0].ToString();

            Lexer.ParseOidValue(symbols, out _parent, out _value);
        }

        public IModule Module
        {
            get { return _module; }
        }

        public string Parent
        {
            get { return _parent; }
            set { _parent = value; }
        }

        public uint Value
        {
            get { return _value; }
        }

        public string Name
        {
            get { return _name; }
        }
        
        public virtual string Description
        {
            get { return string.Empty; }
        }
    }
}