Esempio n. 1
0
        /// <exception cref="OverflowException">
        /// The dictionary already contains the maximum number of elements ( <see cref="F:System.Int32.MaxValue" />).
        /// </exception>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="key" /> is null.
        /// </exception>
        public void Add(string region, LolUrlType type, RLolApiName rla)
        {
            var rut = new RUrlType();

            rut.Add(type, rla);
            Add(region, rut);
        }
Esempio n. 2
0
        /// <exception cref="OverflowException">
        /// The dictionary already contains the maximum number of elements ( <see cref="F:System.Int32.MaxValue" />).
        /// </exception>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="key" /> is null.
        /// </exception>
        public void Add(string region, LolUrlType type, LolApiName name, List <LolApiMethodName> apiMethods, List <ApiLimit> limits)
        {
            var rut = new RUrlType();

            rut.Add(type, new RLolApiMethodName(name, apiMethods, limits.ToArray()));
            Add(region, rut);
        }
Esempio n. 3
0
        /// <exception cref="OverflowException">
        /// The dictionary already contains the maximum number of elements ( <see cref="F:System.Int32.MaxValue" />).
        /// </exception>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="key" /> is null.
        /// </exception>
        public void Add(string region, RUrlType rut)
        {
            var exists = Regions.ContainsKey(region);

            if (!exists)
            {
                Regions.TryAdd(region, rut);
            }
            else
            {
                foreach (var itm in rut.UrlTypes)
                {
                    Regions[region].Add(itm.Key, itm.Value);
                }
            }
        }