-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
36 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,26 @@ | ||
using System; | ||
using HeboTech.ATLib.PDU; | ||
|
||
namespace HeboTech.ATLib.DTOs | ||
{ | ||
public class Sms | ||
{ | ||
public Sms(SmsStatus status, PhoneNumberDTO sender, DateTimeOffset receiveTime, string message) | ||
: this(status, sender, receiveTime, message, 0, 1, 1) | ||
protected Sms(MessageTypeIndicatorInbound messageTypeIndicator) | ||
{ | ||
MessageTypeIndicator = messageTypeIndicator; | ||
} | ||
|
||
public Sms(SmsStatus status, PhoneNumberDTO sender, DateTimeOffset receiveTime, string message, int messageReferenceNumber, int totalNumberOfParts, int partNumber) | ||
protected Sms(MessageTypeIndicatorInbound messageTypeIndicator, int messageReference) | ||
: this(messageTypeIndicator) | ||
{ | ||
Status = status; | ||
Sender = sender; | ||
ReceiveTime = receiveTime; | ||
Message = message; | ||
MessageReferenceNumber = messageReferenceNumber; | ||
TotalNumberOfParts = totalNumberOfParts; | ||
PartNumber = partNumber; | ||
MessageReference = messageReference; | ||
} | ||
|
||
public SmsStatus Status { get; } | ||
public PhoneNumberDTO Sender { get; } | ||
public DateTimeOffset ReceiveTime { get;} | ||
public string Message { get; } | ||
public int MessageReferenceNumber { get; } | ||
public int TotalNumberOfParts { get; } | ||
public int PartNumber { get; } | ||
public int MessageReference { get; } | ||
public MessageTypeIndicatorInbound MessageTypeIndicator { get; } | ||
|
||
public override string ToString() | ||
{ | ||
return $"Sender:\t\t{Sender}{Environment.NewLine}ReceiveTime:\t{ReceiveTime}{Environment.NewLine}Ref. no.:\t{MessageReferenceNumber}{Environment.NewLine}Part:\t\t{PartNumber}/{TotalNumberOfParts}{Environment.NewLine}Message:\t{Message}"; | ||
return $"MTI: {MessageTypeIndicator}, Msg. ref.: {MessageReference}"; | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,14 @@ | ||
using System; | ||
|
||
namespace HeboTech.ATLib.DTOs | ||
namespace HeboTech.ATLib.DTOs | ||
{ | ||
public class SmsWithIndex : Sms | ||
public class SmsWithIndex | ||
{ | ||
public SmsWithIndex(int index, SmsStatus status, PhoneNumberDTO sender, DateTimeOffset receiveTime, string message) | ||
: base(status, sender, receiveTime, message) | ||
{ | ||
Index = index; | ||
} | ||
|
||
public SmsWithIndex(int index, SmsStatus status, PhoneNumberDTO sender, DateTimeOffset receiveTime, string message, int messageReferenceNumber, int totalNumberOfParts, int partNumber) | ||
: base(status, sender, receiveTime, message, messageReferenceNumber, totalNumberOfParts, partNumber) | ||
public SmsWithIndex(Sms sms, int index) | ||
{ | ||
Sms = sms; | ||
Index = index; | ||
} | ||
|
||
public Sms Sms { get; } | ||
public int Index { get; } | ||
|
||
public override string ToString() | ||
{ | ||
return $"Index:\t\t{Index}{Environment.NewLine}" + base.ToString(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters