public static IMessageSend GetMessageSendType(MessageSendTypeEnum type) { switch (type) { case MessageSendTypeEnum.Email: return(new MessageEmail()); case MessageSendTypeEnum.SMS: return(new MessageSMS()); default: return(new MessageEmail()); } }
public bool Send(Message message, MessageSendTypeEnum sendType = MessageSendTypeEnum.Chat) { return(MessageSendFactory.GetMessageSendType(sendType).Send(message)); }