${IS6_UpdateEntityParameters_Title}

${IS6_UpdateEntityParameters_Description}

Inheritance: ParametersBase
        /// <summary>${IS6_UpdateEntityService_method_ProcessAsync_D}</summary>
        /// <param name="parameters">${IS6_UpdateEntityService_method_ProcessAsync_param_parameters}</param>
        /// <param name="state">${IS6_UpdateEntityService_method_ProcessAsync_param_state}</param>
        public void ProcessAsync(UpdateEntityParameters parameters, object state)
        {
            if (parameters == null)
            {
                //TODO:本地化
                throw new ArgumentNullException(ExceptionStrings.ArgumentIsNull);
                //throw new ArgumentNullException("UpdateEntityParameters is Null");
            }
            if (string.IsNullOrEmpty(base.Url))
            {
                //TODO:本地化
                throw new InvalidOperationException(ExceptionStrings.InvalidUrl);
                //throw new InvalidOperationException("Url is not set");
            }

            base.SubmitRequest(base.Url + "/edit.ashx?", GetParameters(parameters),
                new EventHandler<RequestEventArgs>(request_Completed), state, false);
        }
        private Dictionary<string, string> GetParameters(UpdateEntityParameters parameters)
        {
            Dictionary<string, string> dictionary = new Dictionary<string, string>();
            string method = "UpdateEntity";
            dictionary.Add("method", method);
            dictionary.Add("map", parameters.MapName);
            dictionary.Add("layerName", string.Format("\"{0}\"", parameters.LayerName));

            string json = "[";

            List<string> list = new List<string>();
            for (int i = 0; i < parameters.Entities.Count; i++)
            {
                list.Add(Entity.ToJson(parameters.Entities[i]));
            }

            json += string.Join(",", list.ToArray());
            json += "]";

            dictionary.Add("entities", json);

            return dictionary;
        }
 /// <summary>${IS6_UpdateEntityService_method_ProcessAsync_D}</summary>
 /// <overloads>${IS6_UpdateEntityService_method_ProcessAsync_overloads_D}</overloads>
 public void ProcessAsync(UpdateEntityParameters parameters)
 {
     ProcessAsync(parameters, null);
 }