コード例 #1
0
        public static async Task <SmartCardAppletIdGroupRegistration> RegisterAidGroup(string displayName, IList <IBuffer> appletIds, SmartCardEmulationCategory?emulationCategory, SmartCardEmulationType emulationType, bool automaticEnablement)
        {
            try
            {
                var cardAidGroup = new SmartCardAppletIdGroup(displayName, appletIds, (SmartCardEmulationCategory)emulationCategory, emulationType);
                cardAidGroup.AutomaticEnablement = automaticEnablement;

                var reg = await SmartCardEmulator.RegisterAppletIdGroupAsync(cardAidGroup);

                LogMessage("AID group successfully registered", NotifyType.StatusMessage);

                return(reg);
            }
            catch (Exception ex)
            {
                LogMessage("Failed to register AID group: " + ex.ToString(), NotifyType.StatusMessage);
                throw;
            }
        }
コード例 #2
0
        public static async Task<SmartCardAppletIdGroupRegistration> RegisterAidGroup(string displayName, IList<IBuffer> appletIds, SmartCardEmulationCategory? emulationCategory, SmartCardEmulationType emulationType, bool automaticEnablement)
        {
            try
            {
                var cardAidGroup = new SmartCardAppletIdGroup(
                    displayName, 
                    appletIds, 
                    (SmartCardEmulationCategory)emulationCategory, 
                    emulationType);
                cardAidGroup.AutomaticEnablement = automaticEnablement;

                var reg = await SmartCardEmulator.RegisterAppletIdGroupAsync(cardAidGroup);
                LogMessage("AID group successfully registered", NotifyType.StatusMessage);

                return reg;
            }
            catch (Exception ex)
            {
                LogMessage("Failed to register AID group: " + ex.ToString(), NotifyType.StatusMessage);
                throw;
            }
        }