SnmpSharpNet.Vb.encode C# (CSharp) Метод

encode() публичный Метод

BER encode the variable binding
public encode ( MutableByte buffer ) : void
buffer MutableByte class to the end of which encoded variable /// binding values will be added. ///
Результат void
        public override void encode(MutableByte buffer)
        {
            // encode oid to the temporary buffer
            MutableByte oidbuf = new MutableByte();
            _oid.encode(oidbuf);
            // encode value to a temporary buffer
            MutableByte valbuf = new MutableByte();
            _value.encode(valbuf);

            // calculate data content length of the vb
            int vblen = oidbuf.Length + valbuf.Length;
            // encode vb header at the end of the result
            BuildHeader(buffer, Type, vblen);
            // add values to the encoded arrays to the end of the result
            buffer.Append(oidbuf);
            buffer.Append(valbuf);
        }