public async Task <JToken> InvokeApiAsync(string apiName, JToken body, HttpMethod method, IDictionary <string, string> parameters, CancellationToken cancellationToken = default(CancellationToken)) { defaultMessage dm = new defaultMessage( ); dm.message = "Default JToken result message."; return(JsonConvert.SerializeObject(dm)); //if (string.IsNullOrWhiteSpace ( apiName )) //{ // throw new ArgumentNullException ( "apiName" ); //} //string content = null; //if (body != null) //{ // switch (body.Type) // { // case JTokenType.Null: // content = "null"; // break; // case JTokenType.Boolean: // content = body.ToString ( ).ToLowerInvariant ( ); // break; // default: // content = body.ToString ( ); // break; // } //} //string response = await this.InternalInvokeApiAsync ( apiName, content, method, parameters, MobileServiceFeatures.JsonApiCall, cancellationToken ); //return response.ParseToJToken ( this.SerializerSettings ); }
string.Format(defaultMessage ?? mapping[type], args);