${IS6_SetLayerStatusParameter_Title}
${IS6_SetLayerStatusParameter_Description}
/// <summary>${IS6_SetLayerStatusService_method_processAsync_D}</summary> /// <param name="parameters">${IS6_SetLayerStatusService_method_processAsync_param_parameters}</param> /// <param name="state">${IS6_SetLayerStatusService_method_processAsync_param_state}</param> public void ProcessAsync(SetLayerStatusParameters parameters, object state) { if (parameters == null) { //TODO:资源 //throw new ArgumentNullException("UpdateLayersParameters is Null"); throw new ArgumentNullException(ExceptionStrings.ArgumentIsNull); } if (string.IsNullOrEmpty(this.Url)) { //TODO:资源 //throw new InvalidOperationException("Url is not set"); throw new InvalidOperationException(ExceptionStrings.InvalidUrl); } base.SubmitRequest(base.Url + "/common.ashx?", GetParameters(parameters), new EventHandler<RequestEventArgs>(request_Completed), state, false); }
private Dictionary<string, string> GetParameters(SetLayerStatusParameters parameters) { Dictionary<string, string> dictionary = new Dictionary<string, string>(); string method = "UpdateLayers"; dictionary.Add("map", parameters.MapName); dictionary.Add("method", method); string json = "["; List<string> list = new List<string>(); for (int i = 0; i < parameters.LayerStatusList.Count; i++) { list.Add(LayerStatus.ToJson(parameters.LayerStatusList[i])); } json += string.Join(",", list.ToArray()); json += "]"; dictionary.Add("layers", json); //这里的LayersKey初始值是0,之后是每一次返回结果中LayersKey dictionary.Add("layersKey", "0"); dictionary.Add("bModifiedByServer", "false"); return dictionary; }
/// <summary>${IS6_SetLayerStatusService_method_processAsync_D}</summary> /// <overloads>${IS6_SetLayerStatusService_method_processAsync_overloads}</overloads> /// <param name="parameters">${IS6_SetLayerStatusService_method_processAsync_param_parameters}</param> public void ProcessAsync(SetLayerStatusParameters parameters) { ProcessAsync(parameters, null); }