Example #1
0
 public static ISms NewSms(Guid applicationId)
 {
     var sms = new Sms
               	{
               		ApplicationId = applicationId,
                                 ReferenceId = Guid.NewGuid()
               	};
     return sms;
 }
Example #2
0
File: Smsc.cs Project: jeden/unisms
        private static void PreProcessSms(Sms sms)
        {
            if (sms.Processed)
                throw new InvalidSmsOperationException(EnSmsOperation.AlreadyProcessed, sms);

            sms.VerifyMessage();
        }
Example #3
0
File: Sms.cs Project: jeden/unisms
        internal static Sms SafeCast(IReadOnlySms message)
        {
            Sms sms;

            sms = new Sms
                  	{
                  		ApplicationId = message.ApplicationId,
                  		ReferenceId = message.ReferenceId,
                  		Sender = message.Sender,
                  		Message = message.Message
                  	};

            foreach (string recipient in message.Recipients)
                sms.AddRecipient(recipient);

            return sms;
        }