void OnMessageHandleAsync(MessageData msgdata)
        {
            CommunicationHandlerAsyncBase handler = null;
            switch (msgdata.TragetPlatform)
            {
                case PlatformType.Encrypt:
                    handler = new EncryptCommunicationHandlerAsync();
                    break;
                case PlatformType.Payment:
                case PlatformType.PaymentDownload:
                    handler = new PayCommunicationHandlerAsync();
                    break;
                case PlatformType.Core:
                    handler = new CoreCommunicationHandlerAsync();
                    break;
                case PlatformType.FingerMarks:
                    //handler = new MarkComminicationHandler();
                    break;
                default:
                    handler = new NullableHandlerAsync();
                    break;
            }

            if (_handlerCompleteAsync != null)
            {
                //lock (_handlerCompleteAsync)
                {
                    handler.MessageAsyncHandler(msgdata, _handlerCompleteAsync);
                }
            }
            else
            {
                _handlerCompleteAsync = new MessageHandlerCompleteAsync(MessageHandleAsync_Completed);
                //lock (_handlerCompleteAsync)
                {
                    handler.MessageAsyncHandler(msgdata, _handlerCompleteAsync);
                }
            }
        }
        void OnMessageHandleAsync(MessageData msgdata)
        {
            CommunicationHandlerAsyncBase handler = null;
            switch (msgdata.TragetPlatform)
            {
                case PlatformType.Encrypt:
                    //handler = new EncryptCommunicationHandler();
                    break;
                case PlatformType.Core:
                    handler = new CoreCommunicationHandlerAsync();
                    break;
                default:

                    break;
            }

            if (_handlerCompleteAsync != null)
            {
                //lock (_handlerCompleteAsync)
                {
                    handler.MessageAsyncHandler(msgdata, _handlerCompleteAsync);
                }
            }
            else
            {
                _handlerCompleteAsync = new MessageHandlerCompleteAsync(MessageHandleAsync_Completed);
                //lock (_handlerCompleteAsync)
                {
                    handler.MessageAsyncHandler(msgdata, _handlerCompleteAsync);
                }
            }
        }