Migration from v1.x to 2.x
How to solve some compile issues:
SmppClient
Missing
BatchMonitor
class. Use insteadclient.Submit(IEnumerable<SubmitSm> batch)
. It waits when all responses will be received for a batch.Events
evBindComplete
,evSubmitComplete
,evQueryComplete
were depricated. It is possible to use async await pattern or ContinueWith for correspondingBind
,Submit
,Query
methods._client.AddressRange
,_client.AddrNpi
and_client.AddrTon
must be specified as_client.EsmeAddress = new SmeAddress(AddressRange, AddrTon, AddrNpi);
Sequence number and Command Status are moved to Header property of PDU.
data.Status
replaced withdata.Header.Status
,data.Sequence
replaced withdata.Header.Sequence
client.GetMessageText
is moved toclient.EncodingMapper.GetMessageText
PDU Properties
SourceAddrTon
,SourceAddrNpi
,SourceAddr
replaced withSourceAddress
of typeSmeAddress
DestAddrTon
,DestAddrNpi
,DestAddr
replaced withDestinationAddress
of typeSmeAddress
UserDataPdu
replaced withUserData
Optional
replaced withParameters
Property
MessageText
inSubmitSm
,SubmitMulti
,DeliverSm
,DataSm
,ReplaceSm
classes is deprecated. Use the methodpdu.GetMessageText(client.EncodingMapper)
.Method
SmppClientBase.MapEncoding
moved toSmppClientBase.EncodingMapper.MapEncoding
SmppServer
Namespace for
SmppServerClient
class changed toInetlab.SMPP
.IPEndPoint of the server must be specified in
SmppServer
constructor, instead ofStart
method of this class.
Serialization
Method submitSm.Serialize
can be replaced with extension method:
byte[] pduData = submitSm.Serialize(client.EncodingMapper);
Static method SubmitSm.Deserialize
can be replaced with code:
byte[] pduData = ...;
SubmitSm pdu = pduData.Deserialize<SubmitSm>(client.EncodingMapper);