public BaseCapability Capability(SystemCapability systemCapability)
        {
            BaseCapability capability;

            if (_capabilities.TryGetValue(systemCapability, out capability))
            {
                return(capability);
            }

            return(null);
        }
 public void EnableCapability(SystemCapability capability, bool enabled)
 {
     if (enabled)
     {
         if (!IsCapabilityEnabled(capability))
         {
             _capabilities[capability] = SystemCapabilityHelper.Create(capability);
         }
     }
     else
     {
         _capabilities.Remove(capability);
     }
 }
Esempio n. 3
0
        public static BaseCapability Create(SystemCapability systemCapability)
        {
            switch (systemCapability)
            {
            case SystemCapability.iCloud:
                return(new ICloudCapability());

            case SystemCapability.PushNotifications:
                return(new PushNotificationsCapability());

            case SystemCapability.GameCenter:
                return(new GameCenterCapability());

            case SystemCapability.Wallet:
                return(new WalletCapability());

            case SystemCapability.Siri:
                return(new SiriCapability());

            case SystemCapability.ApplePay:
                return(new ApplePayCapability());

            case SystemCapability.InAppPurchase:
                return(new InAppPurchaseCapability());

            case SystemCapability.Maps:
                return(new MapsCapability());

            case SystemCapability.GameControllers:
                return(new GameControllersCapability());

            case SystemCapability.PersonalVPN:
                return(new PersonalVPNCapability());

            case SystemCapability.NetworkExtensions:
                return(new NetworkExtensionsCapability());

            case SystemCapability.HotspotConfiguration:
                return(new HotspotConfigurationCapability());

            case SystemCapability.Multipath:
                return(new MultipathCapability());

            case SystemCapability.NFCTagReading:
                return(new NFCTagReadingCapability());

            case SystemCapability.BackgroundModes:
                return(new BackgroundModesCapability());

            case SystemCapability.InterAppAudio:
                return(new InterAppAudioCapability());

            case SystemCapability.KeychainSharing:
                return(new KeychainSharingCapability());

            case SystemCapability.AssociatedDomains:
                return(new AssociatedDomainsCapability());

            case SystemCapability.AppGroups:
                return(new AppGroupsCapability());

            case SystemCapability.DataProtection:
                return(new DataProtectionapability());

            case SystemCapability.HomeKit:
                return(new HomeKitCapability());

            case SystemCapability.HealthKit:
                return(new HealthKitCapability());

            case SystemCapability.WirelessAccessoryConfiguration:
                return(new WirelessAccessoryConfigurationCapability());

            default:
                throw new System.ArgumentOutOfRangeException();
            }
        }
Esempio n. 4
0
        public static string Name(SystemCapability capability)
        {
            switch (capability)
            {
            case SystemCapability.iCloud:
                return("iCloud");

            case SystemCapability.PushNotifications:
                return("Push Notifications");

            case SystemCapability.GameCenter:
                return("Game Center");

            case SystemCapability.Wallet:
                return("Wallet");

            case SystemCapability.Siri:
                return("Siri");

            case SystemCapability.ApplePay:
                return("Apple Pay");

            case SystemCapability.InAppPurchase:
                return("In-App Purchase");

            case SystemCapability.Maps:
                return("Maps");

            case SystemCapability.GameControllers:
                return("Game Controllers");

            case SystemCapability.PersonalVPN:
                return("Personal VPN");

            case SystemCapability.NetworkExtensions:
                return("Network Extensions");

            case SystemCapability.HotspotConfiguration:
                return("Hotspot Configuration");

            case SystemCapability.Multipath:
                return("Multipath");

            case SystemCapability.NFCTagReading:
                return("Near Field Communication Tag Reading");

            case SystemCapability.BackgroundModes:
                return("Background Modes");

            case SystemCapability.InterAppAudio:
                return("Inter-App Audio");

            case SystemCapability.KeychainSharing:
                return("Keychain Sharing");

            case SystemCapability.AssociatedDomains:
                return("Associated Domains");

            case SystemCapability.AppGroups:
                return("App Groups");

            case SystemCapability.DataProtection:
                return("Data Protection");

            case SystemCapability.HomeKit:
                return("HomeKit");

            case SystemCapability.HealthKit:
                return("HealthKit");

            case SystemCapability.WirelessAccessoryConfiguration:
                return("Wireless Accessory Configuration");

            default:
                throw new System.ArgumentOutOfRangeException();
            }
        }
 public bool IsCapabilityEnabled(SystemCapability capability)
 {
     return(_capabilities.ContainsKey(capability));
 }
Esempio n. 6
0
        void DrawCapability(SystemCapability systemCapability, BaseCapability capability)
        {
            switch (systemCapability)
            {
            case SystemCapability.iCloud:
                DrawICloudCapability(capability as ICloudCapability);
                break;

            case SystemCapability.PushNotifications:
                DrawPushNotificationsCapability(capability as PushNotificationsCapability);
                break;

            case SystemCapability.GameCenter:
                DrawGameCenterCapability(capability as GameCenterCapability);
                break;

            case SystemCapability.Wallet:
                DrawWalletCapability(capability as WalletCapability);
                break;

            case SystemCapability.Siri:
                DrawSiriCapability(capability as SiriCapability);
                break;

            case SystemCapability.ApplePay:
                DrawApplePayCapability(capability as ApplePayCapability);
                break;

            case SystemCapability.InAppPurchase:
                DrawInAppPurchaseCapability(capability as InAppPurchaseCapability);
                break;

            case SystemCapability.Maps:
                DrawMapsCapability(capability as MapsCapability);
                break;

            case SystemCapability.GameControllers:
                DrawGameControllersCapability(capability as GameControllersCapability);
                break;

            case SystemCapability.PersonalVPN:
                DrawPersonalVPNCapability(capability as PersonalVPNCapability);
                break;

            case SystemCapability.NetworkExtensions:
                DrawNetworkExtensionsCapability(capability as NetworkExtensionsCapability);
                break;

            case SystemCapability.HotspotConfiguration:
                DrawHotspotConfigurationCapability(capability as HotspotConfigurationCapability);
                break;

            case SystemCapability.Multipath:
                DrawMultipathCapability(capability as MultipathCapability);
                break;

            case SystemCapability.NFCTagReading:
                DrawNFCTagReadingCapability(capability as NFCTagReadingCapability);
                break;

            case SystemCapability.BackgroundModes:
                DrawBackgroundModesCapability(capability as BackgroundModesCapability);
                break;

            case SystemCapability.InterAppAudio:
                DrawInterAppAudioCapability(capability as InterAppAudioCapability);
                break;

            case SystemCapability.KeychainSharing:
                DrawKeychainSharingCapability(capability as KeychainSharingCapability);
                break;

            case SystemCapability.AssociatedDomains:
                DrawAssociatedDomainsCapability(capability as AssociatedDomainsCapability);
                break;

            case SystemCapability.AppGroups:
                DrawAppGroupsCapability(capability as AppGroupsCapability);
                break;

            case SystemCapability.DataProtection:
                DrawDataProtectionapability(capability as DataProtectionapability);
                break;

            case SystemCapability.HomeKit:
                DrawHomeKitCapability(capability as HomeKitCapability);
                break;

            case SystemCapability.HealthKit:
                DrawHealthKitCapability(capability as HealthKitCapability);
                break;

            case SystemCapability.WirelessAccessoryConfiguration:
                DrawWirelessAccessoryConfigurationCapability(capability as WirelessAccessoryConfigurationCapability);
                break;

            default:
                throw new System.ArgumentOutOfRangeException();
            }
        }