Ejemplo n.º 1
0
        public FilesAndFolderChanges(PListDictionary dic)
        {
            if (dic == null)
            {
                return;
            }

            var entries = dic.ArrayValue(ENTRIES_KEY);

            if (entries == null)
            {
                return;
            }

            for (int ii = 0; ii < entries.Count; ++ii)
            {
                var entryDic = entries.DictionaryValue(ii);

                if (entryDic == null)
                {
                    continue;
                }

                var entry = FileAndFolderEntryFactory.Create(entryDic);

                if (entry != null)
                {
                    _entries.Add(entry);
                }
            }
        }
Ejemplo n.º 2
0
        public FolderEntry(PListDictionary dic)
            : base(dic)
        {
            var entryDics = dic.ArrayValue(ENTRIES_KEY);

            if (entryDics != null)
            {
                foreach (var entryDic in entryDics)
                {
                    var entry = FileAndFolderEntryFactory.Create(entryDic as PListDictionary);
                    AddEntry(entry);
                }
            }
            else
            {
                //Try and load old keys
                var files = dic.ArrayValue("Files");

                if (files != null)
                {
                    for (int ii = 0; ii < files.Count; ii++)
                    {
                        var entry = FileAndFolderEntryFactory.CreateFromObsolete(files.DictionaryValue(ii));

                        if (entry != null)
                        {
                            AddEntry(entry);
                        }
                    }
                }

                var folders = dic.ArrayValue("Folders");

                if (folders != null)
                {
                    for (int ii = 0; ii < folders.Count; ii++)
                    {
                        var entry = FileAndFolderEntryFactory.CreateFromObsolete(folders.DictionaryValue(ii));

                        if (entry != null)
                        {
                            AddEntry(entry);
                        }
                    }
                }
            }
        }
Ejemplo n.º 3
0
        public AppGroupsCapability(PListDictionary dic)
        {
            var groups = dic.ArrayValue(APP_GROUPS_KEY);

            if (groups != null && groups.Count > 0)
            {
                AppGroups = new List <string>(groups.ToStringArray());
            }
            else
            {
                AppGroups = new List <string>();
            }
        }
        public AssociatedDomainsCapability(PListDictionary dic)
        {
            var groups = dic.ArrayValue(ASSOCIATED_DOMAINS_KEY);

            if (groups != null && groups.Count > 0)
            {
                AssociatedDomains = new List <string>(groups.ToStringArray());
            }
            else
            {
                AssociatedDomains = new List <string>();
            }
        }
Ejemplo n.º 5
0
        public KeychainSharingCapability(PListDictionary dic)
        {
            var groups = dic.ArrayValue(KEYCHAIN_GROUPS_KEY);

            if (groups != null && groups.Count > 0)
            {
                KeychainGroups = new List <string>(groups.ToStringArray());
            }
            else
            {
                KeychainGroups = new List <string>();
            }
        }
Ejemplo n.º 6
0
        public ApplePayCapability(PListDictionary dic)
        {
            var groups = dic.ArrayValue(MERCHANT_IDS_KEY);

            if (groups != null && groups.Count > 0)
            {
                MerchantIds = new List <string>(groups.ToStringArray());
            }
            else
            {
                MerchantIds = new List <string>();
            }
        }
Ejemplo n.º 7
0
        public WalletCapability(PListDictionary dic)
        {
            AllowSubsetOfPassTypes = dic.BoolValue(ALLOW_SUBSET_OF_PASS_TYPES_KEY);
            var groups = dic.ArrayValue(PASS_TYPE_SUBSETS_KEY);

            if (groups != null && groups.Count > 0)
            {
                PassTypeSubsets = new List <string>(groups.ToStringArray());
            }
            else
            {
                PassTypeSubsets = new List <string>();
            }
        }
Ejemplo n.º 8
0
        public FrameworkChanges(PListDictionary dic)
        {
            if (dic == null)
            {
                return;
            }

            var sys = dic.ArrayValue(SYSTEM_FRAMEWORKS_KEY);

            if (sys != null)
            {
                Load(sys, _frameworks);
            }
        }
Ejemplo n.º 9
0
        public CollectionBuildSettingEntry(PListDictionary dic)
            : base(dic)
        {
            //try to get array with new key
            var array = dic.ArrayValue(VALUE_KEY);

            //then try with old key
            if (array == null)
            {
                array = dic.ArrayValue(OLD_VALUE_KEY);
            }

            //get the values
            if (array != null)
            {
                Values = new List <string>();
                Values.AddRange(array.ToStringArray());
            }
            //if all failed see if it is a string (could be a custom string that is now known about.
            else
            {
                var strVal = dic.StringValue(VALUE_KEY);
                Values = StringUtils.StringListToList(strVal);
            }

            MergeMethod m;

            if (dic.EnumValue(MERGE_KEY, out m))
            {
                Merge = m;
            }
            else
            {
                Merge = MergeMethod.Append;
            }
        }
Ejemplo n.º 10
0
        public ICloudCapability(PListDictionary dic)
        {
            KeyValueStorage     = dic.BoolValue(KEY_VALUE_STORAGE_KEY);
            iCloudDocuments     = dic.BoolValue(ICLOUD_DOCUMENTS_KEY);
            CloudKit            = dic.BoolValue(CLOUDKIT_KEY);
            UseCustomContainers = dic.BoolValue(USE_CUSTOM_CONTAINERS_KEY);
            var groups = dic.ArrayValue(CUSTOM_CONTAINERS_KEY);

            if (groups != null && groups.Count > 0)
            {
                CustomContainers = new List <string>(groups.ToStringArray());
            }
            else
            {
                CustomContainers = new List <string>();
            }
        }
Ejemplo n.º 11
0
        public GameControllersCapability(PListDictionary dic)
        {
            var controllers = dic.ArrayValue(SUPPORTED_GAME_CONTROLLERS_KEY);

            if (controllers != null && controllers.Count > 0)
            {
                var gc = new List <GameControllerType>();

                for (int ii = 0; ii < controllers.Count; ii++)
                {
                    GameControllerType c;

                    if (controllers.EnumValue(ii, out c))
                    {
                        gc.Add(c);
                    }
                }

                GameControllers = gc.ToArray();
            }
        }
Ejemplo n.º 12
0
        public UserManagementCapability(PListDictionary dic)
        {
            var controllers = dic.ArrayValue(USER_MANAGEMENT_KEY);

            if (controllers != null && controllers.Count > 0)
            {
                var gc = new List <UserManagementType>();

                for (int ii = 0; ii < controllers.Count; ii++)
                {
                    UserManagementType c;

                    if (controllers.EnumValue(ii, out c))
                    {
                        gc.Add(c);
                    }
                }

                UserManagement = gc.ToArray();
            }
        }