public MessageEngine()
        {
            fEngineList = new IMessageReplyEngine[MESSAGE_TYPE_COUNT];

            for (int i = 0; i < MESSAGE_TYPE_COUNT; i++)
            {
                MessageType type = (MessageType)i;
                switch (type)
                {
                    case MessageType.Event:
                        fEngineList[i] = new EventReplyEngine();
                        break;
                    case MessageType.Text:
                    case MessageType.Voice:
                    case MessageType.Image:
                    case MessageType.Video:
                    case MessageType.Location:
                    case MessageType.Link:
                        fEngineList[i] = new NormalReplyEngine();
                        break;
                    default:
                        fEngineList[i] = EmptyReplyEngine.Engine;
                        break;
                }
            }
        }
Beispiel #2
0
        public MessageEngine()
        {
            fEngineList = new IMessageReplyEngine[MESSAGE_TYPE_COUNT];

            for (int i = 0; i < MESSAGE_TYPE_COUNT; i++)
            {
                MessageType type = (MessageType)i;
                switch (type)
                {
                case MessageType.Event:
                    fEngineList[i] = new EventReplyEngine();
                    break;

                case MessageType.Text:
                case MessageType.Voice:
                case MessageType.Image:
                case MessageType.Video:
                case MessageType.Location:
                case MessageType.Link:
                    fEngineList[i] = new NormalReplyEngine();
                    break;

                default:
                    fEngineList[i] = EmptyReplyEngine.Engine;
                    break;
                }
            }
        }