${iServer2_Theme_RemoveThemesParameters_Title}

${iServer2_Theme_RemoveThemesParameters_Description}

Inheritance: ParametersBase
 private void remove_Click(object sender, RoutedEventArgs e)
 {
     RemoveThemesParameters parameters = new RemoveThemesParameters
     {
         MapName = "World",
         LayerNames = listLayerName
     };
     RemoveThemesService removeThemeLayerService = new RemoveThemesService("http://localhost:7080/demo");
     removeThemeLayerService.ProcessAsync(parameters);
     removeThemeLayerService.Failed += new EventHandler<ServiceFailedEventArgs>(removeThemeLayerService_Failed);
     removeThemeLayerService.ProcessCompleted += new EventHandler<RemoveThemesEventArgs>(removeThemeLayerService_ProcessCompleted);
 }
        /// <summary>${iServer2_Theme_RemoveThemesService_method_ProcessAsync_D}</summary>
        /// <param name="parameters">${iServer2_Theme_RemoveThemesService_method_ProcessAsync_param_parameters}</param>
        /// <param name="state">${iServer2_Theme_RemoveThemesService_method_ProcessAsync_param_state}</param>
        public void ProcessAsync(RemoveThemesParameters parameters, object state)
        {
            if (parameters == null)
            {
                //TODO:资源
                throw new ArgumentNullException(ExceptionStrings.ArgumentIsNull);
            }
            if (string.IsNullOrEmpty(base.Url))
            {
                //TODO:资源
                throw new InvalidOperationException(ExceptionStrings.InvalidUrl);
            }
            if (!base.Url.EndsWith("/"))
            {
                base.Url += '/';
            }

            base.SubmitRequest(base.Url + "commonhandler?", GetParameters(parameters),
                new EventHandler<RequestEventArgs>(request_Completed), state, false);
        }
        //清除专题图现有状态
        private void remove_Click(object sender, RoutedEventArgs e)
        {
            RemoveThemesParameters parameters = new RemoveThemesParameters()
               {
               MapName = "World",
               LayerNames = listLayerName
               };

            RemoveThemesService removeService = new RemoveThemesService(url) { DisableClientCaching = true };
            removeService.ProcessAsync(parameters);
            removeService.ProcessCompleted += new EventHandler<RemoveThemesEventArgs>(removeService_ProcessCompleted);
            removeService.Failed += new EventHandler<ServiceFailedEventArgs>(removeService_Failed);
        }
 /// <overloads>${iServer2_Theme_RemoveThemesService_method_ProcessAsync_overloads_D}</overloads>
 /// <summary>${iServer2_Theme_RemoveThemesService_method_ProcessAsync_D}</summary>
 /// <param name="parameters">${iServer2_Theme_RemoveThemesService_method_ProcessAsync_param_parameters}</param>
 public void ProcessAsync(RemoveThemesParameters parameters)
 {
     ProcessAsync(parameters, null);
 }
        private Dictionary<string, string> GetParameters(RemoveThemesParameters parameters)
        {
            Dictionary<string, string> dictionary = new Dictionary<string, string>();
            string method = "removeSuperMapLayers";

            dictionary.Add("method", method);
            dictionary.Add("mapName", parameters.MapName);

            Dictionary<string, string> dict = new Dictionary<string, string>();
            dict.Add("mapName", parameters.MapName);

            if (parameters.LayerNames.Count > 0 && parameters.LayerNames != null)
            {
                List<string> list = new List<string>();
                for (int i = 0; i < parameters.LayerNames.Count; i++)
                {
                    list.Add(string.Format("\"{0}\"", parameters.LayerNames[i]));
                }
                string json = "[";
                json += string.Join(",", list.ToArray());
                json += "]";

                dict.Add("layerNames", json);
            }
            dictionary.Add("params", CreateParameters(method, dict));
            return dictionary;
        }