<commit_before>﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ServiceProvider.cs" company="">
//
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

using System.Collections.Generic;
using DotSpatial.Plugins.WebMap.Resources;

namespace DotSpatial.Plugins.WebMap
{
    public class ServiceProvider
    {
        #region Constructors and Destructors

        /// <summary>
        /// Initializes a new instance of the ServiceProvider class.
        /// </summary>
        /// <param name="name"></param>
        /// <param name="url"></param>
        public ServiceProvider(string name, string url)
        {
            Url = url;
            Name = name;
        }

        public ServiceProvider()
        {
        }

        #endregion

        #region Public Properties

        public string Name { get; set; }

        public string Url { get; set; }

        #endregion

        #region Public Methods

        public static IEnumerable<ServiceProvider> GetDefaultServiceProviders()
        {
            List<string> extraServices = new List<string>(){
            Properties.Resources.BingHybrid,
            Properties.Resources.GoogleSatellite,
            Properties.Resources.GoogleMap,
            Properties.Resources.WMSMap};

            foreach (var item in Services.Default.List)
            {
                var serviceDescArr = item.Split(',');

                var serviceName = serviceDescArr[0];
                var serviceUrl = serviceDescArr[1];

                while (extraServices[0].ToUpper()[0] < serviceName.ToUpper()[0])
                {
                    yield return new ServiceProvider(extraServices[0], null);
                    extraServices.Remove(extraServices[0]);
                }

                yield return new ServiceProvider(serviceName, serviceUrl);
            }

            foreach (var item in extraServices)
            {
                yield return new ServiceProvider(item, null);
            }
        }

        public override string ToString()<commit_msg>Commenting out the WMS option in the basemap drop down for the 1.6 release of HydroDesktop.<commit_after>﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ServiceProvider.cs" company="">
//
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

using System.Collections.Generic;
using DotSpatial.Plugins.WebMap.Resources;

namespace DotSpatial.Plugins.WebMap
{
    public class ServiceProvider
    {
        #region Constructors and Destructors

        /// <summary>
        /// Initializes a new instance of the ServiceProvider class.
        /// </summary>
        /// <param name="name"></param>
        /// <param name="url"></param>
        public ServiceProvider(string name, string url)
        {
            Url = url;
            Name = name;
        }

        public ServiceProvider()
        {
        }

        #endregion

        #region Public Properties

        public string Name { get; set; }

        public string Url { get; set; }

        #endregion

        #region Public Methods

        public static IEnumerable<ServiceProvider> GetDefaultServiceProviders()
        {
            List<string> extraServices = new List<string>(){
            Properties.Resources.BingHybrid,
            Properties.Resources.GoogleSatellite,
            Properties.Resources.GoogleMap/*,
            Properties.Resources.WMSMap Commented out for 1.6 HydroDesktop release. See https://hydrodesktop.codeplex.com/workitem/8731 */
            };

            foreach (var item in Services.Default.List)
            {
                var serviceDescArr = item.Split(',');

                var serviceName = serviceDescArr[0];
                var serviceUrl = serviceDescArr[1];

                while (extraServices.Count > 0 && extraServices[0].ToUpper()[0] < serviceName.ToUpper()[0])
                {
                    yield return new ServiceProvider(extraServices[0], null);
                    extraServices.Remove(extraServices[0]);
                }

                yield return new ServiceProvider(serviceName, serviceUrl);
            }

            foreach (var item in extraServices)
            {
                yield return new ServiceProvider(item, null);
            }
        }

        public override string ToString()
{'fraction_non_alphanumeric': 0.18745945945945947, 'fraction_numerical': 0.004972972972972973, 'mean_word_length': 1.3446528129751647, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 26, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4729583', 'n_tokens_mistral': 1064, 'n_tokens_neox': 993, 'n_words': 254}