mirror of https://github.com/abpframework/abp.git
csharpabpc-sharpframeworkblazoraspnet-coredotnet-coreaspnetcorearchitecturesaasdomain-driven-designangularmulti-tenancy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
968 B
31 lines
968 B
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Volo.Abp.DependencyInjection;
|
|
using Volo.Abp.Http.Client.ClientProxying;
|
|
using Volo.Abp.TestApp.Application.Dto;
|
|
|
|
namespace Volo.Abp.Http.DynamicProxying
|
|
{
|
|
[ExposeServices(typeof(IObjectToQueryString<List<GetParamsNameValue>>))]
|
|
public class TestObjectToQueryString : IObjectToQueryString<List<GetParamsNameValue>>, ITransientDependency
|
|
{
|
|
public Task<string> ConvertAsync(List<GetParamsNameValue> values)
|
|
{
|
|
if (values.IsNullOrEmpty())
|
|
{
|
|
return null;
|
|
}
|
|
|
|
var sb = new StringBuilder();
|
|
|
|
for (var i = 0; i < values.Count; i++)
|
|
{
|
|
sb.Append($"NameValues[{i}].Name={values[i].Name}&NameValues[{i}].Value={values[i].Value}&");
|
|
}
|
|
|
|
sb.Remove(sb.Length - 1, 1);
|
|
return Task.FromResult(sb.ToString());
|
|
}
|
|
}
|
|
}
|
|
|