ln.snmp/types/NullValue.cs

41 lines
990 B
C#
Raw Normal View History

2019-03-04 06:50:05 +01:00
// /**
// * File: NullValue.cs
// * Author: haraldwolff
// *
// * This file and it's content is copyrighted by the Author and / or copyright holder.
// * Any use wihtout proper permission is illegal and may lead to legal actions.
// *
// *
// **/
using System;
2019-03-11 08:57:19 +01:00
using ln.snmp.asn1;
2019-03-04 06:50:05 +01:00
namespace ln.snmp.types
{
public class NullValue : Variable
{
public static NullValue Instance = new NullValue();
byte[] value = new byte[0];
2019-03-11 08:57:19 +01:00
public NullValue()
2019-03-04 06:50:05 +01:00
:base(new Identifier(IdentifierClass.UNIVERSAL,false,0x05))
{
}
public override byte[] Bytes { get => value;
set
{
if (value.Length > 0)
throw new NotImplementedException();
}
}
public override object Value { get => null; set => throw new NotImplementedException(); }
2019-03-04 12:06:45 +01:00
public override string ToString()
{
return "[Null]";
}
2019-03-04 06:50:05 +01:00
}
}