public static IMessageSend GetMessageSendType(MessageSendTypeEnum type)
        {
            switch (type)
            {
            case MessageSendTypeEnum.Email:
                return(new MessageEmail());

            case MessageSendTypeEnum.SMS:
                return(new MessageSMS());

            default:
                return(new MessageEmail());
            }
        }
コード例 #2
0
 public bool Send(Message message, MessageSendTypeEnum sendType = MessageSendTypeEnum.Chat)
 {
     return(MessageSendFactory.GetMessageSendType(sendType).Send(message));
 }