Table of Contents

Class TLVCollection

Namespace
Inetlab.SMPP.Parameters
Assembly
Inetlab.SMPP.dll

Collection of optional parameters in TLV format.

public class TLVCollection : List<TLV>, IList<TLV>, ICollection<TLV>, IList, ICollection, IReadOnlyList<TLV>, IReadOnlyCollection<TLV>, IEnumerable<TLV>, IEnumerable
Inheritance
TLVCollection
Implements
Inherited Members

Constructors

TLVCollection()

Initializes a new instance of the List<T> class that is empty and has the default initial capacity.

public TLVCollection()

TLVCollection(EncodingMapper)

[Obsolete("Use default constructor instead.")]
public TLVCollection(EncodingMapper mapper)

Parameters

mapper EncodingMapper

TLVCollection(SmppClientBase)

[Obsolete("Use default constructor instead.")]
public TLVCollection(SmppClientBase client)

Parameters

client SmppClientBase

Properties

this[OptionalTags]

public byte[] this[OptionalTags tag] { get; set; }

Parameters

tag OptionalTags

Property Value

byte[]

this[int]

public TLV this[int index] { get; set; }

Parameters

index int

Property Value

TLV

this[ushort]

public TLV this[ushort tag] { get; set; }

Parameters

tag ushort

Property Value

TLV

Methods

Add(OptionalTags, byte)

public void Add(OptionalTags tag, byte val)

Parameters

tag OptionalTags
val byte

Add(OptionalTags, byte[])

public void Add(OptionalTags tag, byte[] val)

Parameters

tag OptionalTags
val byte[]

Add(OptionalTags, int)

public void Add(OptionalTags tag, int val)

Parameters

tag OptionalTags
val int

Add(OptionalTags, string)

public void Add(OptionalTags tag, string val)

Parameters

tag OptionalTags
val string

Add(OptionalTags, string, DataCodings)

[Obsolete("Use method Add(OptionalTags tag, string val, Encoding encoding)")]
public void Add(OptionalTags tag, string val, DataCodings dataCoding)

Parameters

tag OptionalTags
val string
dataCoding DataCodings

Add(OptionalTags, string, Encoding)

public void Add(OptionalTags tag, string val, Encoding encoding)

Parameters

tag OptionalTags
val string
encoding Encoding

Add(OptionalTags, ushort)

public void Add(OptionalTags tag, ushort val)

Parameters

tag OptionalTags
val ushort

Add(OptionalTags, uint)

public void Add(OptionalTags tag, uint val)

Parameters

tag OptionalTags
val uint

Add(TLV)

public void Add(TLV tlv)

Parameters

tlv TLV

Add(ushort, byte[])

public void Add(ushort tag, byte[] val)

Parameters

tag ushort
val byte[]

Of<T>()

public IEnumerable<T> Of<T>() where T : TLV

Returns

IEnumerable<T>

Type Parameters

T

RegisterParameter<TParameter>(OptionalTags)

public static void RegisterParameter<TParameter>(OptionalTags tag) where TParameter : TLV

Parameters

tag OptionalTags

Type Parameters

TParameter

RegisterParameter<TParameter>(ushort)

Registers the TLV parameter for a tag value.

public static void RegisterParameter<TParameter>(ushort tag) where TParameter : TLV

Parameters

tag ushort

The tag.

Type Parameters

TParameter

Type of the parameter.

Examples

TLVCollection.RegisterParameter<MyTLVParameter>(0x1410); ... MyTLVParameter myParameter = pdu.Parameters.Of<MyTLVParameter>();

Exceptions

ArgumentException

throw ArgumentException if type of registering parameter doesn't have constructor with one argument of type byte[].