Beispiel #1
0
        public static IMessage <IPersonInfo> ReadSocialCard(CardType cardType)
        {
            var info = new StringBuilder(1024);
            var ret  = TsPinvoke.ReadCardBas((int)cardType, info);

            return(ret == SocialSuccessCode
                ? CommonDeviceMsg <TsPersonInfo> .CreateSuccess(TsPersonInfo.CreateBySocialResult(info.ToString()))
                : CommonDeviceMsg <TsPersonInfo> .CreateFail(info.ToString()));
        }
Beispiel #2
0
        public static IMessage <IPersonInfo> ReadIdCard()
        {
            var info = new StringBuilder(2048);
            var ret  = TsPinvoke.ReadIdCard(NoCreatePhoto, string.Empty, new StringBuilder(1024 * 10), info);

            return(IdSuccessCode.Contains(ret)
                ? CommonDeviceMsg <TsPersonInfo> .CreateSuccess(TsPersonInfo.CreateByIdResult(ret, info.ToString()))
                : CommonDeviceMsg <TsPersonInfo> .CreateFail(info.ToString()));
        }