Пример #1
0
 /// <summary>${REST_FindStopService_method_ProcessAsync_param_Parameters}</summary>
 public async Task<FindStopResult> ProcessAsync(FindStopParameter paramer)
 {
     GenerateAbsoluteUrl(paramer);
     var result = await base.SubmitRequest(this.Url, GetDictionaryParameters(paramer), false, false, false);
     JsonArray jsonObject = JsonArray.Parse(result);
     return FindStopResult.FromJson(jsonObject);
 }
Пример #2
0
        private void GenerateAbsoluteUrl(FindStopParameter parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException("parameters");
            }

            if (!this.Url.EndsWith("/"))
            {
                this.Url += "/";
            }
            this.Url += string.Format("stops/keyword/{0}.rjson?", WebUtility.UrlEncode(parameters.KeyWord));
        }
Пример #3
0
 private System.Collections.Generic.Dictionary<string, string> GetDictionaryParameters(FindStopParameter parameters)
 {
     Dictionary<string, string> dic = new Dictionary<string, string>();
     dic["returnPosition"] = parameters.ReturnPosition ? "true" : "false";
     return dic;
 }