From c018ab27bc5f8779b0817f2428ae1b83abeecc12 Mon Sep 17 00:00:00 2001 From: $+j Date: Tue, 4 Aug 2015 20:54:02 +0800 Subject: [PATCH 01/45] refine url request --- .../Templates/CSharpProxyTemplate.cs | 363 ++++++++++-------- .../Templates/CSharpProxyTemplate.tt | 81 ++-- 2 files changed, 259 insertions(+), 185 deletions(-) diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs index 10292db..831b630 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs @@ -1,10 +1,10 @@ // ------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version: 12.0.0.0 +// 此代码由工具生成。 +// 运行时版本: 12.0.0.0 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// 对此文件的更改可能会导致不正确的行为。此外,如果 +// 重新生成代码,这些更改将会丢失。 // // ------------------------------------------------------------------------------ namespace WebApiProxy.Tasks.Templates @@ -19,7 +19,7 @@ namespace WebApiProxy.Tasks.Templates /// Class to produce the template output /// - #line 1 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 1 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "12.0.0.0")] public partial class CSharpProxyTemplate : CSharpProxyTemplateBase { @@ -44,14 +44,14 @@ public virtual string TransformText() using System.Web; using "); - #line 20 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 20 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Namespace)); #line default #line hidden this.Write(".Models;\r\n\r\n#region Proxies\r\nnamespace "); - #line 23 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 23 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Namespace)); #line default @@ -60,210 +60,196 @@ public virtual string TransformText() " class Configuration\r\n\t{\r\n\t\t/// \r\n\t\t/// Web Api Base Address.\r\n\t\t/// \r\n\t\tpublic static string "); - #line 33 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 33 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Name)); #line default #line hidden this.Write("BaseAddress = \""); - #line 33 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 33 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Metadata.Host)); #line default #line hidden this.Write("\";\r\n\t\t\r\n\t}\r\n}\r\n#endregion\r\n\r\n#region Models\r\nnamespace "); - #line 40 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 40 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Namespace)); #line default #line hidden - this.Write(@".Models -{ - public class WebApiProxyResponseException : Exception - { - public HttpStatusCode StatusCode { get; private set; } - public string Content { get; private set; } - - public WebApiProxyResponseException(HttpStatusCode statusCode, string content) : base(""A "" + statusCode + "" ("" + (int)statusCode + "") http exception occured. See Content for response body."") - { - StatusCode = statusCode; - Content = content; - } - } - -"); + this.Write(".Models\r\n{\r\n\r\n"); - #line 54 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 43 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var model in Configuration.Metadata.Models.Where(m => m.Type.Equals("class"))) { #line default #line hidden this.Write("\t\r\n\t/// \r\n\t/// "); - #line 56 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 45 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(model.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t/// \r\n\tpublic partial class "); - #line 58 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 47 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(model.Name)); #line default #line hidden this.Write("\r\n\t{\r\n\t\t#region Constants\r\n"); - #line 61 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 50 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var constantItem in model.Constants) { #line default #line hidden this.Write("\t\t/// \r\n\t\t/// "); - #line 63 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 52 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t\t/// \r\n\t\tpublic const "); - #line 65 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 54 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Type)); #line default #line hidden this.Write(" "); - #line 65 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 54 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Name)); #line default #line hidden this.Write(" = "); - #line 65 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 54 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Value)); #line default #line hidden this.Write(";\r\n"); - #line 66 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 55 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t#endregion\r\n\r\n\t\t#region Properties\r\n"); - #line 70 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 59 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var propertyItem in model.Properties) { #line default #line hidden this.Write("\t\t/// \r\n\t\t/// "); - #line 72 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 61 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(propertyItem.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t\t/// \r\n\t\tpublic virtual "); - #line 74 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 63 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(propertyItem.Type)); #line default #line hidden this.Write(" "); - #line 74 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 63 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(propertyItem.Name)); #line default #line hidden this.Write(" { get; set; }\r\n"); - #line 75 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 64 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t#endregion\r\n\t}\t\r\n"); - #line 78 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 67 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n"); - #line 80 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 69 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var model in Configuration.Metadata.Models.Where(m => m.Type.Equals("enum"))) { #line default #line hidden this.Write("\t\r\n\t/// \r\n\t/// "); - #line 82 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 71 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(model.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t/// \r\n\tpublic enum "); - #line 84 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 73 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(model.Name)); #line default #line hidden this.Write("\r\n\t{\r\n"); - #line 86 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 75 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var constantItem in model.Constants) { #line default #line hidden this.Write("\r\n\t\t/// \r\n\t\t/// "); - #line 89 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 78 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t\t/// \r\n\t\t"); - #line 91 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 80 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Name)); #line default #line hidden this.Write(" = "); - #line 91 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 80 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Value)); #line default #line hidden this.Write(",\r\n"); - #line 92 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 81 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t\r\n\t}\r\n"); - #line 94 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 83 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\r\n}\r\n#endregion\r\n\r\n#region Interfaces\r\nnamespace "); - #line 100 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 89 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Namespace)); #line default @@ -271,27 +257,27 @@ public class WebApiProxyResponseException : Exception this.Write(".Interfaces\r\n{\r\n\tpublic interface IClientBase : IDisposable\r\n\t{\r\n\t\tHttpClient Htt" + "pClient { get; }\r\n\t}\r\n\r\n"); - #line 107 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 96 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var definition in Configuration.Metadata.Definitions) { #line default #line hidden this.Write("\t\r\n\tpublic partial interface I"); - #line 108 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 97 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 108 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 97 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write(" : IClientBase\r\n\t{\t\r\n"); - #line 110 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 99 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var method in definition.ActionMethods) { var allParameters = method.UrlParameters.AsEnumerable().Where(m => m != null); @@ -316,114 +302,121 @@ public class WebApiProxyResponseException : Exception #line default #line hidden - this.Write("\r\n"); + this.Write("\r\n\t\t/// \r\n\t\t/// "); + + #line 122 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); + + #line default + #line hidden + this.Write("\r\n\t\t/// \r\n"); - #line 132 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 124 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 133 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 125 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 134 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 126 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden - this.Write("\t\t/// \r\n\t\tTask "); + this.Write("\t\tTask "); - #line 136 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 127 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 136 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 127 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(");\r\n\r\n"); - #line 138 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 129 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 139 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 130 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 140 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 131 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden - this.Write("\t\t/// \r\n\t\t"); + this.Write("\t\t"); - #line 142 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 132 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(String.IsNullOrEmpty(method.ReturnType) ? "void" : method.ReturnType)); #line default #line hidden this.Write(" "); - #line 142 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 132 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("("); - #line 142 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 132 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(");\r\n"); - #line 143 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 133 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t\t\t\r\n\t}\r\n"); - #line 145 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 135 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n}\r\n#endregion\r\n\r\n#region Clients\r\nnamespace "); - #line 151 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 141 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Namespace)); #line default @@ -449,7 +442,7 @@ protected ClientBase() { BaseAddress = new Uri(Configuration."); - #line 170 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 160 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Name)); #line default @@ -463,8 +456,7 @@ public virtual void EnsureSuccess(HttpResponseMessage response) if (response.IsSuccessStatusCode) return; - var content = response.Content.ReadAsStringAsync().Result; - throw new WebApiProxyResponseException(response.StatusCode, content); + throw new HttpResponseException(response); } /// @@ -478,89 +470,75 @@ protected ClientBase(HttpMessageHandler handler, bool disposeHandler = true) { BaseAddress = new Uri(Configuration."); - #line 192 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 181 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Name)); #line default #line hidden this.Write("BaseAddress)\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\t/// \r\n\t\t/// Releases the unmanaged resourc" + "es and disposes of the managed resources. \r\n\t\t/// \r\n\t\tpublic voi" + - "d Dispose()\r\n\t\t{\r\n\t\t\tHttpClient.Dispose();\r\n\t\t}\r\n\t}\r\n"); + "d Dispose()\r\n\t\t{\r\n\t\t\tHttpClient.Dispose();\r\n\t\t}\r\n\t}\r\n\r\n"); - #line 204 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 194 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var definition in Configuration.Metadata.Definitions) { #line default #line hidden this.Write("\t/// \r\n\t/// "); - #line 206 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 196 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t/// \r\n\tpublic partial class "); - #line 208 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 198 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 208 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 198 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write(" : ClientBase, Interfaces.I"); - #line 208 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 198 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 208 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 198 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden - this.Write("\r\n\t{\t\t\r\n\r\n\t\t/// \r\n\t\t/// "); + this.Write("\r\n\t{\t\t\r\n\t\tpublic "); - #line 212 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(definition.Description.ToSummary())); - - #line default - #line hidden - this.Write("\r\n\t\t/// \r\n\t\tpublic "); - - #line 214 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 200 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 214 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 200 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden - this.Write("() : base()\r\n\t\t{\r\n\t\t}\r\n\r\n\t\t/// \r\n\t\t/// "); - - #line 219 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(definition.Description.ToSummary())); - - #line default - #line hidden - this.Write("\r\n\t\t/// \r\n\t\tpublic "); + this.Write("() : base()\r\n\t\t{\r\n\t\t}\r\n\r\n\t\tpublic "); - #line 221 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 204 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 221 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 204 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default @@ -568,7 +546,7 @@ protected ClientBase(HttpMessageHandler handler, bool disposeHandler = true) this.Write("(HttpMessageHandler handler, bool disposeHandler = true) : base(handler, disposeH" + "andler)\r\n\t\t{\r\n\t\t}\r\n\r\n\t\t#region Methods\r\n"); - #line 226 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 209 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var method in definition.ActionMethods) { var allParameters = method.UrlParameters.AsEnumerable(); @@ -599,203 +577,282 @@ protected ClientBase(HttpMessageHandler handler, bool disposeHandler = true) } var postOrPut = method.Type.ToTitle() == "Post" || method.Type.ToTitle() == "Put"; - var url = ("\"" + method.Url.Replace("{", "\" + ").Replace("}", " + \"") + "\"").Replace(" + \"\"",""); + + var urlParts = method.Url.Split(new[] {"?"}, StringSplitOptions.RemoveEmptyEntries); + var requestUrl = urlParts[0]; + var urlQueryString = string.Empty; + var isGetRequestAndHasQueryString = falst; + + if (urlParts.Length > 1) + { + urlQueryString = urlParts[1]; + isGetRequestAndHasQueryString = method.Type.ToTitle() == "Get"; + } + + + + if(!hasQueryString){ + requestUrl = Regex.Replace(requestUrl, @"\{(.*?)\}", "\"+Uri.EscapeUriString(Convert.ToString($1))+\""); + } #line default #line hidden - this.Write("\t\t/// \r\n\t\t/// "); + this.Write("\r\n\t\t/// \r\n\t\t/// "); - #line 259 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 259 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 261 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 261 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 262 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 262 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 263 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 263 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden - this.Write("\t\t/// \r\n\t\tpublic virtual async Task "); + this.Write("\t\tpublic virtual async Task "); - #line 265 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 264 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 265 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 264 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden - this.Write(")\r\n\t\t{\r\n\t\t\treturn await HttpClient."); + this.Write(")\r\n\t\t{\r\n\t\t\tvar requestUrl = "); + + #line 266 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(requestUrl)); + + #line default + #line hidden + this.Write(";\r\n\t\t\t"); + + #line 267 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + if(isGetRequestAndHasQueryString){ + + #line default + #line hidden + this.Write("\t\t\t\t\r\n\t\t\t\tvar urlQueryString = Generate"); + + #line 269 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); + + #line default + #line hidden + this.Write("Url("); + + #line 269 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(urlQueryString)); + + #line default + #line hidden + this.Write(", "); + + #line 269 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); + + #line default + #line hidden + this.Write(");\r\n\t\t\t\tif (!string.IsNullOrEmpty(urlQueryString))\r\n\t\t\t\t{\r\n\t\t\t\t\trequestUrl = requ" + + "estUrl + \"?\" + urlQueryString;\r\n\t\t\t\t}\r\n\r\n\t\t\t"); + + #line 275 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + }else{ + + #line default + #line hidden + this.Write("\t\t\treturn await HttpClient."); - #line 267 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 276 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Type.ToTitle())); #line default #line hidden - #line 267 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 276 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut ? "AsJson" : "")); #line default #line hidden this.Write("Async"); - #line 267 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 276 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut && method.BodyParameter != null ? "<" + method.BodyParameter.Type + ">" : "")); #line default #line hidden - this.Write("("); + this.Write("(requestUrl "); - #line 267 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(url)); + #line 276 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut ? bodyParameterString:"")); #line default #line hidden + this.Write(").ConfigureAwait(false);\r\n\t\t\t"); - #line 267 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut ? bodyParameterString:"")); + #line 277 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + } + + #line default + #line hidden + this.Write("\t\t}\r\n\r\n\t\t"); + + #line 280 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + if(isGetRequestAndHasQueryString){ + + #line default + #line hidden + this.Write("\t\t\t\t\r\n\t\t\tpublic virtual string Generate"); + + #line 282 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); + + #line default + #line hidden + this.Write("Url(string urlQueryString, "); + + #line 282 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); + + #line default + #line hidden + this.Write(")\r\n\t\t\t{\r\n\t\t\t\tthrow new NotImplementedException();\r\n\t\t\t}\r\n\r\n\t\t"); + + #line 287 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" +} #line default #line hidden - this.Write(");\r\n\t\t}\r\n\r\n\t\t/// \r\n\t\t/// "); + this.Write("\r\n\r\n\t\t/// \r\n\t\t/// "); - #line 271 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 291 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 273 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 293 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 274 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 294 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 275 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 295 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\tpublic virtual "); - #line 276 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 296 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(String.IsNullOrEmpty(method.ReturnType) ? "void" : method.ReturnType)); #line default #line hidden this.Write(" "); - #line 276 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 296 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("("); - #line 276 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 296 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden - this.Write(")\r\n\t\t{\r\n\t\t\t"); - - #line 278 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" - - var parametersValues = String.IsNullOrEmpty(bodyParameterString) ? (url.IndexOf("+") > -1 ? url.Substring(url.IndexOf("+") + 1) : "") : bodyParameterString.Substring(2); - - - #line default - #line hidden - this.Write("\t\t\t var result = Task.Run(() => "); + this.Write(")\r\n\t\t{\r\n\t\t\tvar result = "); - #line 281 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 298 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 281 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 298 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default #line hidden - this.Write(")).Result;\t\t \r\n\t\t\t \r\n\t\t\tEnsureSuccess(result);\r\n\t\t\t\t \r\n\t\t\t "); + this.Write(").Result;\t\t \r\n\t\t\t \r\n\t\t\tEnsureSuccess(result);\r\n\t\t\t\t \r\n\t\t\t"); - #line 285 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 302 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(!String.IsNullOrEmpty(method.ReturnType)) { #line default #line hidden - this.Write("\t\t\t \t\t\t \r\n\t\t\t return result.Content.ReadAsAsync<"); + this.Write("\t\t\t \t\t\t \r\n\t\t\treturn result.Content.ReadAsAsync<"); - #line 286 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 303 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.ReturnType)); #line default #line hidden - this.Write(">().Result;\r\n\t\t\t "); + this.Write(">().Result;\r\n\t\t\t"); - #line 287 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 304 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t}\r\n\r\n"); - #line 290 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 307 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t#endregion\r\n\t}\r\n"); - #line 293 "D:\Projects\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 310 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt index e60b388..8782baa 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt @@ -39,17 +39,6 @@ namespace <#= Configuration.Namespace#> #region Models namespace <#= Configuration.Namespace#>.Models { - public class WebApiProxyResponseException : Exception - { - public HttpStatusCode StatusCode { get; private set; } - public string Content { get; private set; } - - public WebApiProxyResponseException(HttpStatusCode statusCode, string content) : base("A " + statusCode + " (" + (int)statusCode + ") http exception occured. See Content for response body.") - { - StatusCode = statusCode; - Content = content; - } - } <# foreach(var model in Configuration.Metadata.Models.Where(m => m.Type.Equals("class"))) { #> /// @@ -129,16 +118,17 @@ namespace <#= Configuration.Namespace#>.Interfaces } #> + /// + /// <#= method.Description #> + /// <# foreach(var p in method.UrlParameters) { #> /// <#= p.Description #> <# } #> - /// Task <#= method.Name #>Async(<#= parameterList#>); <# foreach(var p in method.UrlParameters) {#> /// <#= p.Description #> <# } #> - /// <#= String.IsNullOrEmpty(method.ReturnType) ? "void" : method.ReturnType #> <#= method.Name #>(<#= parameterList#>); <#}#> } @@ -176,8 +166,7 @@ namespace <#= Configuration.Namespace#>.Clients if (response.IsSuccessStatusCode) return; - var content = response.Content.ReadAsStringAsync().Result; - throw new WebApiProxyResponseException(response.StatusCode, content); + throw new HttpResponseException(response); } /// @@ -201,23 +190,17 @@ namespace <#= Configuration.Namespace#>.Clients HttpClient.Dispose(); } } + <# foreach(var definition in Configuration.Metadata.Definitions) { #> /// /// <#= definition.Description.ToSummary() #> /// public partial class <#=definition.Name#><#= Configuration.ClientSuffix#> : ClientBase, Interfaces.I<#=definition.Name#><#=Configuration.ClientSuffix#> { - - /// - /// <#= definition.Description.ToSummary() #> - /// public <#=definition.Name#><#= Configuration.ClientSuffix#>() : base() { } - /// - /// <#= definition.Description.ToSummary() #> - /// public <#=definition.Name#><#= Configuration.ClientSuffix#>(HttpMessageHandler handler, bool disposeHandler = true) : base(handler, disposeHandler) { } @@ -253,20 +236,57 @@ namespace <#= Configuration.Namespace#>.Clients } var postOrPut = method.Type.ToTitle() == "Post" || method.Type.ToTitle() == "Put"; - var url = ("\"" + method.Url.Replace("{", "\" + ").Replace("}", " + \"") + "\"").Replace(" + \"\"",""); + + var urlParts = method.Url.Split(new[] {"?"}, StringSplitOptions.RemoveEmptyEntries); + var requestUrl = urlParts[0]; + var urlQueryString = string.Empty; + var isGetRequestAndHasQueryString = falst; + + if (urlParts.Length > 1) + { + urlQueryString = urlParts[1]; + isGetRequestAndHasQueryString = method.Type.ToTitle() == "Get"; + } + + + + if(!hasQueryString){ + requestUrl = Regex.Replace(requestUrl, @"\{(.*?)\}", "\"+Uri.EscapeUriString(Convert.ToString($1))+\""); + } #> + /// /// <#= method.Description #> /// <# foreach(var p in method.UrlParameters) { #> /// <#= p.Description #> <# } #> - /// public virtual async Task <#= method.Name #>Async(<#= parameterList#>) { - return await HttpClient.<#=method.Type.ToTitle()#><#= postOrPut ? "AsJson" : "" #>Async<#= postOrPut && method.BodyParameter != null ? "<" + method.BodyParameter.Type + ">" : "" #>(<#=url#><#= postOrPut ? bodyParameterString:""#>); + var requestUrl = <#= requestUrl #>; + <# if(isGetRequestAndHasQueryString){ #> + + var urlQueryString = Generate<#= method.Name #>Url(<#= urlQueryString #>, <#=parameterNameList#>); + if (!string.IsNullOrEmpty(urlQueryString)) + { + requestUrl = requestUrl + "?" + urlQueryString; + } + + <# }else{ #> + return await HttpClient.<#=method.Type.ToTitle()#><#= postOrPut ? "AsJson" : "" #>Async<#= postOrPut && method.BodyParameter != null ? "<" + method.BodyParameter.Type + ">" : "" #>(requestUrl <#= postOrPut ? bodyParameterString:""#>).ConfigureAwait(false); + <# } #> } + <# if(isGetRequestAndHasQueryString){ #> + + public virtual string Generate<#= method.Name #>Url(string urlQueryString, <#= parameterList#>) + { + throw new NotImplementedException(); + } + + <#}#> + + /// /// <#= method.Description #> /// @@ -275,16 +295,13 @@ namespace <#= Configuration.Namespace#>.Clients <# } #> public virtual <#= String.IsNullOrEmpty(method.ReturnType) ? "void" : method.ReturnType #> <#= method.Name #>(<#= parameterList#>) { - <# - var parametersValues = String.IsNullOrEmpty(bodyParameterString) ? (url.IndexOf("+") > -1 ? url.Substring(url.IndexOf("+") + 1) : "") : bodyParameterString.Substring(2); - #> - var result = Task.Run(() => <#= method.Name #>Async(<#=parameterNameList#>)).Result; + var result = <#= method.Name #>Async(<#=parameterNameList#>).Result; EnsureSuccess(result); - <# if(!String.IsNullOrEmpty(method.ReturnType)) { #> - return result.Content.ReadAsAsync<<#= method.ReturnType #>>().Result; - <# } #> + <# if(!String.IsNullOrEmpty(method.ReturnType)) { #> + return result.Content.ReadAsAsync<<#= method.ReturnType #>>().Result; + <# } #> } <#}#> From bc96313a9031d374240e74fd65ee27420c0641a8 Mon Sep 17 00:00:00 2001 From: $+j Date: Wed, 5 Aug 2015 01:42:42 +0800 Subject: [PATCH 02/45] url encode and process complex param type --- Nuget/build-nuget-csharp.bat | 2 +- .../Templates/CSharpProxyTemplate.cs | 182 +++++++++++------- .../Templates/CSharpProxyTemplate.tt | 71 +++++-- 3 files changed, 173 insertions(+), 82 deletions(-) diff --git a/Nuget/build-nuget-csharp.bat b/Nuget/build-nuget-csharp.bat index 99b02ff..2997783 100644 --- a/Nuget/build-nuget-csharp.bat +++ b/Nuget/build-nuget-csharp.bat @@ -5,7 +5,7 @@ if not [%1]==[] set path=%1 IF NOT EXIST Packages MKDIR Packages echo Creating WebProxyApi CSharp Package - %path%\..\.nuget\nuget pack %path%\..\WebApiProxy.Tasks\WebApiProxy.Tasks.csproj -IncludeReferencedProjects -OutputDirectory %path%\Packages -Properties Configuration=Release -Verbose + %path%\..\.nuget\nuget pack %path%\..\WebApiProxy.Tasks\WebApiProxy.Tasks.csproj -Build -IncludeReferencedProjects -OutputDirectory %path%\Packages -Properties Configuration=Release -Verbose if errorlevel 1 echo Error creating WebApiProxy CSharp Package diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs index 831b630..12a21de 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs @@ -1,10 +1,10 @@ // ------------------------------------------------------------------------------ // -// 此代码由工具生成。 -// 运行时版本: 12.0.0.0 +// This code was generated by a tool. +// Runtime Version: 12.0.0.0 // -// 对此文件的更改可能会导致不正确的行为。此外,如果 -// 重新生成代码,这些更改将会丢失。 +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // // ------------------------------------------------------------------------------ namespace WebApiProxy.Tasks.Templates @@ -581,278 +581,328 @@ protected ClientBase(HttpMessageHandler handler, bool disposeHandler = true) var urlParts = method.Url.Split(new[] {"?"}, StringSplitOptions.RemoveEmptyEntries); var requestUrl = urlParts[0]; var urlQueryString = string.Empty; - var isGetRequestAndHasQueryString = falst; + var hasQueryString = false; if (urlParts.Length > 1) { urlQueryString = urlParts[1]; - isGetRequestAndHasQueryString = method.Type.ToTitle() == "Get"; + hasQueryString = true; } + requestUrl = System.Text.RegularExpressions.Regex.Replace(requestUrl, @"\{(.*?)\}", "\"+Uri.EscapeUriString(Convert.ToString($1))+\""); - if(!hasQueryString){ - requestUrl = Regex.Replace(requestUrl, @"\{(.*?)\}", "\"+Uri.EscapeUriString(Convert.ToString($1))+\""); - } + var urlQueryParts = urlQueryString.Split(new[] {"&"}, StringSplitOptions.RemoveEmptyEntries) + .Select(item => + { + var kvParts = item.Split(new[] {"="}, + StringSplitOptions.RemoveEmptyEntries); + return new KeyValuePair(kvParts[0], kvParts[1]); + }) + .ToList(); + + var queryHasParams = + urlQueryParts.Where( + item => + allParameters.Any(param => + string.Equals(item.Value, "{" + param.Name + "}", + StringComparison.OrdinalIgnoreCase))) + .ToList(); + + var queryHasParamUrlTpl = string.Join("&", + queryHasParams.Select( + item => + string.Format("{0}={1}", item.Key, item.Value))); + + var queryHasParamUrl = System.Text.RegularExpressions.Regex.Replace(queryHasParamUrlTpl, @"\{(.*?)\}", "\"+Uri.EscapeDataString(Convert.ToString($1))+\""); + + + var queryHasNoParams = urlQueryParts.Except(queryHasParams).ToList(); + var queryNoParamUrlTpl = string.Join("&", + queryHasNoParams.Select( + item => + string.Format("{0}={1}", item.Key, item.Value))); #line default #line hidden this.Write("\r\n\t\t/// \r\n\t\t/// "); - #line 259 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 287 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 261 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 289 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 262 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 290 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 263 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 291 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\tpublic virtual async Task "); - #line 264 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 292 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 264 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 292 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden - this.Write(")\r\n\t\t{\r\n\t\t\tvar requestUrl = "); + this.Write(")\r\n\t\t{\r\n\t\t\tvar requestUrl = \""); - #line 266 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 294 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(requestUrl)); #line default #line hidden - this.Write(";\r\n\t\t\t"); + this.Write("\";\r\n\t\t\t"); - #line 267 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" - if(isGetRequestAndHasQueryString){ + #line 295 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + if(hasQueryString){ #line default #line hidden - this.Write("\t\t\t\t\r\n\t\t\t\tvar urlQueryString = Generate"); + this.Write("\r\n\t\t\t\tvar queryHasParamUrl = \""); - #line 269 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); + #line 297 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(queryHasParamUrl)); #line default #line hidden - this.Write("Url("); + this.Write("\";\r\n\r\n\r\n\t\t\t\t"); - #line 269 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(urlQueryString)); + #line 300 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + if(!string.IsNullOrEmpty(queryNoParamUrlTpl)){ #line default #line hidden - this.Write(", "); + this.Write("\t\t\t\t\tvar queryNoParamUrlTpl = \""); + + #line 301 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(queryNoParamUrlTpl)); - #line 269 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line default + #line hidden + this.Write("\";\r\n\t\t\t\t\tvar queryNoParamUrl = Generate"); + + #line 302 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); + + #line default + #line hidden + this.Write("QueryString(queryNoParamUrlTpl, "); + + #line 302 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default #line hidden - this.Write(");\r\n\t\t\t\tif (!string.IsNullOrEmpty(urlQueryString))\r\n\t\t\t\t{\r\n\t\t\t\t\trequestUrl = requ" + - "estUrl + \"?\" + urlQueryString;\r\n\t\t\t\t}\r\n\r\n\t\t\t"); + this.Write(");\r\n\t\t\t\t"); - #line 275 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 303 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" }else{ #line default #line hidden - this.Write("\t\t\treturn await HttpClient."); + this.Write("\t\t\t\t\tvar queryNoParamUrl = string.Empty;\r\n\t\t\t\t"); - #line 276 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 305 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + } + + #line default + #line hidden + this.Write("\t\t\t\r\n\t\t\t\tif (string.IsNullOrEmpty(queryHasParamUrl))\r\n\t\t\t\t{\r\n\t\t\t\t\trequestUrl = re" + + "questUrl + \"?\" + queryNoParamUrl;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\trequestUrl = req" + + "uestUrl + \"?\" + queryHasParamUrl + \"&\" + queryNoParamUrl;\r\n\t\t\t\t}\r\n\r\n\t\t\t"); + + #line 316 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + } + + #line default + #line hidden + this.Write("\r\n\t\t\t\treturn await HttpClient."); + + #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Type.ToTitle())); #line default #line hidden - #line 276 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut ? "AsJson" : "")); #line default #line hidden this.Write("Async"); - #line 276 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut && method.BodyParameter != null ? "<" + method.BodyParameter.Type + ">" : "")); #line default #line hidden this.Write("(requestUrl "); - #line 276 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut ? bodyParameterString:"")); #line default #line hidden - this.Write(").ConfigureAwait(false);\r\n\t\t\t"); - - #line 277 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" - } - - #line default - #line hidden - this.Write("\t\t}\r\n\r\n\t\t"); + this.Write(").ConfigureAwait(false);\r\n\t\t}\r\n\r\n\t\t"); - #line 280 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" - if(isGetRequestAndHasQueryString){ + #line 321 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + if(hasQueryString && !string.IsNullOrEmpty(queryNoParamUrlTpl)){ #line default #line hidden this.Write("\t\t\t\t\r\n\t\t\tpublic virtual string Generate"); - #line 282 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 323 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden - this.Write("Url(string urlQueryString, "); + this.Write("QueryString(string urlQueryString, "); - #line 282 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 323 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t\t{\r\n\t\t\t\tthrow new NotImplementedException();\r\n\t\t\t}\r\n\r\n\t\t"); - #line 287 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 328 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n\r\n\t\t/// \r\n\t\t/// "); - #line 291 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 332 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 293 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 334 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 294 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 335 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 295 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 336 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\tpublic virtual "); - #line 296 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 337 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(String.IsNullOrEmpty(method.ReturnType) ? "void" : method.ReturnType)); #line default #line hidden this.Write(" "); - #line 296 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 337 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("("); - #line 296 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 337 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t{\r\n\t\t\tvar result = "); - #line 298 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 339 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 298 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 339 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default #line hidden this.Write(").Result;\t\t \r\n\t\t\t \r\n\t\t\tEnsureSuccess(result);\r\n\t\t\t\t \r\n\t\t\t"); - #line 302 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 343 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(!String.IsNullOrEmpty(method.ReturnType)) { #line default #line hidden this.Write("\t\t\t \t\t\t \r\n\t\t\treturn result.Content.ReadAsAsync<"); - #line 303 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 344 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.ReturnType)); #line default #line hidden this.Write(">().Result;\r\n\t\t\t"); - #line 304 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 345 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t}\r\n\r\n"); - #line 307 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 348 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t#endregion\r\n\t}\r\n"); - #line 310 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 351 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt index 8782baa..b9982c1 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt @@ -240,19 +240,47 @@ namespace <#= Configuration.Namespace#>.Clients var urlParts = method.Url.Split(new[] {"?"}, StringSplitOptions.RemoveEmptyEntries); var requestUrl = urlParts[0]; var urlQueryString = string.Empty; - var isGetRequestAndHasQueryString = falst; + var hasQueryString = false; if (urlParts.Length > 1) { urlQueryString = urlParts[1]; - isGetRequestAndHasQueryString = method.Type.ToTitle() == "Get"; + hasQueryString = true; } + requestUrl = System.Text.RegularExpressions.Regex.Replace(requestUrl, @"\{(.*?)\}", "\"+Uri.EscapeUriString(Convert.ToString($1))+\""); - if(!hasQueryString){ - requestUrl = Regex.Replace(requestUrl, @"\{(.*?)\}", "\"+Uri.EscapeUriString(Convert.ToString($1))+\""); - } + var urlQueryParts = urlQueryString.Split(new[] {"&"}, StringSplitOptions.RemoveEmptyEntries) + .Select(item => + { + var kvParts = item.Split(new[] {"="}, + StringSplitOptions.RemoveEmptyEntries); + return new KeyValuePair(kvParts[0], kvParts[1]); + }) + .ToList(); + + var queryHasParams = + urlQueryParts.Where( + item => + allParameters.Any(param => + string.Equals(item.Value, "{" + param.Name + "}", + StringComparison.OrdinalIgnoreCase))) + .ToList(); + + var queryHasParamUrlTpl = string.Join("&", + queryHasParams.Select( + item => + string.Format("{0}={1}", item.Key, item.Value))); + + var queryHasParamUrl = System.Text.RegularExpressions.Regex.Replace(queryHasParamUrlTpl, @"\{(.*?)\}", "\"+Uri.EscapeDataString(Convert.ToString($1))+\""); + + + var queryHasNoParams = urlQueryParts.Except(queryHasParams).ToList(); + var queryNoParamUrlTpl = string.Join("&", + queryHasNoParams.Select( + item => + string.Format("{0}={1}", item.Key, item.Value))); #> /// @@ -263,23 +291,36 @@ namespace <#= Configuration.Namespace#>.Clients <# } #> public virtual async Task <#= method.Name #>Async(<#= parameterList#>) { - var requestUrl = <#= requestUrl #>; - <# if(isGetRequestAndHasQueryString){ #> - - var urlQueryString = Generate<#= method.Name #>Url(<#= urlQueryString #>, <#=parameterNameList#>); - if (!string.IsNullOrEmpty(urlQueryString)) + var requestUrl = "<#= requestUrl #>"; + <# if(hasQueryString){ #> + + var queryHasParamUrl = "<#= queryHasParamUrl #>"; + + + <# if(!string.IsNullOrEmpty(queryNoParamUrlTpl)){ #> + var queryNoParamUrlTpl = "<#= queryNoParamUrlTpl #>"; + var queryNoParamUrl = Generate<#= method.Name #>QueryString(queryNoParamUrlTpl, <#=parameterNameList#>); + <# }else{ #> + var queryNoParamUrl = string.Empty; + <# } #> + + if (string.IsNullOrEmpty(queryHasParamUrl)) { - requestUrl = requestUrl + "?" + urlQueryString; + requestUrl = requestUrl + "?" + queryNoParamUrl; + } + else + { + requestUrl = requestUrl + "?" + queryHasParamUrl + "&" + queryNoParamUrl; } - <# }else{ #> - return await HttpClient.<#=method.Type.ToTitle()#><#= postOrPut ? "AsJson" : "" #>Async<#= postOrPut && method.BodyParameter != null ? "<" + method.BodyParameter.Type + ">" : "" #>(requestUrl <#= postOrPut ? bodyParameterString:""#>).ConfigureAwait(false); <# } #> + + return await HttpClient.<#=method.Type.ToTitle()#><#= postOrPut ? "AsJson" : "" #>Async<#= postOrPut && method.BodyParameter != null ? "<" + method.BodyParameter.Type + ">" : "" #>(requestUrl <#= postOrPut ? bodyParameterString:""#>).ConfigureAwait(false); } - <# if(isGetRequestAndHasQueryString){ #> + <# if(hasQueryString && !string.IsNullOrEmpty(queryNoParamUrlTpl)){ #> - public virtual string Generate<#= method.Name #>Url(string urlQueryString, <#= parameterList#>) + public virtual string Generate<#= method.Name #>QueryString(string urlQueryString, <#= parameterList#>) { throw new NotImplementedException(); } From 4c91b11b2835c9bd2d58485e784d853a7acbe5e3 Mon Sep 17 00:00:00 2001 From: $+j Date: Wed, 5 Aug 2015 18:27:22 +0800 Subject: [PATCH 03/45] add type from job --- WebApiProxy.Tasks/WebApiProxyCSharp.psm1 | 41 +++++++++++++----------- WebApiProxy.Tasks/init.ps1 | 1 - 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/WebApiProxy.Tasks/WebApiProxyCSharp.psm1 b/WebApiProxy.Tasks/WebApiProxyCSharp.psm1 index ca91ca0..384e786 100644 --- a/WebApiProxy.Tasks/WebApiProxyCSharp.psm1 +++ b/WebApiProxy.Tasks/WebApiProxyCSharp.psm1 @@ -1,32 +1,35 @@ function WebApiProxy-Generate-CSharp() { + $project = Get-Project - $projectPath = [System.IO.Path]::GetDirectoryName($project.FullName) - $root = (Join-Path $projectPath "WebApiProxy\") - $rootSpaces = "$root" - $config = [WebApiProxy.Tasks.Models.Configuration]::Load($rootSpaces); + $generateJob = Start-Job -ScriptBlock { + param($project,$projectPath,$rootSpace) - $generator = New-Object WebApiProxy.Tasks.Infrastructure.CSharpGenerator -ArgumentList @($config) - - - - $fileName = (Join-Path $projectPath "WebApiProxy\WebApiProxy.generated.cs") + Add-Type -Path (Join-Path $projectPath "bin\Debug\WebApiProxy.Tasks.dll") + $config = [WebApiProxy.Tasks.Models.Configuration]::Load($rootSpaces); + + $generator = New-Object WebApiProxy.Tasks.Infrastructure.CSharpGenerator -ArgumentList @($config) + $fileName = (Join-Path $projectPath "WebApiProxy\WebApiProxy.generated.cs") - Write-Host "Generating proxy code..." + Write-Host "Generating proxy code..." - $source = $generator.Generate() + $source = $generator.Generate() - $result = New-Item $fileName ` - -ItemType "file" -Force ` - -Value $source + $result = New-Item $fileName ` + -ItemType "file" -Force ` + -Value $source - $item = $project.ProjectItems.AddFromFile($fileName) - - Write-Host "Done." - -} + $item = $project.ProjectItems.AddFromFile($fileName) + $source + Write-Host "Done..." + } -ArgumentList @($project,$projectPath,$rootSpace) + + $result = Receive-Job -Job $generateJob -Wait + Write-Host $result + Write-Host "Done." +} Export-ModuleMember "WebApiProxy-Generate-CSharp" \ No newline at end of file diff --git a/WebApiProxy.Tasks/init.ps1 b/WebApiProxy.Tasks/init.ps1 index 4eadf04..efdbddf 100644 --- a/WebApiProxy.Tasks/init.ps1 +++ b/WebApiProxy.Tasks/init.ps1 @@ -1,4 +1,3 @@ param($installPath, $toolsPath, $package) -Add-Type -Path (Join-Path $installPath "build\WebApiProxy.Tasks.dll") Import-Module (Join-Path $toolsPath "WebApiProxyCSharp.psm1") -DisableNameChecking \ No newline at end of file From e8559a5027e7f29b92a9bf75389aed2e7b2d4993 Mon Sep 17 00:00:00 2001 From: $+j Date: Wed, 5 Aug 2015 18:35:51 +0800 Subject: [PATCH 04/45] powershell script refine --- WebApiProxy.Tasks/WebApiProxyCSharp.psm1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/WebApiProxy.Tasks/WebApiProxyCSharp.psm1 b/WebApiProxy.Tasks/WebApiProxyCSharp.psm1 index 384e786..2d9d540 100644 --- a/WebApiProxy.Tasks/WebApiProxyCSharp.psm1 +++ b/WebApiProxy.Tasks/WebApiProxyCSharp.psm1 @@ -6,9 +6,11 @@ $rootSpaces = "$root" $generateJob = Start-Job -ScriptBlock { - param($project,$projectPath,$rootSpace) + param($project,$projectPath,$rootSpaces) Add-Type -Path (Join-Path $projectPath "bin\Debug\WebApiProxy.Tasks.dll") + + $config = [WebApiProxy.Tasks.Models.Configuration]::Load($rootSpaces); $generator = New-Object WebApiProxy.Tasks.Infrastructure.CSharpGenerator -ArgumentList @($config) @@ -22,10 +24,8 @@ -ItemType "file" -Force ` -Value $source - $item = $project.ProjectItems.AddFromFile($fileName) - $source - Write-Host "Done..." - } -ArgumentList @($project,$projectPath,$rootSpace) + # $item = $project.ProjectItems.AddFromFile($fileName) + } -ArgumentList @($project,$projectPath,$rootSpaces) $result = Receive-Job -Job $generateJob -Wait Write-Host $result From b8ed042d0cc7cf92adab73bc8a3606790238034d Mon Sep 17 00:00:00 2001 From: $+j Date: Wed, 5 Aug 2015 22:57:24 +0800 Subject: [PATCH 05/45] return statement remove when return type is void --- .../Templates/CSharpProxyTemplate.cs | 220 ++++++++++-------- .../Templates/CSharpProxyTemplate.tt | 17 +- 2 files changed, 133 insertions(+), 104 deletions(-) diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs index 12a21de..d3d1a3c 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs @@ -79,177 +79,193 @@ public virtual string TransformText() #line default #line hidden - this.Write(".Models\r\n{\r\n\r\n"); + this.Write(@".Models +{ + + public class WebApiProxyResponseException : Exception + { + + public HttpResponseMessage Response { get; private set; } + + + public WebApiProxyResponseException(HttpResponseMessage response): base(""A "" + response.StatusCode + "" ("" + (int)response.StatusCode + "") http exception occured. See response."") + { + Response = response; + } + } + + +"); - #line 43 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 56 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var model in Configuration.Metadata.Models.Where(m => m.Type.Equals("class"))) { #line default #line hidden this.Write("\t\r\n\t/// \r\n\t/// "); - #line 45 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 58 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(model.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t/// \r\n\tpublic partial class "); - #line 47 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 60 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(model.Name)); #line default #line hidden this.Write("\r\n\t{\r\n\t\t#region Constants\r\n"); - #line 50 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 63 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var constantItem in model.Constants) { #line default #line hidden this.Write("\t\t/// \r\n\t\t/// "); - #line 52 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 65 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t\t/// \r\n\t\tpublic const "); - #line 54 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 67 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Type)); #line default #line hidden this.Write(" "); - #line 54 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 67 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Name)); #line default #line hidden this.Write(" = "); - #line 54 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 67 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Value)); #line default #line hidden this.Write(";\r\n"); - #line 55 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 68 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t#endregion\r\n\r\n\t\t#region Properties\r\n"); - #line 59 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 72 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var propertyItem in model.Properties) { #line default #line hidden this.Write("\t\t/// \r\n\t\t/// "); - #line 61 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 74 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(propertyItem.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t\t/// \r\n\t\tpublic virtual "); - #line 63 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 76 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(propertyItem.Type)); #line default #line hidden this.Write(" "); - #line 63 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 76 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(propertyItem.Name)); #line default #line hidden this.Write(" { get; set; }\r\n"); - #line 64 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 77 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t#endregion\r\n\t}\t\r\n"); - #line 67 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 80 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n"); - #line 69 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 82 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var model in Configuration.Metadata.Models.Where(m => m.Type.Equals("enum"))) { #line default #line hidden this.Write("\t\r\n\t/// \r\n\t/// "); - #line 71 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 84 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(model.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t/// \r\n\tpublic enum "); - #line 73 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 86 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(model.Name)); #line default #line hidden this.Write("\r\n\t{\r\n"); - #line 75 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 88 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var constantItem in model.Constants) { #line default #line hidden this.Write("\r\n\t\t/// \r\n\t\t/// "); - #line 78 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 91 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t\t/// \r\n\t\t"); - #line 80 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 93 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Name)); #line default #line hidden this.Write(" = "); - #line 80 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 93 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Value)); #line default #line hidden this.Write(",\r\n"); - #line 81 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 94 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t\r\n\t}\r\n"); - #line 83 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 96 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\r\n}\r\n#endregion\r\n\r\n#region Interfaces\r\nnamespace "); - #line 89 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 102 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Namespace)); #line default @@ -257,27 +273,27 @@ public virtual string TransformText() this.Write(".Interfaces\r\n{\r\n\tpublic interface IClientBase : IDisposable\r\n\t{\r\n\t\tHttpClient Htt" + "pClient { get; }\r\n\t}\r\n\r\n"); - #line 96 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 109 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var definition in Configuration.Metadata.Definitions) { #line default #line hidden this.Write("\t\r\n\tpublic partial interface I"); - #line 97 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 110 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 97 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 110 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write(" : IClientBase\r\n\t{\t\r\n"); - #line 99 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 112 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var method in definition.ActionMethods) { var allParameters = method.UrlParameters.AsEnumerable().Where(m => m != null); @@ -304,119 +320,119 @@ public virtual string TransformText() #line hidden this.Write("\r\n\t\t/// \r\n\t\t/// "); - #line 122 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 135 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 124 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 137 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 125 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 138 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 126 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 139 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\tTask "); - #line 127 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 140 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 127 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 140 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(");\r\n\r\n"); - #line 129 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 142 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 130 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 143 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 131 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 144 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t"); - #line 132 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 145 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(String.IsNullOrEmpty(method.ReturnType) ? "void" : method.ReturnType)); #line default #line hidden this.Write(" "); - #line 132 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 145 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("("); - #line 132 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 145 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(");\r\n"); - #line 133 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 146 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t\t\t\r\n\t}\r\n"); - #line 135 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 148 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n}\r\n#endregion\r\n\r\n#region Clients\r\nnamespace "); - #line 141 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 154 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Namespace)); #line default @@ -442,7 +458,7 @@ protected ClientBase() { BaseAddress = new Uri(Configuration."); - #line 160 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 173 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Name)); #line default @@ -456,7 +472,7 @@ public virtual void EnsureSuccess(HttpResponseMessage response) if (response.IsSuccessStatusCode) return; - throw new HttpResponseException(response); + throw new WebApiProxyResponseException(response); } /// @@ -470,7 +486,7 @@ protected ClientBase(HttpMessageHandler handler, bool disposeHandler = true) { BaseAddress = new Uri(Configuration."); - #line 181 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 194 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Name)); #line default @@ -479,66 +495,66 @@ protected ClientBase(HttpMessageHandler handler, bool disposeHandler = true) "es and disposes of the managed resources. \r\n\t\t/// \r\n\t\tpublic voi" + "d Dispose()\r\n\t\t{\r\n\t\t\tHttpClient.Dispose();\r\n\t\t}\r\n\t}\r\n\r\n"); - #line 194 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 207 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var definition in Configuration.Metadata.Definitions) { #line default #line hidden this.Write("\t/// \r\n\t/// "); - #line 196 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 209 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t/// \r\n\tpublic partial class "); - #line 198 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 211 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 198 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 211 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write(" : ClientBase, Interfaces.I"); - #line 198 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 211 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 198 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 211 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write("\r\n\t{\t\t\r\n\t\tpublic "); - #line 200 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 213 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 200 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 213 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write("() : base()\r\n\t\t{\r\n\t\t}\r\n\r\n\t\tpublic "); - #line 204 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 217 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 204 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 217 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default @@ -546,7 +562,7 @@ protected ClientBase(HttpMessageHandler handler, bool disposeHandler = true) this.Write("(HttpMessageHandler handler, bool disposeHandler = true) : base(handler, disposeH" + "andler)\r\n\t\t{\r\n\t\t}\r\n\r\n\t\t#region Methods\r\n"); - #line 209 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 222 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var method in definition.ActionMethods) { var allParameters = method.UrlParameters.AsEnumerable(); @@ -628,112 +644,112 @@ protected ClientBase(HttpMessageHandler handler, bool disposeHandler = true) #line hidden this.Write("\r\n\t\t/// \r\n\t\t/// "); - #line 287 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 300 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 289 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 302 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 290 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 303 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 291 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 304 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\tpublic virtual async Task "); - #line 292 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 305 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 292 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 305 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t{\r\n\t\t\tvar requestUrl = \""); - #line 294 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 307 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(requestUrl)); #line default #line hidden this.Write("\";\r\n\t\t\t"); - #line 295 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 308 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(hasQueryString){ #line default #line hidden this.Write("\r\n\t\t\t\tvar queryHasParamUrl = \""); - #line 297 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 310 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(queryHasParamUrl)); #line default #line hidden this.Write("\";\r\n\r\n\r\n\t\t\t\t"); - #line 300 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 313 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(!string.IsNullOrEmpty(queryNoParamUrlTpl)){ #line default #line hidden this.Write("\t\t\t\t\tvar queryNoParamUrlTpl = \""); - #line 301 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 314 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(queryNoParamUrlTpl)); #line default #line hidden this.Write("\";\r\n\t\t\t\t\tvar queryNoParamUrl = Generate"); - #line 302 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 315 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("QueryString(queryNoParamUrlTpl, "); - #line 302 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 315 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default #line hidden this.Write(");\r\n\t\t\t\t"); - #line 303 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 316 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" }else{ #line default #line hidden this.Write("\t\t\t\t\tvar queryNoParamUrl = string.Empty;\r\n\t\t\t\t"); - #line 305 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default @@ -742,167 +758,167 @@ protected ClientBase(HttpMessageHandler handler, bool disposeHandler = true) "questUrl + \"?\" + queryNoParamUrl;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\trequestUrl = req" + "uestUrl + \"?\" + queryHasParamUrl + \"&\" + queryNoParamUrl;\r\n\t\t\t\t}\r\n\r\n\t\t\t"); - #line 316 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 329 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n\t\t\t\treturn await HttpClient."); - #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 331 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Type.ToTitle())); #line default #line hidden - #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 331 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut ? "AsJson" : "")); #line default #line hidden this.Write("Async"); - #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 331 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut && method.BodyParameter != null ? "<" + method.BodyParameter.Type + ">" : "")); #line default #line hidden this.Write("(requestUrl "); - #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 331 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut ? bodyParameterString:"")); #line default #line hidden this.Write(").ConfigureAwait(false);\r\n\t\t}\r\n\r\n\t\t"); - #line 321 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 334 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(hasQueryString && !string.IsNullOrEmpty(queryNoParamUrlTpl)){ #line default #line hidden this.Write("\t\t\t\t\r\n\t\t\tpublic virtual string Generate"); - #line 323 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 336 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("QueryString(string urlQueryString, "); - #line 323 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 336 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t\t{\r\n\t\t\t\tthrow new NotImplementedException();\r\n\t\t\t}\r\n\r\n\t\t"); - #line 328 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 341 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n\r\n\t\t/// \r\n\t\t/// "); - #line 332 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 345 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 334 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 347 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 335 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 348 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 336 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 349 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\tpublic virtual "); - #line 337 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 350 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(String.IsNullOrEmpty(method.ReturnType) ? "void" : method.ReturnType)); #line default #line hidden this.Write(" "); - #line 337 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 350 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("("); - #line 337 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 350 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t{\r\n\t\t\tvar result = "); - #line 339 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 352 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 339 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 352 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default #line hidden this.Write(").Result;\t\t \r\n\t\t\t \r\n\t\t\tEnsureSuccess(result);\r\n\t\t\t\t \r\n\t\t\t"); - #line 343 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" - if(!String.IsNullOrEmpty(method.ReturnType)) { + #line 356 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + if(!String.IsNullOrEmpty(method.ReturnType) && method.ReturnType != "void" ) { #line default #line hidden this.Write("\t\t\t \t\t\t \r\n\t\t\treturn result.Content.ReadAsAsync<"); - #line 344 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 357 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.ReturnType)); #line default #line hidden this.Write(">().Result;\r\n\t\t\t"); - #line 345 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 358 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t}\r\n\r\n"); - #line 348 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 361 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t#endregion\r\n\t}\r\n"); - #line 351 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 364 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt index b9982c1..c8f2ca2 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt @@ -40,6 +40,19 @@ namespace <#= Configuration.Namespace#> namespace <#= Configuration.Namespace#>.Models { + public class WebApiProxyResponseException : Exception + { + + public HttpResponseMessage Response { get; private set; } + + + public WebApiProxyResponseException(HttpResponseMessage response): base("A " + response.StatusCode + " (" + (int)response.StatusCode + ") http exception occured. See response.") + { + Response = response; + } + } + + <# foreach(var model in Configuration.Metadata.Models.Where(m => m.Type.Equals("class"))) { #> /// /// <#= model.Description.ToSummary() #> @@ -166,7 +179,7 @@ namespace <#= Configuration.Namespace#>.Clients if (response.IsSuccessStatusCode) return; - throw new HttpResponseException(response); + throw new WebApiProxyResponseException(response); } /// @@ -340,7 +353,7 @@ namespace <#= Configuration.Namespace#>.Clients EnsureSuccess(result); - <# if(!String.IsNullOrEmpty(method.ReturnType)) { #> + <# if(!String.IsNullOrEmpty(method.ReturnType) && method.ReturnType != "void" ) { #> return result.Content.ReadAsAsync<<#= method.ReturnType #>>().Result; <# } #> } From 83c484d5be0de8b3e065274e022f0084f243b17c Mon Sep 17 00:00:00 2001 From: $+j Date: Thu, 6 Aug 2015 11:05:06 +0800 Subject: [PATCH 06/45] nuget pkg info --- WebApiProxy.Tasks/Properties/AssemblyInfo.cs | 8 ++++---- WebApiProxy.Tasks/WebApiProxy.CSharp.nuspec | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/WebApiProxy.Tasks/Properties/AssemblyInfo.cs b/WebApiProxy.Tasks/Properties/AssemblyInfo.cs index 3db7037..22bc1b2 100644 --- a/WebApiProxy.Tasks/Properties/AssemblyInfo.cs +++ b/WebApiProxy.Tasks/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ [assembly: AssemblyTitle("WebApiProxy C# Proxy Client Generator")] [assembly: AssemblyDescription("Generates a C# proxy for communicating to a RESTful Web Api that implements the WebApiProxy provider")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("WebApiProxy")] +[assembly: AssemblyCompany("UOKO.COM")] [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -31,6 +31,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyInformationalVersion("1.0.4.*")] -[assembly: AssemblyVersion("1.0.4.*")] -[assembly: AssemblyFileVersion("1.0.4.*")] +[assembly: AssemblyInformationalVersion("1.5.*")] +[assembly: AssemblyVersion("1.5.*")] +[assembly: AssemblyFileVersion("1.5.*")] diff --git a/WebApiProxy.Tasks/WebApiProxy.CSharp.nuspec b/WebApiProxy.Tasks/WebApiProxy.CSharp.nuspec index 436aa60..7ed50d0 100644 --- a/WebApiProxy.Tasks/WebApiProxy.CSharp.nuspec +++ b/WebApiProxy.Tasks/WebApiProxy.CSharp.nuspec @@ -1,7 +1,7 @@ - WebApiProxy.CSharp + UOKO.ApiProxy.CSharp $title$ https://github.com/faniereynders/WebApiProxy $version$ From 3c8085ae1bd463fc6994eecfad596b1f9a24ff2b Mon Sep 17 00:00:00 2001 From: $+j Date: Thu, 6 Aug 2015 14:32:00 +0800 Subject: [PATCH 07/45] use uoko nuget pkg --- ...p.targets => UOKO.ApiProxy.CSharp.targets} | 38 +++++++++---------- WebApiProxy.Tasks/WebApiProxy.Tasks.csproj | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) rename WebApiProxy.Tasks/{WebApiProxy.CSharp.targets => UOKO.ApiProxy.CSharp.targets} (97%) diff --git a/WebApiProxy.Tasks/WebApiProxy.CSharp.targets b/WebApiProxy.Tasks/UOKO.ApiProxy.CSharp.targets similarity index 97% rename from WebApiProxy.Tasks/WebApiProxy.CSharp.targets rename to WebApiProxy.Tasks/UOKO.ApiProxy.CSharp.targets index 154d0e5..21eb234 100644 --- a/WebApiProxy.Tasks/WebApiProxy.CSharp.targets +++ b/WebApiProxy.Tasks/UOKO.ApiProxy.CSharp.targets @@ -1,19 +1,19 @@ - - - - - . - - - - - - - - - - - - - - + + + + + . + + + + + + + + + + + + + + diff --git a/WebApiProxy.Tasks/WebApiProxy.Tasks.csproj b/WebApiProxy.Tasks/WebApiProxy.Tasks.csproj index 53bb24a..b09c733 100644 --- a/WebApiProxy.Tasks/WebApiProxy.Tasks.csproj +++ b/WebApiProxy.Tasks/WebApiProxy.Tasks.csproj @@ -88,7 +88,7 @@ Designer - + Designer Always From 3b690592ae757d2126ddb59ed03ac5c481a1d69e Mon Sep 17 00:00:00 2001 From: $+j Date: Thu, 6 Aug 2015 15:39:03 +0800 Subject: [PATCH 08/45] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=B8=A6=E5=8F=82?= =?UTF-8?q?=E6=9E=84=E9=80=A0=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 为了方便 simple injector 注入构造,移除带参构造函数. 如果需要用 带 messagehandler 的 httpclient . 可以集成 client 重写 HttpClient. --- .../Templates/CSharpProxyTemplate.cs | 143 ++++++++---------- .../Templates/CSharpProxyTemplate.tt | 17 --- 2 files changed, 60 insertions(+), 100 deletions(-) diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs index d3d1a3c..7434f58 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs @@ -1,10 +1,10 @@ // ------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version: 12.0.0.0 +// 此代码由工具生成。 +// 运行时版本: 12.0.0.0 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// 对此文件的更改可能会导致不正确的行为。此外,如果 +// 重新生成代码,这些更改将会丢失。 // // ------------------------------------------------------------------------------ namespace WebApiProxy.Tasks.Templates @@ -476,93 +476,70 @@ public virtual void EnsureSuccess(HttpResponseMessage response) } /// - /// Initializes a new instance of the class. + /// Releases the unmanaged resources and disposes of the managed resources. /// - /// The handler. - /// if set to true [dispose handler]. - protected ClientBase(HttpMessageHandler handler, bool disposeHandler = true) + public void Dispose() { - HttpClient = new HttpClient(handler, disposeHandler) - { - BaseAddress = new Uri(Configuration."); + HttpClient.Dispose(); + } + } + +"); #line 194 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Name)); - - #line default - #line hidden - this.Write("BaseAddress)\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\t/// \r\n\t\t/// Releases the unmanaged resourc" + - "es and disposes of the managed resources. \r\n\t\t/// \r\n\t\tpublic voi" + - "d Dispose()\r\n\t\t{\r\n\t\t\tHttpClient.Dispose();\r\n\t\t}\r\n\t}\r\n\r\n"); - - #line 207 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var definition in Configuration.Metadata.Definitions) { #line default #line hidden this.Write("\t/// \r\n\t/// "); - #line 209 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 196 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t/// \r\n\tpublic partial class "); - #line 211 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 198 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 211 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 198 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write(" : ClientBase, Interfaces.I"); - #line 211 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 198 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 211 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 198 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write("\r\n\t{\t\t\r\n\t\tpublic "); - #line 213 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 200 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 213 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 200 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden - this.Write("() : base()\r\n\t\t{\r\n\t\t}\r\n\r\n\t\tpublic "); - - #line 217 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); - - #line default - #line hidden - - #line 217 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" - this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); + this.Write("() : base()\r\n\t\t{\r\n\t\t}\r\n\r\n\t\t#region Methods\r\n"); - #line default - #line hidden - this.Write("(HttpMessageHandler handler, bool disposeHandler = true) : base(handler, disposeH" + - "andler)\r\n\t\t{\r\n\t\t}\r\n\r\n\t\t#region Methods\r\n"); - - #line 222 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 205 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var method in definition.ActionMethods) { var allParameters = method.UrlParameters.AsEnumerable(); @@ -644,112 +621,112 @@ protected ClientBase(HttpMessageHandler handler, bool disposeHandler = true) #line hidden this.Write("\r\n\t\t/// \r\n\t\t/// "); - #line 300 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 283 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 302 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 285 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 303 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 286 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 304 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 287 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\tpublic virtual async Task "); - #line 305 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 288 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 305 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 288 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t{\r\n\t\t\tvar requestUrl = \""); - #line 307 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 290 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(requestUrl)); #line default #line hidden this.Write("\";\r\n\t\t\t"); - #line 308 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 291 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(hasQueryString){ #line default #line hidden this.Write("\r\n\t\t\t\tvar queryHasParamUrl = \""); - #line 310 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 293 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(queryHasParamUrl)); #line default #line hidden this.Write("\";\r\n\r\n\r\n\t\t\t\t"); - #line 313 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 296 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(!string.IsNullOrEmpty(queryNoParamUrlTpl)){ #line default #line hidden this.Write("\t\t\t\t\tvar queryNoParamUrlTpl = \""); - #line 314 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 297 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(queryNoParamUrlTpl)); #line default #line hidden this.Write("\";\r\n\t\t\t\t\tvar queryNoParamUrl = Generate"); - #line 315 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 298 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("QueryString(queryNoParamUrlTpl, "); - #line 315 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 298 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default #line hidden this.Write(");\r\n\t\t\t\t"); - #line 316 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 299 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" }else{ #line default #line hidden this.Write("\t\t\t\t\tvar queryNoParamUrl = string.Empty;\r\n\t\t\t\t"); - #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 301 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default @@ -758,167 +735,167 @@ protected ClientBase(HttpMessageHandler handler, bool disposeHandler = true) "questUrl + \"?\" + queryNoParamUrl;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\trequestUrl = req" + "uestUrl + \"?\" + queryHasParamUrl + \"&\" + queryNoParamUrl;\r\n\t\t\t\t}\r\n\r\n\t\t\t"); - #line 329 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 312 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n\t\t\t\treturn await HttpClient."); - #line 331 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 314 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Type.ToTitle())); #line default #line hidden - #line 331 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 314 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut ? "AsJson" : "")); #line default #line hidden this.Write("Async"); - #line 331 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 314 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut && method.BodyParameter != null ? "<" + method.BodyParameter.Type + ">" : "")); #line default #line hidden this.Write("(requestUrl "); - #line 331 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 314 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut ? bodyParameterString:"")); #line default #line hidden this.Write(").ConfigureAwait(false);\r\n\t\t}\r\n\r\n\t\t"); - #line 334 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 317 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(hasQueryString && !string.IsNullOrEmpty(queryNoParamUrlTpl)){ #line default #line hidden this.Write("\t\t\t\t\r\n\t\t\tpublic virtual string Generate"); - #line 336 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 319 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("QueryString(string urlQueryString, "); - #line 336 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 319 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t\t{\r\n\t\t\t\tthrow new NotImplementedException();\r\n\t\t\t}\r\n\r\n\t\t"); - #line 341 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 324 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n\r\n\t\t/// \r\n\t\t/// "); - #line 345 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 328 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 347 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 330 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 348 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 331 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 349 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 332 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\tpublic virtual "); - #line 350 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 333 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(String.IsNullOrEmpty(method.ReturnType) ? "void" : method.ReturnType)); #line default #line hidden this.Write(" "); - #line 350 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 333 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("("); - #line 350 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 333 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t{\r\n\t\t\tvar result = "); - #line 352 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 335 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 352 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 335 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default #line hidden this.Write(").Result;\t\t \r\n\t\t\t \r\n\t\t\tEnsureSuccess(result);\r\n\t\t\t\t \r\n\t\t\t"); - #line 356 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 339 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(!String.IsNullOrEmpty(method.ReturnType) && method.ReturnType != "void" ) { #line default #line hidden this.Write("\t\t\t \t\t\t \r\n\t\t\treturn result.Content.ReadAsAsync<"); - #line 357 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 340 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.ReturnType)); #line default #line hidden this.Write(">().Result;\r\n\t\t\t"); - #line 358 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 341 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t}\r\n\r\n"); - #line 361 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 344 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t#endregion\r\n\t}\r\n"); - #line 364 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 347 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt index c8f2ca2..7d7231c 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt @@ -182,19 +182,6 @@ namespace <#= Configuration.Namespace#>.Clients throw new WebApiProxyResponseException(response); } - /// - /// Initializes a new instance of the class. - /// - /// The handler. - /// if set to true [dispose handler]. - protected ClientBase(HttpMessageHandler handler, bool disposeHandler = true) - { - HttpClient = new HttpClient(handler, disposeHandler) - { - BaseAddress = new Uri(Configuration.<#= Configuration.Name #>BaseAddress) - }; - } - /// /// Releases the unmanaged resources and disposes of the managed resources. /// @@ -214,10 +201,6 @@ namespace <#= Configuration.Namespace#>.Clients { } - public <#=definition.Name#><#= Configuration.ClientSuffix#>(HttpMessageHandler handler, bool disposeHandler = true) : base(handler, disposeHandler) - { - } - #region Methods <# foreach(var method in definition.ActionMethods) { var allParameters = method.UrlParameters.AsEnumerable(); From 5a61e7d27e50dc973c0c244898c218af32298735 Mon Sep 17 00:00:00 2001 From: $+j Date: Thu, 6 Aug 2015 16:30:16 +0800 Subject: [PATCH 09/45] add summary to interface --- .../Templates/CSharpProxyTemplate.cs | 129 +++++++++--------- .../Templates/CSharpProxyTemplate.tt | 3 + 2 files changed, 71 insertions(+), 61 deletions(-) diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs index 7434f58..a325509 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs @@ -367,72 +367,79 @@ public WebApiProxyResponseException(HttpResponseMessage response): base(""A "" + #line default #line hidden - this.Write(");\r\n\r\n"); + this.Write(");\r\n\r\n\t\t/// \r\n\t\t/// "); - #line 142 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 143 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); + + #line default + #line hidden + this.Write("\r\n\t\t/// \r\n"); + + #line 145 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 143 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 146 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 144 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 147 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t"); - #line 145 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 148 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(String.IsNullOrEmpty(method.ReturnType) ? "void" : method.ReturnType)); #line default #line hidden this.Write(" "); - #line 145 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 148 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("("); - #line 145 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 148 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(");\r\n"); - #line 146 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 149 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t\t\t\r\n\t}\r\n"); - #line 148 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 151 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n}\r\n#endregion\r\n\r\n#region Clients\r\nnamespace "); - #line 154 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 157 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Namespace)); #line default @@ -458,7 +465,7 @@ protected ClientBase() { BaseAddress = new Uri(Configuration."); - #line 173 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 176 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Name)); #line default @@ -486,60 +493,60 @@ public void Dispose() "); - #line 194 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 197 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var definition in Configuration.Metadata.Definitions) { #line default #line hidden this.Write("\t/// \r\n\t/// "); - #line 196 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 199 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t/// \r\n\tpublic partial class "); - #line 198 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 201 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 198 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 201 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write(" : ClientBase, Interfaces.I"); - #line 198 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 201 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 198 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 201 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write("\r\n\t{\t\t\r\n\t\tpublic "); - #line 200 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 203 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 200 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 203 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write("() : base()\r\n\t\t{\r\n\t\t}\r\n\r\n\t\t#region Methods\r\n"); - #line 205 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 208 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var method in definition.ActionMethods) { var allParameters = method.UrlParameters.AsEnumerable(); @@ -621,112 +628,112 @@ public void Dispose() #line hidden this.Write("\r\n\t\t/// \r\n\t\t/// "); - #line 283 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 286 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 285 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 288 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 286 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 289 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 287 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 290 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\tpublic virtual async Task "); - #line 288 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 291 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 288 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 291 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t{\r\n\t\t\tvar requestUrl = \""); - #line 290 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 293 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(requestUrl)); #line default #line hidden this.Write("\";\r\n\t\t\t"); - #line 291 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 294 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(hasQueryString){ #line default #line hidden this.Write("\r\n\t\t\t\tvar queryHasParamUrl = \""); - #line 293 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 296 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(queryHasParamUrl)); #line default #line hidden this.Write("\";\r\n\r\n\r\n\t\t\t\t"); - #line 296 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 299 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(!string.IsNullOrEmpty(queryNoParamUrlTpl)){ #line default #line hidden this.Write("\t\t\t\t\tvar queryNoParamUrlTpl = \""); - #line 297 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 300 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(queryNoParamUrlTpl)); #line default #line hidden this.Write("\";\r\n\t\t\t\t\tvar queryNoParamUrl = Generate"); - #line 298 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 301 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("QueryString(queryNoParamUrlTpl, "); - #line 298 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 301 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default #line hidden this.Write(");\r\n\t\t\t\t"); - #line 299 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 302 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" }else{ #line default #line hidden this.Write("\t\t\t\t\tvar queryNoParamUrl = string.Empty;\r\n\t\t\t\t"); - #line 301 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 304 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default @@ -735,167 +742,167 @@ public void Dispose() "questUrl + \"?\" + queryNoParamUrl;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\trequestUrl = req" + "uestUrl + \"?\" + queryHasParamUrl + \"&\" + queryNoParamUrl;\r\n\t\t\t\t}\r\n\r\n\t\t\t"); - #line 312 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 315 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n\t\t\t\treturn await HttpClient."); - #line 314 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 317 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Type.ToTitle())); #line default #line hidden - #line 314 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 317 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut ? "AsJson" : "")); #line default #line hidden this.Write("Async"); - #line 314 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 317 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut && method.BodyParameter != null ? "<" + method.BodyParameter.Type + ">" : "")); #line default #line hidden this.Write("(requestUrl "); - #line 314 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 317 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut ? bodyParameterString:"")); #line default #line hidden this.Write(").ConfigureAwait(false);\r\n\t\t}\r\n\r\n\t\t"); - #line 317 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 320 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(hasQueryString && !string.IsNullOrEmpty(queryNoParamUrlTpl)){ #line default #line hidden this.Write("\t\t\t\t\r\n\t\t\tpublic virtual string Generate"); - #line 319 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 322 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("QueryString(string urlQueryString, "); - #line 319 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 322 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t\t{\r\n\t\t\t\tthrow new NotImplementedException();\r\n\t\t\t}\r\n\r\n\t\t"); - #line 324 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 327 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n\r\n\t\t/// \r\n\t\t/// "); - #line 328 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 331 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 330 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 333 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 331 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 334 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 332 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 335 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\tpublic virtual "); - #line 333 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 336 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(String.IsNullOrEmpty(method.ReturnType) ? "void" : method.ReturnType)); #line default #line hidden this.Write(" "); - #line 333 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 336 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("("); - #line 333 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 336 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t{\r\n\t\t\tvar result = "); - #line 335 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 338 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 335 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 338 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default #line hidden this.Write(").Result;\t\t \r\n\t\t\t \r\n\t\t\tEnsureSuccess(result);\r\n\t\t\t\t \r\n\t\t\t"); - #line 339 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 342 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(!String.IsNullOrEmpty(method.ReturnType) && method.ReturnType != "void" ) { #line default #line hidden this.Write("\t\t\t \t\t\t \r\n\t\t\treturn result.Content.ReadAsAsync<"); - #line 340 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 343 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.ReturnType)); #line default #line hidden this.Write(">().Result;\r\n\t\t\t"); - #line 341 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 344 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t}\r\n\r\n"); - #line 344 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 347 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t#endregion\r\n\t}\r\n"); - #line 347 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 350 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt index 7d7231c..0d895fc 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt @@ -139,6 +139,9 @@ namespace <#= Configuration.Namespace#>.Interfaces <# } #> Task <#= method.Name #>Async(<#= parameterList#>); + /// + /// <#= method.Description #> + /// <# foreach(var p in method.UrlParameters) {#> /// <#= p.Description #> <# } #> From 901286653f68228c1110f13abced7eee5c7295b2 Mon Sep 17 00:00:00 2001 From: $+j Date: Thu, 6 Aug 2015 19:31:13 +0800 Subject: [PATCH 10/45] add generate url easy --- .../Templates/CSharpProxyTemplate.cs | 249 ++++++++++-------- .../Templates/CSharpProxyTemplate.tt | 18 ++ 2 files changed, 164 insertions(+), 103 deletions(-) diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs index a325509..4fecca2 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs @@ -42,16 +42,17 @@ public virtual string TransformText() using System.Linq; using System.Net; using System.Web; +using Newtonsoft.Json; using "); - #line 20 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 21 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Namespace)); #line default #line hidden this.Write(".Models;\r\n\r\n#region Proxies\r\nnamespace "); - #line 23 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 24 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Namespace)); #line default @@ -60,21 +61,21 @@ public virtual string TransformText() " class Configuration\r\n\t{\r\n\t\t/// \r\n\t\t/// Web Api Base Address.\r\n\t\t/// \r\n\t\tpublic static string "); - #line 33 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 34 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Name)); #line default #line hidden this.Write("BaseAddress = \""); - #line 33 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 34 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Metadata.Host)); #line default #line hidden this.Write("\";\r\n\t\t\r\n\t}\r\n}\r\n#endregion\r\n\r\n#region Models\r\nnamespace "); - #line 40 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 41 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Namespace)); #line default @@ -97,175 +98,175 @@ public WebApiProxyResponseException(HttpResponseMessage response): base(""A "" + "); - #line 56 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 57 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var model in Configuration.Metadata.Models.Where(m => m.Type.Equals("class"))) { #line default #line hidden this.Write("\t\r\n\t/// \r\n\t/// "); - #line 58 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 59 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(model.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t/// \r\n\tpublic partial class "); - #line 60 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 61 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(model.Name)); #line default #line hidden this.Write("\r\n\t{\r\n\t\t#region Constants\r\n"); - #line 63 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 64 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var constantItem in model.Constants) { #line default #line hidden this.Write("\t\t/// \r\n\t\t/// "); - #line 65 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 66 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t\t/// \r\n\t\tpublic const "); - #line 67 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 68 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Type)); #line default #line hidden this.Write(" "); - #line 67 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 68 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Name)); #line default #line hidden this.Write(" = "); - #line 67 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 68 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Value)); #line default #line hidden this.Write(";\r\n"); - #line 68 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 69 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t#endregion\r\n\r\n\t\t#region Properties\r\n"); - #line 72 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 73 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var propertyItem in model.Properties) { #line default #line hidden this.Write("\t\t/// \r\n\t\t/// "); - #line 74 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 75 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(propertyItem.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t\t/// \r\n\t\tpublic virtual "); - #line 76 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 77 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(propertyItem.Type)); #line default #line hidden this.Write(" "); - #line 76 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 77 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(propertyItem.Name)); #line default #line hidden this.Write(" { get; set; }\r\n"); - #line 77 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 78 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t#endregion\r\n\t}\t\r\n"); - #line 80 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 81 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n"); - #line 82 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 83 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var model in Configuration.Metadata.Models.Where(m => m.Type.Equals("enum"))) { #line default #line hidden this.Write("\t\r\n\t/// \r\n\t/// "); - #line 84 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 85 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(model.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t/// \r\n\tpublic enum "); - #line 86 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 87 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(model.Name)); #line default #line hidden this.Write("\r\n\t{\r\n"); - #line 88 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 89 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var constantItem in model.Constants) { #line default #line hidden this.Write("\r\n\t\t/// \r\n\t\t/// "); - #line 91 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 92 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t\t/// \r\n\t\t"); - #line 93 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 94 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Name)); #line default #line hidden this.Write(" = "); - #line 93 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 94 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Value)); #line default #line hidden this.Write(",\r\n"); - #line 94 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 95 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t\r\n\t}\r\n"); - #line 96 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 97 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\r\n}\r\n#endregion\r\n\r\n#region Interfaces\r\nnamespace "); - #line 102 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 103 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Namespace)); #line default @@ -273,27 +274,27 @@ public WebApiProxyResponseException(HttpResponseMessage response): base(""A "" + this.Write(".Interfaces\r\n{\r\n\tpublic interface IClientBase : IDisposable\r\n\t{\r\n\t\tHttpClient Htt" + "pClient { get; }\r\n\t}\r\n\r\n"); - #line 109 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 110 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var definition in Configuration.Metadata.Definitions) { #line default #line hidden this.Write("\t\r\n\tpublic partial interface I"); - #line 110 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 111 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 110 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 111 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write(" : IClientBase\r\n\t{\t\r\n"); - #line 112 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 113 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var method in definition.ActionMethods) { var allParameters = method.UrlParameters.AsEnumerable().Where(m => m != null); @@ -320,126 +321,126 @@ public WebApiProxyResponseException(HttpResponseMessage response): base(""A "" + #line hidden this.Write("\r\n\t\t/// \r\n\t\t/// "); - #line 135 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 136 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 137 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 138 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 138 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 139 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 139 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 140 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\tTask "); - #line 140 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 141 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 140 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 141 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(");\r\n\r\n\t\t/// \r\n\t\t/// "); - #line 143 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 144 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 145 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 146 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 146 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 147 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 147 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 148 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t"); - #line 148 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 149 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(String.IsNullOrEmpty(method.ReturnType) ? "void" : method.ReturnType)); #line default #line hidden this.Write(" "); - #line 148 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 149 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("("); - #line 148 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 149 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(");\r\n"); - #line 149 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 150 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t\t\t\r\n\t}\r\n"); - #line 151 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 152 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n}\r\n#endregion\r\n\r\n#region Clients\r\nnamespace "); - #line 157 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 158 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Namespace)); #line default @@ -465,7 +466,7 @@ protected ClientBase() { BaseAddress = new Uri(Configuration."); - #line 176 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 177 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Name)); #line default @@ -493,60 +494,60 @@ public void Dispose() "); - #line 197 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 198 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var definition in Configuration.Metadata.Definitions) { #line default #line hidden this.Write("\t/// \r\n\t/// "); - #line 199 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 200 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t/// \r\n\tpublic partial class "); - #line 201 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 202 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 201 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 202 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write(" : ClientBase, Interfaces.I"); - #line 201 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 202 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 201 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 202 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write("\r\n\t{\t\t\r\n\t\tpublic "); - #line 203 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 204 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 203 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 204 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write("() : base()\r\n\t\t{\r\n\t\t}\r\n\r\n\t\t#region Methods\r\n"); - #line 208 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 209 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var method in definition.ActionMethods) { var allParameters = method.UrlParameters.AsEnumerable(); @@ -628,112 +629,112 @@ public void Dispose() #line hidden this.Write("\r\n\t\t/// \r\n\t\t/// "); - #line 286 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 287 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 288 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 289 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 289 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 290 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 290 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 291 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\tpublic virtual async Task "); - #line 291 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 292 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 291 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 292 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t{\r\n\t\t\tvar requestUrl = \""); - #line 293 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 294 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(requestUrl)); #line default #line hidden this.Write("\";\r\n\t\t\t"); - #line 294 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 295 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(hasQueryString){ #line default #line hidden this.Write("\r\n\t\t\t\tvar queryHasParamUrl = \""); - #line 296 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 297 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(queryHasParamUrl)); #line default #line hidden this.Write("\";\r\n\r\n\r\n\t\t\t\t"); - #line 299 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 300 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(!string.IsNullOrEmpty(queryNoParamUrlTpl)){ #line default #line hidden this.Write("\t\t\t\t\tvar queryNoParamUrlTpl = \""); - #line 300 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 301 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(queryNoParamUrlTpl)); #line default #line hidden this.Write("\";\r\n\t\t\t\t\tvar queryNoParamUrl = Generate"); - #line 301 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 302 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("QueryString(queryNoParamUrlTpl, "); - #line 301 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 302 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default #line hidden this.Write(");\r\n\t\t\t\t"); - #line 302 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 303 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" }else{ #line default #line hidden this.Write("\t\t\t\t\tvar queryNoParamUrl = string.Empty;\r\n\t\t\t\t"); - #line 304 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 305 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default @@ -742,167 +743,209 @@ public void Dispose() "questUrl + \"?\" + queryNoParamUrl;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\trequestUrl = req" + "uestUrl + \"?\" + queryHasParamUrl + \"&\" + queryNoParamUrl;\r\n\t\t\t\t}\r\n\r\n\t\t\t"); - #line 315 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 316 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n\t\t\t\treturn await HttpClient."); - #line 317 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Type.ToTitle())); #line default #line hidden - #line 317 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut ? "AsJson" : "")); #line default #line hidden this.Write("Async"); - #line 317 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut && method.BodyParameter != null ? "<" + method.BodyParameter.Type + ">" : "")); #line default #line hidden this.Write("(requestUrl "); - #line 317 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut ? bodyParameterString:"")); #line default #line hidden this.Write(").ConfigureAwait(false);\r\n\t\t}\r\n\r\n\t\t"); - #line 320 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 321 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(hasQueryString && !string.IsNullOrEmpty(queryNoParamUrlTpl)){ #line default #line hidden this.Write("\t\t\t\t\r\n\t\t\tpublic virtual string Generate"); - #line 322 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 323 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("QueryString(string urlQueryString, "); - #line 322 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 323 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); + + #line default + #line hidden + this.Write(")\r\n\t\t\t{\r\n\t\t\t\tvar kvList = Generate"); + + #line 325 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); + + #line default + #line hidden + this.Write("KeyValueList( "); + + #line 325 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); + + #line default + #line hidden + this.Write(@" ); + var urlTpl = string.Join(""&"", + kvList.Select(item => + { + var queryKey = Uri.EscapeDataString(item.Key); + + var queryValueJson = JsonConvert.SerializeObject(item.Value); + var queryValue = Uri.EscapeDataString(queryValueJson); + return queryKey + ""="" + queryValue; + })); + + return urlTpl; + } + + public virtual List> Generate"); + + #line 339 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); + + #line default + #line hidden + this.Write("KeyValueList("); + + #line 339 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden - this.Write(")\r\n\t\t\t{\r\n\t\t\t\tthrow new NotImplementedException();\r\n\t\t\t}\r\n\r\n\t\t"); + this.Write(")\r\n\t\t\t{\r\n\t\t\t\tthrow new NotImplementedException();\r\n\t\t\t}\r\n\r\n\r\n\t\t"); - #line 327 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 345 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n\r\n\t\t/// \r\n\t\t/// "); - #line 331 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 349 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 333 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 351 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 334 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 352 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 335 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 353 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\tpublic virtual "); - #line 336 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 354 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(String.IsNullOrEmpty(method.ReturnType) ? "void" : method.ReturnType)); #line default #line hidden this.Write(" "); - #line 336 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 354 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("("); - #line 336 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 354 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t{\r\n\t\t\tvar result = "); - #line 338 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 356 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 338 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 356 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default #line hidden this.Write(").Result;\t\t \r\n\t\t\t \r\n\t\t\tEnsureSuccess(result);\r\n\t\t\t\t \r\n\t\t\t"); - #line 342 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 360 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(!String.IsNullOrEmpty(method.ReturnType) && method.ReturnType != "void" ) { #line default #line hidden this.Write("\t\t\t \t\t\t \r\n\t\t\treturn result.Content.ReadAsAsync<"); - #line 343 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 361 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.ReturnType)); #line default #line hidden this.Write(">().Result;\r\n\t\t\t"); - #line 344 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 362 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t}\r\n\r\n"); - #line 347 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 365 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t#endregion\r\n\t}\r\n"); - #line 350 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 368 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt index 0d895fc..d647f41 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt @@ -17,6 +17,7 @@ using System.Net.Http.Formatting; using System.Linq; using System.Net; using System.Web; +using Newtonsoft.Json; using <#= Configuration.Namespace#>.Models; #region Proxies @@ -320,10 +321,27 @@ namespace <#= Configuration.Namespace#>.Clients <# if(hasQueryString && !string.IsNullOrEmpty(queryNoParamUrlTpl)){ #> public virtual string Generate<#= method.Name #>QueryString(string urlQueryString, <#= parameterList#>) + { + var kvList = Generate<#= method.Name #>KeyValueList( <#=parameterNameList#> ); + var urlTpl = string.Join("&", + kvList.Select(item => + { + var queryKey = Uri.EscapeDataString(item.Key); + + var queryValueJson = JsonConvert.SerializeObject(item.Value); + var queryValue = Uri.EscapeDataString(queryValueJson); + return queryKey + "=" + queryValue; + })); + + return urlTpl; + } + + public virtual List> Generate<#= method.Name #>KeyValueList(<#= parameterList#>) { throw new NotImplementedException(); } + <#}#> From c51d2c8674c321f6c4b108c028f5154d3a6bb898 Mon Sep 17 00:00:00 2001 From: $+j Date: Thu, 6 Aug 2015 20:01:52 +0800 Subject: [PATCH 11/45] genereate url from kv --- .../Templates/CSharpProxyTemplate.cs | 141 +++++++++--------- .../Templates/CSharpProxyTemplate.tt | 27 ++-- 2 files changed, 91 insertions(+), 77 deletions(-) diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs index 4fecca2..3bb1e20 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs @@ -483,6 +483,23 @@ public virtual void EnsureSuccess(HttpResponseMessage response) throw new WebApiProxyResponseException(response); } + public virtual string GenerateQueryStrFromKvList(List> kvList) + { + var urlTpl = string.Join(""&"", + kvList.Select(item => + { + var queryKey = Uri.EscapeDataString(item.Key); + var queryValue = string.Empty; + if (item.Value != null) + { + var queryValueJson = JsonConvert.SerializeObject(item.Value); + queryValue = Uri.EscapeDataString(queryValueJson); + } + return queryKey + ""="" + queryValue; + })); + return urlTpl; + } + /// /// Releases the unmanaged resources and disposes of the managed resources. /// @@ -494,60 +511,60 @@ public void Dispose() "); - #line 198 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 215 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var definition in Configuration.Metadata.Definitions) { #line default #line hidden this.Write("\t/// \r\n\t/// "); - #line 200 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 217 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t/// \r\n\tpublic partial class "); - #line 202 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 219 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 202 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 219 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write(" : ClientBase, Interfaces.I"); - #line 202 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 219 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 202 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 219 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write("\r\n\t{\t\t\r\n\t\tpublic "); - #line 204 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 221 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 204 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 221 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write("() : base()\r\n\t\t{\r\n\t\t}\r\n\r\n\t\t#region Methods\r\n"); - #line 209 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 226 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var method in definition.ActionMethods) { var allParameters = method.UrlParameters.AsEnumerable(); @@ -629,112 +646,112 @@ public void Dispose() #line hidden this.Write("\r\n\t\t/// \r\n\t\t/// "); - #line 287 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 304 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 289 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 306 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 290 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 307 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 291 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 308 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\tpublic virtual async Task "); - #line 292 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 309 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 292 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 309 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t{\r\n\t\t\tvar requestUrl = \""); - #line 294 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 311 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(requestUrl)); #line default #line hidden this.Write("\";\r\n\t\t\t"); - #line 295 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 312 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(hasQueryString){ #line default #line hidden this.Write("\r\n\t\t\t\tvar queryHasParamUrl = \""); - #line 297 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 314 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(queryHasParamUrl)); #line default #line hidden this.Write("\";\r\n\r\n\r\n\t\t\t\t"); - #line 300 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 317 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(!string.IsNullOrEmpty(queryNoParamUrlTpl)){ #line default #line hidden this.Write("\t\t\t\t\tvar queryNoParamUrlTpl = \""); - #line 301 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(queryNoParamUrlTpl)); #line default #line hidden this.Write("\";\r\n\t\t\t\t\tvar queryNoParamUrl = Generate"); - #line 302 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 319 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("QueryString(queryNoParamUrlTpl, "); - #line 302 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 319 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default #line hidden this.Write(");\r\n\t\t\t\t"); - #line 303 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 320 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" }else{ #line default #line hidden this.Write("\t\t\t\t\tvar queryNoParamUrl = string.Empty;\r\n\t\t\t\t"); - #line 305 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 322 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default @@ -743,209 +760,197 @@ public void Dispose() "questUrl + \"?\" + queryNoParamUrl;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\trequestUrl = req" + "uestUrl + \"?\" + queryHasParamUrl + \"&\" + queryNoParamUrl;\r\n\t\t\t\t}\r\n\r\n\t\t\t"); - #line 316 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 333 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n\t\t\t\treturn await HttpClient."); - #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 335 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Type.ToTitle())); #line default #line hidden - #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 335 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut ? "AsJson" : "")); #line default #line hidden this.Write("Async"); - #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 335 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut && method.BodyParameter != null ? "<" + method.BodyParameter.Type + ">" : "")); #line default #line hidden this.Write("(requestUrl "); - #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 335 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut ? bodyParameterString:"")); #line default #line hidden this.Write(").ConfigureAwait(false);\r\n\t\t}\r\n\r\n\t\t"); - #line 321 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 338 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(hasQueryString && !string.IsNullOrEmpty(queryNoParamUrlTpl)){ #line default #line hidden this.Write("\t\t\t\t\r\n\t\t\tpublic virtual string Generate"); - #line 323 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 340 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("QueryString(string urlQueryString, "); - #line 323 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 340 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t\t{\r\n\t\t\t\tvar kvList = Generate"); - #line 325 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 342 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("KeyValueList( "); - #line 325 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 342 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default #line hidden - this.Write(@" ); - var urlTpl = string.Join(""&"", - kvList.Select(item => - { - var queryKey = Uri.EscapeDataString(item.Key); - - var queryValueJson = JsonConvert.SerializeObject(item.Value); - var queryValue = Uri.EscapeDataString(queryValueJson); - return queryKey + ""="" + queryValue; - })); - - return urlTpl; - } - - public virtual List> Generate"); + this.Write(" );\r\n var urlTpl = GenerateQueryStrFromKvList(kvList);\r\n\r\n " + + "\t return urlTpl;\r\n\t\t\t}\r\n\r\n\t\t\tpublic virtual List" + + "> Generate"); - #line 339 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 348 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("KeyValueList("); - #line 339 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 348 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t\t{\r\n\t\t\t\tthrow new NotImplementedException();\r\n\t\t\t}\r\n\r\n\r\n\t\t"); - #line 345 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 354 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n\r\n\t\t/// \r\n\t\t/// "); - #line 349 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 358 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 351 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 360 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 352 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 361 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 353 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 362 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\tpublic virtual "); - #line 354 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 363 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(String.IsNullOrEmpty(method.ReturnType) ? "void" : method.ReturnType)); #line default #line hidden this.Write(" "); - #line 354 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 363 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("("); - #line 354 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 363 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t{\r\n\t\t\tvar result = "); - #line 356 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 365 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 356 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 365 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default #line hidden this.Write(").Result;\t\t \r\n\t\t\t \r\n\t\t\tEnsureSuccess(result);\r\n\t\t\t\t \r\n\t\t\t"); - #line 360 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 369 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(!String.IsNullOrEmpty(method.ReturnType) && method.ReturnType != "void" ) { #line default #line hidden this.Write("\t\t\t \t\t\t \r\n\t\t\treturn result.Content.ReadAsAsync<"); - #line 361 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 370 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.ReturnType)); #line default #line hidden this.Write(">().Result;\r\n\t\t\t"); - #line 362 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 371 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t}\r\n\r\n"); - #line 365 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 374 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t#endregion\r\n\t}\r\n"); - #line 368 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 377 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt index d647f41..17b77b3 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt @@ -186,6 +186,23 @@ namespace <#= Configuration.Namespace#>.Clients throw new WebApiProxyResponseException(response); } + public virtual string GenerateQueryStrFromKvList(List> kvList) + { + var urlTpl = string.Join("&", + kvList.Select(item => + { + var queryKey = Uri.EscapeDataString(item.Key); + var queryValue = string.Empty; + if (item.Value != null) + { + var queryValueJson = JsonConvert.SerializeObject(item.Value); + queryValue = Uri.EscapeDataString(queryValueJson); + } + return queryKey + "=" + queryValue; + })); + return urlTpl; + } + /// /// Releases the unmanaged resources and disposes of the managed resources. /// @@ -323,15 +340,7 @@ namespace <#= Configuration.Namespace#>.Clients public virtual string Generate<#= method.Name #>QueryString(string urlQueryString, <#= parameterList#>) { var kvList = Generate<#= method.Name #>KeyValueList( <#=parameterNameList#> ); - var urlTpl = string.Join("&", - kvList.Select(item => - { - var queryKey = Uri.EscapeDataString(item.Key); - - var queryValueJson = JsonConvert.SerializeObject(item.Value); - var queryValue = Uri.EscapeDataString(queryValueJson); - return queryKey + "=" + queryValue; - })); + var urlTpl = GenerateQueryStrFromKvList(kvList); return urlTpl; } From 2b046ad404382bc2c760d3a7ddb63118f9934ae3 Mon Sep 17 00:00:00 2001 From: $+j Date: Fri, 7 Aug 2015 15:33:26 +0800 Subject: [PATCH 12/45] remove json convert --- .../Templates/CSharpProxyTemplate.cs | 216 +++++++++--------- .../Templates/CSharpProxyTemplate.tt | 4 +- 2 files changed, 108 insertions(+), 112 deletions(-) diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs index 3bb1e20..2fb4255 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs @@ -42,17 +42,16 @@ public virtual string TransformText() using System.Linq; using System.Net; using System.Web; -using Newtonsoft.Json; using "); - #line 21 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 20 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Namespace)); #line default #line hidden this.Write(".Models;\r\n\r\n#region Proxies\r\nnamespace "); - #line 24 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 23 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Namespace)); #line default @@ -61,21 +60,21 @@ public virtual string TransformText() " class Configuration\r\n\t{\r\n\t\t/// \r\n\t\t/// Web Api Base Address.\r\n\t\t/// \r\n\t\tpublic static string "); - #line 34 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 33 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Name)); #line default #line hidden this.Write("BaseAddress = \""); - #line 34 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 33 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Metadata.Host)); #line default #line hidden this.Write("\";\r\n\t\t\r\n\t}\r\n}\r\n#endregion\r\n\r\n#region Models\r\nnamespace "); - #line 41 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 40 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Namespace)); #line default @@ -98,175 +97,175 @@ public WebApiProxyResponseException(HttpResponseMessage response): base(""A "" + "); - #line 57 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 56 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var model in Configuration.Metadata.Models.Where(m => m.Type.Equals("class"))) { #line default #line hidden this.Write("\t\r\n\t/// \r\n\t/// "); - #line 59 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 58 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(model.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t/// \r\n\tpublic partial class "); - #line 61 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 60 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(model.Name)); #line default #line hidden this.Write("\r\n\t{\r\n\t\t#region Constants\r\n"); - #line 64 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 63 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var constantItem in model.Constants) { #line default #line hidden this.Write("\t\t/// \r\n\t\t/// "); - #line 66 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 65 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t\t/// \r\n\t\tpublic const "); - #line 68 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 67 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Type)); #line default #line hidden this.Write(" "); - #line 68 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 67 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Name)); #line default #line hidden this.Write(" = "); - #line 68 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 67 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Value)); #line default #line hidden this.Write(";\r\n"); - #line 69 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 68 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t#endregion\r\n\r\n\t\t#region Properties\r\n"); - #line 73 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 72 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var propertyItem in model.Properties) { #line default #line hidden this.Write("\t\t/// \r\n\t\t/// "); - #line 75 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 74 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(propertyItem.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t\t/// \r\n\t\tpublic virtual "); - #line 77 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 76 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(propertyItem.Type)); #line default #line hidden this.Write(" "); - #line 77 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 76 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(propertyItem.Name)); #line default #line hidden this.Write(" { get; set; }\r\n"); - #line 78 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 77 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t#endregion\r\n\t}\t\r\n"); - #line 81 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 80 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n"); - #line 83 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 82 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var model in Configuration.Metadata.Models.Where(m => m.Type.Equals("enum"))) { #line default #line hidden this.Write("\t\r\n\t/// \r\n\t/// "); - #line 85 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 84 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(model.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t/// \r\n\tpublic enum "); - #line 87 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 86 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(model.Name)); #line default #line hidden this.Write("\r\n\t{\r\n"); - #line 89 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 88 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var constantItem in model.Constants) { #line default #line hidden this.Write("\r\n\t\t/// \r\n\t\t/// "); - #line 92 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 91 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t\t/// \r\n\t\t"); - #line 94 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 93 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Name)); #line default #line hidden this.Write(" = "); - #line 94 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 93 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Value)); #line default #line hidden this.Write(",\r\n"); - #line 95 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 94 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t\r\n\t}\r\n"); - #line 97 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 96 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\r\n}\r\n#endregion\r\n\r\n#region Interfaces\r\nnamespace "); - #line 103 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 102 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Namespace)); #line default @@ -274,27 +273,27 @@ public WebApiProxyResponseException(HttpResponseMessage response): base(""A "" + this.Write(".Interfaces\r\n{\r\n\tpublic interface IClientBase : IDisposable\r\n\t{\r\n\t\tHttpClient Htt" + "pClient { get; }\r\n\t}\r\n\r\n"); - #line 110 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 109 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var definition in Configuration.Metadata.Definitions) { #line default #line hidden this.Write("\t\r\n\tpublic partial interface I"); - #line 111 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 110 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 111 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 110 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write(" : IClientBase\r\n\t{\t\r\n"); - #line 113 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 112 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var method in definition.ActionMethods) { var allParameters = method.UrlParameters.AsEnumerable().Where(m => m != null); @@ -321,126 +320,126 @@ public WebApiProxyResponseException(HttpResponseMessage response): base(""A "" + #line hidden this.Write("\r\n\t\t/// \r\n\t\t/// "); - #line 136 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 135 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 138 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 137 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 139 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 138 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 140 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 139 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\tTask "); - #line 141 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 140 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 141 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 140 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(");\r\n\r\n\t\t/// \r\n\t\t/// "); - #line 144 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 143 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 146 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 145 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 147 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 146 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 148 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 147 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t"); - #line 149 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 148 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(String.IsNullOrEmpty(method.ReturnType) ? "void" : method.ReturnType)); #line default #line hidden this.Write(" "); - #line 149 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 148 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("("); - #line 149 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 148 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(");\r\n"); - #line 150 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 149 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t\t\t\r\n\t}\r\n"); - #line 152 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 151 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n}\r\n#endregion\r\n\r\n#region Clients\r\nnamespace "); - #line 158 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 157 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Namespace)); #line default @@ -466,7 +465,7 @@ protected ClientBase() { BaseAddress = new Uri(Configuration."); - #line 177 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 176 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Name)); #line default @@ -492,8 +491,7 @@ public virtual string GenerateQueryStrFromKvList(List\r\n\tpublic partial class "); - #line 219 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 217 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 219 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 217 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write(" : ClientBase, Interfaces.I"); - #line 219 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 217 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 219 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 217 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write("\r\n\t{\t\t\r\n\t\tpublic "); - #line 221 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 219 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 221 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 219 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write("() : base()\r\n\t\t{\r\n\t\t}\r\n\r\n\t\t#region Methods\r\n"); - #line 226 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 224 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var method in definition.ActionMethods) { var allParameters = method.UrlParameters.AsEnumerable(); @@ -646,112 +644,112 @@ public void Dispose() #line hidden this.Write("\r\n\t\t/// \r\n\t\t/// "); - #line 304 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 302 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 306 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 304 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 307 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 305 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 308 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 306 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\tpublic virtual async Task "); - #line 309 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 307 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 309 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 307 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t{\r\n\t\t\tvar requestUrl = \""); - #line 311 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 309 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(requestUrl)); #line default #line hidden this.Write("\";\r\n\t\t\t"); - #line 312 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 310 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(hasQueryString){ #line default #line hidden this.Write("\r\n\t\t\t\tvar queryHasParamUrl = \""); - #line 314 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 312 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(queryHasParamUrl)); #line default #line hidden this.Write("\";\r\n\r\n\r\n\t\t\t\t"); - #line 317 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 315 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(!string.IsNullOrEmpty(queryNoParamUrlTpl)){ #line default #line hidden this.Write("\t\t\t\t\tvar queryNoParamUrlTpl = \""); - #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 316 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(queryNoParamUrlTpl)); #line default #line hidden this.Write("\";\r\n\t\t\t\t\tvar queryNoParamUrl = Generate"); - #line 319 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 317 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("QueryString(queryNoParamUrlTpl, "); - #line 319 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 317 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default #line hidden this.Write(");\r\n\t\t\t\t"); - #line 320 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" }else{ #line default #line hidden this.Write("\t\t\t\t\tvar queryNoParamUrl = string.Empty;\r\n\t\t\t\t"); - #line 322 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 320 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default @@ -760,69 +758,69 @@ public void Dispose() "questUrl + \"?\" + queryNoParamUrl;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\trequestUrl = req" + "uestUrl + \"?\" + queryHasParamUrl + \"&\" + queryNoParamUrl;\r\n\t\t\t\t}\r\n\r\n\t\t\t"); - #line 333 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 331 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n\t\t\t\treturn await HttpClient."); - #line 335 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 333 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Type.ToTitle())); #line default #line hidden - #line 335 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 333 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut ? "AsJson" : "")); #line default #line hidden this.Write("Async"); - #line 335 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 333 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut && method.BodyParameter != null ? "<" + method.BodyParameter.Type + ">" : "")); #line default #line hidden this.Write("(requestUrl "); - #line 335 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 333 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut ? bodyParameterString:"")); #line default #line hidden this.Write(").ConfigureAwait(false);\r\n\t\t}\r\n\r\n\t\t"); - #line 338 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 336 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(hasQueryString && !string.IsNullOrEmpty(queryNoParamUrlTpl)){ #line default #line hidden this.Write("\t\t\t\t\r\n\t\t\tpublic virtual string Generate"); - #line 340 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 338 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("QueryString(string urlQueryString, "); - #line 340 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 338 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t\t{\r\n\t\t\t\tvar kvList = Generate"); - #line 342 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 340 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("KeyValueList( "); - #line 342 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 340 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default @@ -831,126 +829,126 @@ public void Dispose() "\t return urlTpl;\r\n\t\t\t}\r\n\r\n\t\t\tpublic virtual List" + "> Generate"); - #line 348 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 346 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("KeyValueList("); - #line 348 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 346 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t\t{\r\n\t\t\t\tthrow new NotImplementedException();\r\n\t\t\t}\r\n\r\n\r\n\t\t"); - #line 354 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 352 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n\r\n\t\t/// \r\n\t\t/// "); - #line 358 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 356 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 360 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 358 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 361 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 359 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 362 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 360 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\tpublic virtual "); - #line 363 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 361 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(String.IsNullOrEmpty(method.ReturnType) ? "void" : method.ReturnType)); #line default #line hidden this.Write(" "); - #line 363 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 361 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("("); - #line 363 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 361 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t{\r\n\t\t\tvar result = "); - #line 365 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 363 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 365 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 363 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default #line hidden this.Write(").Result;\t\t \r\n\t\t\t \r\n\t\t\tEnsureSuccess(result);\r\n\t\t\t\t \r\n\t\t\t"); - #line 369 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 367 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(!String.IsNullOrEmpty(method.ReturnType) && method.ReturnType != "void" ) { #line default #line hidden this.Write("\t\t\t \t\t\t \r\n\t\t\treturn result.Content.ReadAsAsync<"); - #line 370 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 368 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.ReturnType)); #line default #line hidden this.Write(">().Result;\r\n\t\t\t"); - #line 371 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 369 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t}\r\n\r\n"); - #line 374 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 372 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t#endregion\r\n\t}\r\n"); - #line 377 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 375 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt index 17b77b3..eb5925c 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt @@ -17,7 +17,6 @@ using System.Net.Http.Formatting; using System.Linq; using System.Net; using System.Web; -using Newtonsoft.Json; using <#= Configuration.Namespace#>.Models; #region Proxies @@ -195,8 +194,7 @@ namespace <#= Configuration.Namespace#>.Clients var queryValue = string.Empty; if (item.Value != null) { - var queryValueJson = JsonConvert.SerializeObject(item.Value); - queryValue = Uri.EscapeDataString(queryValueJson); + queryValue = Uri.EscapeDataString(item.Value); } return queryKey + "=" + queryValue; })); From 0423560c4dd9e4afc99220df651c8a7ab26d97d9 Mon Sep 17 00:00:00 2001 From: $+j Date: Fri, 7 Aug 2015 15:42:55 +0800 Subject: [PATCH 13/45] tostring --- WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs | 2 +- WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs index 2fb4255..2f6c614 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs @@ -491,7 +491,7 @@ public virtual string GenerateQueryStrFromKvList(List.Clients var queryValue = string.Empty; if (item.Value != null) { - queryValue = Uri.EscapeDataString(item.Value); + queryValue = Uri.EscapeDataString(item.Value.ToString()); } return queryKey + "=" + queryValue; })); From 753ff1bfaaba6a57318d6a35f0d9cda4ac36e83e Mon Sep 17 00:00:00 2001 From: $+j Date: Fri, 7 Aug 2015 16:27:44 +0800 Subject: [PATCH 14/45] update json and convert --- .../Templates/CSharpProxyTemplate.cs | 167 ++++++++---------- .../Templates/CSharpProxyTemplate.tt | 24 ++- 2 files changed, 95 insertions(+), 96 deletions(-) diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs index 2f6c614..2deaa74 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs @@ -42,6 +42,7 @@ public virtual string TransformText() using System.Linq; using System.Net; using System.Web; +using Newtonsoft.Json; using "); #line 20 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" @@ -470,99 +471,81 @@ protected ClientBase() #line default #line hidden - this.Write(@"BaseAddress) - }; - } - - public virtual void EnsureSuccess(HttpResponseMessage response) - { - if (response.IsSuccessStatusCode) - return; - - throw new WebApiProxyResponseException(response); - } - - public virtual string GenerateQueryStrFromKvList(List> kvList) - { - var urlTpl = string.Join(""&"", - kvList.Select(item => - { - var queryKey = Uri.EscapeDataString(item.Key); - var queryValue = string.Empty; - if (item.Value != null) - { - queryValue = Uri.EscapeDataString(item.Value.ToString()); - } - return queryKey + ""="" + queryValue; - })); - return urlTpl; - } - - /// - /// Releases the unmanaged resources and disposes of the managed resources. - /// - public void Dispose() - { - HttpClient.Dispose(); - } - } - -"); - - #line 213 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + this.Write("BaseAddress)\r\n\t\t\t};\r\n\r\n\t\t\tSerializationSettings = new JsonSerializerSettings\r\n " + + " {\r\n NullValueHandling = NullValueHandling.Ignore,\r\n " + + " ReferenceLoopHandling = ReferenceLoopHandling.Serialize,\r\n " + + " };\r\n\t\t}\r\n\r\n public JsonSerializerSettings SerializationSettings;\n\r\n\t\tpub" + + "lic virtual void EnsureSuccess(HttpResponseMessage response)\r\n\t\t{\t\t\t\r\n\t\t\tif (res" + + "ponse.IsSuccessStatusCode)\t\t\t\t\r\n\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n throw ne" + + "w WebApiProxyResponseException(response);\r\n\t\t}\r\n\r\n\t\tpublic virtual string Genera" + + "teQueryStrFromKvList(List> kvList)\r\n\t {\r\n " + + " var urlTpl = string.Join(\"&\",\r\n kvList.Select(i" + + "tem =>\r\n {\r\n var que" + + "ryKey = Uri.EscapeDataString(item.Key);\r\n var qu" + + "eryValue = string.Empty;\r\n\r\n\t\t\t\t\t\t\t\tif (item.Value is string)\n\t\t\t\t\t\t\t\t{\n " + + " queryValue = Uri.EscapeDataString(item.Value);\r\n\t\t\t\t" + + "\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvar queryValueJson = JsonConvert.Serialize" + + "Object(item.Value).Trim(\'\"\');\r\n queryValue = " + + "Uri.EscapeDataString(queryValueJson);\r\n\t\t\t\t\t\t\t\t}\r\n\r\n " + + " return queryKey + \"=\" + queryValue;\r\n }));\r\n\t " + + " return urlTpl;\r\n\t }\r\n\r\n\t\t/// \r\n\t\t/// Releases the unmanaged re" + + "sources and disposes of the managed resources. \r\n\t\t/// \r\n\t\tpubli" + + "c void Dispose()\r\n\t\t{\r\n\t\t\tHttpClient.Dispose();\r\n\t\t}\r\n\t}\r\n\r\n"); + + #line 222 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var definition in Configuration.Metadata.Definitions) { #line default #line hidden this.Write("\t/// \r\n\t/// "); - #line 215 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 224 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t/// \r\n\tpublic partial class "); - #line 217 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 226 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 217 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 226 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write(" : ClientBase, Interfaces.I"); - #line 217 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 226 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 217 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 226 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write("\r\n\t{\t\t\r\n\t\tpublic "); - #line 219 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 228 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 219 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 228 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write("() : base()\r\n\t\t{\r\n\t\t}\r\n\r\n\t\t#region Methods\r\n"); - #line 224 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 233 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var method in definition.ActionMethods) { var allParameters = method.UrlParameters.AsEnumerable(); @@ -644,112 +627,112 @@ public void Dispose() #line hidden this.Write("\r\n\t\t/// \r\n\t\t/// "); - #line 302 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 311 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 304 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 313 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 305 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 314 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 306 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 315 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\tpublic virtual async Task "); - #line 307 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 316 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 307 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 316 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t{\r\n\t\t\tvar requestUrl = \""); - #line 309 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(requestUrl)); #line default #line hidden this.Write("\";\r\n\t\t\t"); - #line 310 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 319 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(hasQueryString){ #line default #line hidden this.Write("\r\n\t\t\t\tvar queryHasParamUrl = \""); - #line 312 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 321 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(queryHasParamUrl)); #line default #line hidden this.Write("\";\r\n\r\n\r\n\t\t\t\t"); - #line 315 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 324 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(!string.IsNullOrEmpty(queryNoParamUrlTpl)){ #line default #line hidden this.Write("\t\t\t\t\tvar queryNoParamUrlTpl = \""); - #line 316 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 325 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(queryNoParamUrlTpl)); #line default #line hidden this.Write("\";\r\n\t\t\t\t\tvar queryNoParamUrl = Generate"); - #line 317 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 326 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("QueryString(queryNoParamUrlTpl, "); - #line 317 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 326 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default #line hidden this.Write(");\r\n\t\t\t\t"); - #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 327 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" }else{ #line default #line hidden this.Write("\t\t\t\t\tvar queryNoParamUrl = string.Empty;\r\n\t\t\t\t"); - #line 320 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 329 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default @@ -758,69 +741,69 @@ public void Dispose() "questUrl + \"?\" + queryNoParamUrl;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\trequestUrl = req" + "uestUrl + \"?\" + queryHasParamUrl + \"&\" + queryNoParamUrl;\r\n\t\t\t\t}\r\n\r\n\t\t\t"); - #line 331 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 340 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n\t\t\t\treturn await HttpClient."); - #line 333 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 342 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Type.ToTitle())); #line default #line hidden - #line 333 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 342 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut ? "AsJson" : "")); #line default #line hidden this.Write("Async"); - #line 333 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 342 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut && method.BodyParameter != null ? "<" + method.BodyParameter.Type + ">" : "")); #line default #line hidden this.Write("(requestUrl "); - #line 333 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 342 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut ? bodyParameterString:"")); #line default #line hidden this.Write(").ConfigureAwait(false);\r\n\t\t}\r\n\r\n\t\t"); - #line 336 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 345 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(hasQueryString && !string.IsNullOrEmpty(queryNoParamUrlTpl)){ #line default #line hidden this.Write("\t\t\t\t\r\n\t\t\tpublic virtual string Generate"); - #line 338 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 347 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("QueryString(string urlQueryString, "); - #line 338 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 347 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t\t{\r\n\t\t\t\tvar kvList = Generate"); - #line 340 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 349 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("KeyValueList( "); - #line 340 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 349 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default @@ -829,126 +812,126 @@ public void Dispose() "\t return urlTpl;\r\n\t\t\t}\r\n\r\n\t\t\tpublic virtual List" + "> Generate"); - #line 346 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 355 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("KeyValueList("); - #line 346 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 355 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t\t{\r\n\t\t\t\tthrow new NotImplementedException();\r\n\t\t\t}\r\n\r\n\r\n\t\t"); - #line 352 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 361 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n\r\n\t\t/// \r\n\t\t/// "); - #line 356 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 365 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 358 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 367 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 359 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 368 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 360 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 369 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\tpublic virtual "); - #line 361 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 370 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(String.IsNullOrEmpty(method.ReturnType) ? "void" : method.ReturnType)); #line default #line hidden this.Write(" "); - #line 361 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 370 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("("); - #line 361 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 370 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t{\r\n\t\t\tvar result = "); - #line 363 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 372 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 363 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 372 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default #line hidden this.Write(").Result;\t\t \r\n\t\t\t \r\n\t\t\tEnsureSuccess(result);\r\n\t\t\t\t \r\n\t\t\t"); - #line 367 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 376 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(!String.IsNullOrEmpty(method.ReturnType) && method.ReturnType != "void" ) { #line default #line hidden this.Write("\t\t\t \t\t\t \r\n\t\t\treturn result.Content.ReadAsAsync<"); - #line 368 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 377 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.ReturnType)); #line default #line hidden this.Write(">().Result;\r\n\t\t\t"); - #line 369 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 378 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t}\r\n\r\n"); - #line 372 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 381 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t#endregion\r\n\t}\r\n"); - #line 375 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 384 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt index f02f74c..5143460 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt @@ -17,6 +17,7 @@ using System.Net.Http.Formatting; using System.Linq; using System.Net; using System.Web; +using Newtonsoft.Json; using <#= Configuration.Namespace#>.Models; #region Proxies @@ -175,8 +176,16 @@ namespace <#= Configuration.Namespace#>.Clients { BaseAddress = new Uri(Configuration.<#= Configuration.Name #>BaseAddress) }; + + SerializationSettings = new JsonSerializerSettings + { + NullValueHandling = NullValueHandling.Ignore, + ReferenceLoopHandling = ReferenceLoopHandling.Serialize, + }; } + public JsonSerializerSettings SerializationSettings; + public virtual void EnsureSuccess(HttpResponseMessage response) { if (response.IsSuccessStatusCode) @@ -192,10 +201,17 @@ namespace <#= Configuration.Namespace#>.Clients { var queryKey = Uri.EscapeDataString(item.Key); var queryValue = string.Empty; - if (item.Value != null) - { - queryValue = Uri.EscapeDataString(item.Value.ToString()); - } + + if (item.Value is string) + { + queryValue = Uri.EscapeDataString(item.Value); + } + else + { + var queryValueJson = JsonConvert.SerializeObject(item.Value).Trim('"'); + queryValue = Uri.EscapeDataString(queryValueJson); + } + return queryKey + "=" + queryValue; })); return urlTpl; From 5d6023ef69f96410530fb29fc5d6ff8c65de038b Mon Sep 17 00:00:00 2001 From: $+j Date: Fri, 7 Aug 2015 16:32:33 +0800 Subject: [PATCH 15/45] type convert --- .../Templates/CSharpProxyTemplate.cs | 250 +++++++++--------- .../Templates/CSharpProxyTemplate.tt | 16 +- 2 files changed, 133 insertions(+), 133 deletions(-) diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs index 2deaa74..36ac950 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs @@ -42,17 +42,17 @@ public virtual string TransformText() using System.Linq; using System.Net; using System.Web; -using Newtonsoft.Json; +using Newtonsoft.Json; using "); - #line 20 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 21 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Namespace)); #line default #line hidden this.Write(".Models;\r\n\r\n#region Proxies\r\nnamespace "); - #line 23 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 24 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Namespace)); #line default @@ -61,21 +61,21 @@ public virtual string TransformText() " class Configuration\r\n\t{\r\n\t\t/// \r\n\t\t/// Web Api Base Address.\r\n\t\t/// \r\n\t\tpublic static string "); - #line 33 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 34 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Name)); #line default #line hidden this.Write("BaseAddress = \""); - #line 33 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 34 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Metadata.Host)); #line default #line hidden this.Write("\";\r\n\t\t\r\n\t}\r\n}\r\n#endregion\r\n\r\n#region Models\r\nnamespace "); - #line 40 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 41 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Namespace)); #line default @@ -98,175 +98,175 @@ public WebApiProxyResponseException(HttpResponseMessage response): base(""A "" + "); - #line 56 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 57 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var model in Configuration.Metadata.Models.Where(m => m.Type.Equals("class"))) { #line default #line hidden this.Write("\t\r\n\t/// \r\n\t/// "); - #line 58 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 59 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(model.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t/// \r\n\tpublic partial class "); - #line 60 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 61 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(model.Name)); #line default #line hidden this.Write("\r\n\t{\r\n\t\t#region Constants\r\n"); - #line 63 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 64 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var constantItem in model.Constants) { #line default #line hidden this.Write("\t\t/// \r\n\t\t/// "); - #line 65 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 66 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t\t/// \r\n\t\tpublic const "); - #line 67 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 68 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Type)); #line default #line hidden this.Write(" "); - #line 67 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 68 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Name)); #line default #line hidden this.Write(" = "); - #line 67 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 68 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Value)); #line default #line hidden this.Write(";\r\n"); - #line 68 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 69 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t#endregion\r\n\r\n\t\t#region Properties\r\n"); - #line 72 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 73 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var propertyItem in model.Properties) { #line default #line hidden this.Write("\t\t/// \r\n\t\t/// "); - #line 74 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 75 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(propertyItem.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t\t/// \r\n\t\tpublic virtual "); - #line 76 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 77 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(propertyItem.Type)); #line default #line hidden this.Write(" "); - #line 76 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 77 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(propertyItem.Name)); #line default #line hidden this.Write(" { get; set; }\r\n"); - #line 77 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 78 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t#endregion\r\n\t}\t\r\n"); - #line 80 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 81 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n"); - #line 82 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 83 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var model in Configuration.Metadata.Models.Where(m => m.Type.Equals("enum"))) { #line default #line hidden this.Write("\t\r\n\t/// \r\n\t/// "); - #line 84 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 85 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(model.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t/// \r\n\tpublic enum "); - #line 86 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 87 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(model.Name)); #line default #line hidden this.Write("\r\n\t{\r\n"); - #line 88 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 89 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var constantItem in model.Constants) { #line default #line hidden this.Write("\r\n\t\t/// \r\n\t\t/// "); - #line 91 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 92 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t\t/// \r\n\t\t"); - #line 93 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 94 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Name)); #line default #line hidden this.Write(" = "); - #line 93 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 94 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(constantItem.Value)); #line default #line hidden this.Write(",\r\n"); - #line 94 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 95 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t\r\n\t}\r\n"); - #line 96 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 97 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\r\n}\r\n#endregion\r\n\r\n#region Interfaces\r\nnamespace "); - #line 102 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 103 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Namespace)); #line default @@ -274,27 +274,27 @@ public WebApiProxyResponseException(HttpResponseMessage response): base(""A "" + this.Write(".Interfaces\r\n{\r\n\tpublic interface IClientBase : IDisposable\r\n\t{\r\n\t\tHttpClient Htt" + "pClient { get; }\r\n\t}\r\n\r\n"); - #line 109 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 110 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var definition in Configuration.Metadata.Definitions) { #line default #line hidden this.Write("\t\r\n\tpublic partial interface I"); - #line 110 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 111 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 110 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 111 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write(" : IClientBase\r\n\t{\t\r\n"); - #line 112 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 113 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var method in definition.ActionMethods) { var allParameters = method.UrlParameters.AsEnumerable().Where(m => m != null); @@ -321,126 +321,126 @@ public WebApiProxyResponseException(HttpResponseMessage response): base(""A "" + #line hidden this.Write("\r\n\t\t/// \r\n\t\t/// "); - #line 135 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 136 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 137 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 138 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 138 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 139 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 139 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 140 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\tTask "); - #line 140 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 141 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 140 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 141 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(");\r\n\r\n\t\t/// \r\n\t\t/// "); - #line 143 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 144 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 145 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 146 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 146 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 147 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 147 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 148 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t"); - #line 148 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 149 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(String.IsNullOrEmpty(method.ReturnType) ? "void" : method.ReturnType)); #line default #line hidden this.Write(" "); - #line 148 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 149 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("("); - #line 148 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 149 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(");\r\n"); - #line 149 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 150 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t\t\t\r\n\t}\r\n"); - #line 151 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 152 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n}\r\n#endregion\r\n\r\n#region Clients\r\nnamespace "); - #line 157 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 158 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Namespace)); #line default @@ -466,7 +466,7 @@ protected ClientBase() { BaseAddress = new Uri(Configuration."); - #line 176 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 177 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.Name)); #line default @@ -474,78 +474,78 @@ protected ClientBase() this.Write("BaseAddress)\r\n\t\t\t};\r\n\r\n\t\t\tSerializationSettings = new JsonSerializerSettings\r\n " + " {\r\n NullValueHandling = NullValueHandling.Ignore,\r\n " + " ReferenceLoopHandling = ReferenceLoopHandling.Serialize,\r\n " + - " };\r\n\t\t}\r\n\r\n public JsonSerializerSettings SerializationSettings;\n\r\n\t\tpub" + - "lic virtual void EnsureSuccess(HttpResponseMessage response)\r\n\t\t{\t\t\t\r\n\t\t\tif (res" + - "ponse.IsSuccessStatusCode)\t\t\t\t\r\n\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n throw ne" + - "w WebApiProxyResponseException(response);\r\n\t\t}\r\n\r\n\t\tpublic virtual string Genera" + - "teQueryStrFromKvList(List> kvList)\r\n\t {\r\n " + - " var urlTpl = string.Join(\"&\",\r\n kvList.Select(i" + - "tem =>\r\n {\r\n var que" + - "ryKey = Uri.EscapeDataString(item.Key);\r\n var qu" + - "eryValue = string.Empty;\r\n\r\n\t\t\t\t\t\t\t\tif (item.Value is string)\n\t\t\t\t\t\t\t\t{\n " + - " queryValue = Uri.EscapeDataString(item.Value);\r\n\t\t\t\t" + - "\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvar queryValueJson = JsonConvert.Serialize" + - "Object(item.Value).Trim(\'\"\');\r\n queryValue = " + - "Uri.EscapeDataString(queryValueJson);\r\n\t\t\t\t\t\t\t\t}\r\n\r\n " + - " return queryKey + \"=\" + queryValue;\r\n }));\r\n\t " + - " return urlTpl;\r\n\t }\r\n\r\n\t\t/// \r\n\t\t/// Releases the unmanaged re" + - "sources and disposes of the managed resources. \r\n\t\t/// \r\n\t\tpubli" + - "c void Dispose()\r\n\t\t{\r\n\t\t\tHttpClient.Dispose();\r\n\t\t}\r\n\t}\r\n\r\n"); - - #line 222 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + " };\r\n\t\t}\r\n\r\n public JsonSerializerSettings SerializationSettings;\r\n\r\n\t\tpu" + + "blic virtual void EnsureSuccess(HttpResponseMessage response)\r\n\t\t{\t\t\t\r\n\t\t\tif (re" + + "sponse.IsSuccessStatusCode)\t\t\t\t\r\n\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n throw n" + + "ew WebApiProxyResponseException(response);\r\n\t\t}\r\n\r\n\t\tpublic virtual string Gener" + + "ateQueryStrFromKvList(List> kvList)\r\n\t {\r\n " + + " var urlTpl = string.Join(\"&\",\r\n kvList.Select(" + + "item =>\r\n {\r\n var qu" + + "eryKey = Uri.EscapeDataString(item.Key);\r\n var q" + + "ueryValue = string.Empty;\r\n\r\n\t\t\t\t\t\t\t\tif (item.Value is string)\r\n\t\t\t\t\t\t\t\t{\r\n " + + " queryValue = Uri.EscapeDataString((string)item.Va" + + "lue);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tvar queryValueJson = JsonCon" + + "vert.SerializeObject(item.Value).Trim(\'\"\');\r\n " + + " queryValue = Uri.EscapeDataString(queryValueJson);\r\n\t\t\t\t\t\t\t\t}\r\n\r\n " + + " return queryKey + \"=\" + queryValue;\r\n " + + " }));\r\n\t return urlTpl;\r\n\t }\r\n\r\n\t\t/// \r\n\t\t/// Releases th" + + "e unmanaged resources and disposes of the managed resources. \r\n\t\t/// \r\n\t\tpublic void Dispose()\r\n\t\t{\r\n\t\t\tHttpClient.Dispose();\r\n\t\t}\r\n\t}\r\n\r\n"); + + #line 229 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var definition in Configuration.Metadata.Definitions) { #line default #line hidden this.Write("\t/// \r\n\t/// "); - #line 224 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 231 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t/// \r\n\tpublic partial class "); - #line 226 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 233 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 226 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 233 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write(" : ClientBase, Interfaces.I"); - #line 226 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 233 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 226 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 233 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write("\r\n\t{\t\t\r\n\t\tpublic "); - #line 228 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 235 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 228 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 235 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write("() : base()\r\n\t\t{\r\n\t\t}\r\n\r\n\t\t#region Methods\r\n"); - #line 233 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 240 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var method in definition.ActionMethods) { var allParameters = method.UrlParameters.AsEnumerable(); @@ -627,112 +627,112 @@ protected ClientBase() #line hidden this.Write("\r\n\t\t/// \r\n\t\t/// "); - #line 311 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 313 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 320 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 314 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 321 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 315 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 322 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\tpublic virtual async Task "); - #line 316 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 323 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 316 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 323 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t{\r\n\t\t\tvar requestUrl = \""); - #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 325 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(requestUrl)); #line default #line hidden this.Write("\";\r\n\t\t\t"); - #line 319 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 326 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(hasQueryString){ #line default #line hidden this.Write("\r\n\t\t\t\tvar queryHasParamUrl = \""); - #line 321 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 328 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(queryHasParamUrl)); #line default #line hidden this.Write("\";\r\n\r\n\r\n\t\t\t\t"); - #line 324 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 331 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(!string.IsNullOrEmpty(queryNoParamUrlTpl)){ #line default #line hidden this.Write("\t\t\t\t\tvar queryNoParamUrlTpl = \""); - #line 325 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 332 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(queryNoParamUrlTpl)); #line default #line hidden this.Write("\";\r\n\t\t\t\t\tvar queryNoParamUrl = Generate"); - #line 326 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 333 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("QueryString(queryNoParamUrlTpl, "); - #line 326 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 333 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default #line hidden this.Write(");\r\n\t\t\t\t"); - #line 327 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 334 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" }else{ #line default #line hidden this.Write("\t\t\t\t\tvar queryNoParamUrl = string.Empty;\r\n\t\t\t\t"); - #line 329 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 336 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default @@ -741,69 +741,69 @@ protected ClientBase() "questUrl + \"?\" + queryNoParamUrl;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\trequestUrl = req" + "uestUrl + \"?\" + queryHasParamUrl + \"&\" + queryNoParamUrl;\r\n\t\t\t\t}\r\n\r\n\t\t\t"); - #line 340 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 347 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n\t\t\t\treturn await HttpClient."); - #line 342 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 349 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Type.ToTitle())); #line default #line hidden - #line 342 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 349 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut ? "AsJson" : "")); #line default #line hidden this.Write("Async"); - #line 342 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 349 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut && method.BodyParameter != null ? "<" + method.BodyParameter.Type + ">" : "")); #line default #line hidden this.Write("(requestUrl "); - #line 342 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 349 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut ? bodyParameterString:"")); #line default #line hidden this.Write(").ConfigureAwait(false);\r\n\t\t}\r\n\r\n\t\t"); - #line 345 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 352 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(hasQueryString && !string.IsNullOrEmpty(queryNoParamUrlTpl)){ #line default #line hidden this.Write("\t\t\t\t\r\n\t\t\tpublic virtual string Generate"); - #line 347 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 354 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("QueryString(string urlQueryString, "); - #line 347 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 354 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t\t{\r\n\t\t\t\tvar kvList = Generate"); - #line 349 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 356 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("KeyValueList( "); - #line 349 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 356 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default @@ -812,126 +812,126 @@ protected ClientBase() "\t return urlTpl;\r\n\t\t\t}\r\n\r\n\t\t\tpublic virtual List" + "> Generate"); - #line 355 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 362 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("KeyValueList("); - #line 355 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 362 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t\t{\r\n\t\t\t\tthrow new NotImplementedException();\r\n\t\t\t}\r\n\r\n\r\n\t\t"); - #line 361 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 368 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n\r\n\t\t/// \r\n\t\t/// "); - #line 365 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 372 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 367 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 374 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 368 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 375 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 369 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 376 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\tpublic virtual "); - #line 370 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 377 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(String.IsNullOrEmpty(method.ReturnType) ? "void" : method.ReturnType)); #line default #line hidden this.Write(" "); - #line 370 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 377 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("("); - #line 370 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 377 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t{\r\n\t\t\tvar result = "); - #line 372 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 379 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 372 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 379 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default #line hidden this.Write(").Result;\t\t \r\n\t\t\t \r\n\t\t\tEnsureSuccess(result);\r\n\t\t\t\t \r\n\t\t\t"); - #line 376 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 383 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(!String.IsNullOrEmpty(method.ReturnType) && method.ReturnType != "void" ) { #line default #line hidden this.Write("\t\t\t \t\t\t \r\n\t\t\treturn result.Content.ReadAsAsync<"); - #line 377 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 384 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.ReturnType)); #line default #line hidden this.Write(">().Result;\r\n\t\t\t"); - #line 378 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 385 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t}\r\n\r\n"); - #line 381 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 388 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t#endregion\r\n\t}\r\n"); - #line 384 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 391 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt index 5143460..9acc5a9 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt @@ -17,7 +17,7 @@ using System.Net.Http.Formatting; using System.Linq; using System.Net; using System.Web; -using Newtonsoft.Json; +using Newtonsoft.Json; using <#= Configuration.Namespace#>.Models; #region Proxies @@ -184,7 +184,7 @@ namespace <#= Configuration.Namespace#>.Clients }; } - public JsonSerializerSettings SerializationSettings; + public JsonSerializerSettings SerializationSettings; public virtual void EnsureSuccess(HttpResponseMessage response) { @@ -202,12 +202,12 @@ namespace <#= Configuration.Namespace#>.Clients var queryKey = Uri.EscapeDataString(item.Key); var queryValue = string.Empty; - if (item.Value is string) - { - queryValue = Uri.EscapeDataString(item.Value); - } - else - { + if (item.Value is string) + { + queryValue = Uri.EscapeDataString((string)item.Value); + } + else + { var queryValueJson = JsonConvert.SerializeObject(item.Value).Trim('"'); queryValue = Uri.EscapeDataString(queryValueJson); } From 20ae02055fac9287c7179d64734bab562b678193 Mon Sep 17 00:00:00 2001 From: $+j Date: Fri, 7 Aug 2015 16:45:25 +0800 Subject: [PATCH 16/45] add serialize setting --- WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs | 13 +++++++------ WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs index 36ac950..a88967c 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs @@ -485,12 +485,13 @@ protected ClientBase() "ueryValue = string.Empty;\r\n\r\n\t\t\t\t\t\t\t\tif (item.Value is string)\r\n\t\t\t\t\t\t\t\t{\r\n " + " queryValue = Uri.EscapeDataString((string)item.Va" + "lue);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tvar queryValueJson = JsonCon" + - "vert.SerializeObject(item.Value).Trim(\'\"\');\r\n " + - " queryValue = Uri.EscapeDataString(queryValueJson);\r\n\t\t\t\t\t\t\t\t}\r\n\r\n " + - " return queryKey + \"=\" + queryValue;\r\n " + - " }));\r\n\t return urlTpl;\r\n\t }\r\n\r\n\t\t/// \r\n\t\t/// Releases th" + - "e unmanaged resources and disposes of the managed resources. \r\n\t\t/// \r\n\t\tpublic void Dispose()\r\n\t\t{\r\n\t\t\tHttpClient.Dispose();\r\n\t\t}\r\n\t}\r\n\r\n"); + "vert.SerializeObject(item.Value,SerializationSettings).Trim(\'\"\');\r\n " + + " queryValue = Uri.EscapeDataString(queryValueJson);\r\n\t\t\t\t\t" + + "\t\t\t}\r\n\r\n return queryKey + \"=\" + queryValue;\r\n " + + " }));\r\n\t return urlTpl;\r\n\t }\r\n\r\n\t\t/// \r\n\t\t/// Releases the unmanaged resources and disposes of the managed resource" + + "s. \r\n\t\t/// \r\n\t\tpublic void Dispose()\r\n\t\t{\r\n\t\t\tHttpClient.Dispose" + + "();\r\n\t\t}\r\n\t}\r\n\r\n"); #line 229 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var definition in Configuration.Metadata.Definitions) { diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt index 9acc5a9..d26ace3 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt @@ -208,7 +208,7 @@ namespace <#= Configuration.Namespace#>.Clients } else { - var queryValueJson = JsonConvert.SerializeObject(item.Value).Trim('"'); + var queryValueJson = JsonConvert.SerializeObject(item.Value,SerializationSettings).Trim('"'); queryValue = Uri.EscapeDataString(queryValueJson); } From 6fde9c9e5eca89c55eb6f16eec860bb96c071a67 Mon Sep 17 00:00:00 2001 From: $+j Date: Fri, 7 Aug 2015 16:59:26 +0800 Subject: [PATCH 17/45] null check --- .../Templates/CSharpProxyTemplate.cs | 128 +++++++++--------- .../Templates/CSharpProxyTemplate.tt | 22 +-- 2 files changed, 76 insertions(+), 74 deletions(-) diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs index a88967c..77e891d 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.cs @@ -482,71 +482,71 @@ protected ClientBase() " var urlTpl = string.Join(\"&\",\r\n kvList.Select(" + "item =>\r\n {\r\n var qu" + "eryKey = Uri.EscapeDataString(item.Key);\r\n var q" + - "ueryValue = string.Empty;\r\n\r\n\t\t\t\t\t\t\t\tif (item.Value is string)\r\n\t\t\t\t\t\t\t\t{\r\n " + - " queryValue = Uri.EscapeDataString((string)item.Va" + - "lue);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tvar queryValueJson = JsonCon" + - "vert.SerializeObject(item.Value,SerializationSettings).Trim(\'\"\');\r\n " + - " queryValue = Uri.EscapeDataString(queryValueJson);\r\n\t\t\t\t\t" + - "\t\t\t}\r\n\r\n return queryKey + \"=\" + queryValue;\r\n " + - " }));\r\n\t return urlTpl;\r\n\t }\r\n\r\n\t\t/// \r\n\t\t/// Releases the unmanaged resources and disposes of the managed resource" + - "s. \r\n\t\t/// \r\n\t\tpublic void Dispose()\r\n\t\t{\r\n\t\t\tHttpClient.Dispose" + - "();\r\n\t\t}\r\n\t}\r\n\r\n"); - - #line 229 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + "ueryValue = string.Empty;\r\n\r\n\t\t\t\t\t\t\t\t if (item.Value != null)\r\n " + + " {\r\n\t\t\t\t\t\t\t\t\t\tif (item.Value is string)\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t" + + "\tqueryValue = Uri.EscapeDataString((string)item.Value);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t" + + "else\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tvar queryValueJson = JsonConvert.SerializeObject(i" + + "tem.Value,SerializationSettings).Trim(\'\"\');\r\n\t\t\t\t\t\t\t\t\t\t\tqueryValue = Uri.EscapeD" + + "ataString(queryValueJson);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t }\r\n " + + " return queryKey + \"=\" + queryValue;\r\n }));" + + "\r\n\t return urlTpl;\r\n\t }\r\n\r\n\t\t/// \r\n\t\t/// Releases the unmanag" + + "ed resources and disposes of the managed resources. \r\n\t\t/// \r\n\t\t" + + "public void Dispose()\r\n\t\t{\r\n\t\t\tHttpClient.Dispose();\r\n\t\t}\r\n\t}\r\n\r\n"); + + #line 231 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var definition in Configuration.Metadata.Definitions) { #line default #line hidden this.Write("\t/// \r\n\t/// "); - #line 231 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 233 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Description.ToSummary())); #line default #line hidden this.Write("\r\n\t/// \r\n\tpublic partial class "); - #line 233 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 235 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 233 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 235 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write(" : ClientBase, Interfaces.I"); - #line 233 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 235 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 233 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 235 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write("\r\n\t{\t\t\r\n\t\tpublic "); - #line 235 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 237 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(definition.Name)); #line default #line hidden - #line 235 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 237 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Configuration.ClientSuffix)); #line default #line hidden this.Write("() : base()\r\n\t\t{\r\n\t\t}\r\n\r\n\t\t#region Methods\r\n"); - #line 240 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 242 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var method in definition.ActionMethods) { var allParameters = method.UrlParameters.AsEnumerable(); @@ -628,112 +628,112 @@ protected ClientBase() #line hidden this.Write("\r\n\t\t/// \r\n\t\t/// "); - #line 318 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 320 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 320 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 322 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 321 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 323 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 322 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 324 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\tpublic virtual async Task "); - #line 323 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 325 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 323 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 325 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t{\r\n\t\t\tvar requestUrl = \""); - #line 325 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 327 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(requestUrl)); #line default #line hidden this.Write("\";\r\n\t\t\t"); - #line 326 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 328 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(hasQueryString){ #line default #line hidden this.Write("\r\n\t\t\t\tvar queryHasParamUrl = \""); - #line 328 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 330 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(queryHasParamUrl)); #line default #line hidden this.Write("\";\r\n\r\n\r\n\t\t\t\t"); - #line 331 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 333 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(!string.IsNullOrEmpty(queryNoParamUrlTpl)){ #line default #line hidden this.Write("\t\t\t\t\tvar queryNoParamUrlTpl = \""); - #line 332 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 334 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(queryNoParamUrlTpl)); #line default #line hidden this.Write("\";\r\n\t\t\t\t\tvar queryNoParamUrl = Generate"); - #line 333 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 335 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("QueryString(queryNoParamUrlTpl, "); - #line 333 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 335 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default #line hidden this.Write(");\r\n\t\t\t\t"); - #line 334 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 336 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" }else{ #line default #line hidden this.Write("\t\t\t\t\tvar queryNoParamUrl = string.Empty;\r\n\t\t\t\t"); - #line 336 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 338 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default @@ -742,69 +742,69 @@ protected ClientBase() "questUrl + \"?\" + queryNoParamUrl;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\trequestUrl = req" + "uestUrl + \"?\" + queryHasParamUrl + \"&\" + queryNoParamUrl;\r\n\t\t\t\t}\r\n\r\n\t\t\t"); - #line 347 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 349 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n\t\t\t\treturn await HttpClient."); - #line 349 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 351 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Type.ToTitle())); #line default #line hidden - #line 349 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 351 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut ? "AsJson" : "")); #line default #line hidden this.Write("Async"); - #line 349 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 351 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut && method.BodyParameter != null ? "<" + method.BodyParameter.Type + ">" : "")); #line default #line hidden this.Write("(requestUrl "); - #line 349 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 351 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(postOrPut ? bodyParameterString:"")); #line default #line hidden this.Write(").ConfigureAwait(false);\r\n\t\t}\r\n\r\n\t\t"); - #line 352 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 354 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(hasQueryString && !string.IsNullOrEmpty(queryNoParamUrlTpl)){ #line default #line hidden this.Write("\t\t\t\t\r\n\t\t\tpublic virtual string Generate"); - #line 354 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 356 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("QueryString(string urlQueryString, "); - #line 354 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 356 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t\t{\r\n\t\t\t\tvar kvList = Generate"); - #line 356 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 358 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("KeyValueList( "); - #line 356 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 358 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default @@ -813,126 +813,126 @@ protected ClientBase() "\t return urlTpl;\r\n\t\t\t}\r\n\r\n\t\t\tpublic virtual List" + "> Generate"); - #line 362 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 364 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("KeyValueList("); - #line 362 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 364 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t\t{\r\n\t\t\t\tthrow new NotImplementedException();\r\n\t\t\t}\r\n\r\n\r\n\t\t"); - #line 368 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 370 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\r\n\r\n\t\t/// \r\n\t\t/// "); - #line 372 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 374 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Description)); #line default #line hidden this.Write("\r\n\t\t/// \r\n"); - #line 374 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 376 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" foreach(var p in method.UrlParameters) { #line default #line hidden this.Write("\t\t/// "); - #line 375 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 377 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(p.Description)); #line default #line hidden this.Write("\r\n"); - #line 376 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 378 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\tpublic virtual "); - #line 377 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 379 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(String.IsNullOrEmpty(method.ReturnType) ? "void" : method.ReturnType)); #line default #line hidden this.Write(" "); - #line 377 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 379 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("("); - #line 377 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 379 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterList)); #line default #line hidden this.Write(")\r\n\t\t{\r\n\t\t\tvar result = "); - #line 379 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 381 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.Name)); #line default #line hidden this.Write("Async("); - #line 379 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 381 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(parameterNameList)); #line default #line hidden this.Write(").Result;\t\t \r\n\t\t\t \r\n\t\t\tEnsureSuccess(result);\r\n\t\t\t\t \r\n\t\t\t"); - #line 383 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 385 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" if(!String.IsNullOrEmpty(method.ReturnType) && method.ReturnType != "void" ) { #line default #line hidden this.Write("\t\t\t \t\t\t \r\n\t\t\treturn result.Content.ReadAsAsync<"); - #line 384 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 386 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" this.Write(this.ToStringHelper.ToStringWithCulture(method.ReturnType)); #line default #line hidden this.Write(">().Result;\r\n\t\t\t"); - #line 385 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 387 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t}\r\n\r\n"); - #line 388 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 390 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default #line hidden this.Write("\t\t#endregion\r\n\t}\r\n"); - #line 391 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" + #line 393 "E:\git\github\WebApiProxy\WebApiProxy.Tasks\Templates\CSharpProxyTemplate.tt" } #line default diff --git a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt index d26ace3..5150075 100644 --- a/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt +++ b/WebApiProxy.Tasks/Templates/CSharpProxyTemplate.tt @@ -202,16 +202,18 @@ namespace <#= Configuration.Namespace#>.Clients var queryKey = Uri.EscapeDataString(item.Key); var queryValue = string.Empty; - if (item.Value is string) - { - queryValue = Uri.EscapeDataString((string)item.Value); - } - else - { - var queryValueJson = JsonConvert.SerializeObject(item.Value,SerializationSettings).Trim('"'); - queryValue = Uri.EscapeDataString(queryValueJson); - } - + if (item.Value != null) + { + if (item.Value is string) + { + queryValue = Uri.EscapeDataString((string)item.Value); + } + else + { + var queryValueJson = JsonConvert.SerializeObject(item.Value,SerializationSettings).Trim('"'); + queryValue = Uri.EscapeDataString(queryValueJson); + } + } return queryKey + "=" + queryValue; })); return urlTpl; From d98d006d10ac2881a593a00ea8a75dd24e1c197d Mon Sep 17 00:00:00 2001 From: $+j Date: Tue, 11 Aug 2015 10:53:55 +0800 Subject: [PATCH 18/45] add readme --- README.org | 183 ++++++++++++++++++ .../api-key-in-uoko-nuget-site.jpg | Bin 0 -> 30039 bytes .../install-pkg-from-uoko.jpg | Bin 0 -> 53865 bytes .../nuget-package-source-in-vs.jpg | Bin 0 -> 70730 bytes img/web-api-uoko/api-client-usage-di.jpg | Bin 0 -> 53017 bytes img/web-api-uoko/api-client-usage.jpg | Bin 0 -> 61865 bytes img/web-api-uoko/api-response-type-assign.jpg | Bin 0 -> 70317 bytes 7 files changed, 183 insertions(+) create mode 100644 README.org create mode 100644 img/nuget-package-uoko/api-key-in-uoko-nuget-site.jpg create mode 100644 img/nuget-package-uoko/install-pkg-from-uoko.jpg create mode 100644 img/nuget-package-uoko/nuget-package-source-in-vs.jpg create mode 100644 img/web-api-uoko/api-client-usage-di.jpg create mode 100644 img/web-api-uoko/api-client-usage.jpg create mode 100644 img/web-api-uoko/api-response-type-assign.jpg diff --git a/README.org b/README.org new file mode 100644 index 0000000..89fa0be --- /dev/null +++ b/README.org @@ -0,0 +1,183 @@ +#+TITLE: web-api-uoko +#+DATE: <2015-08-07 Fri> +#+AUTHOR: $+j +#+EMAIL: lust4life.jun@gmail.com +#+OPTIONS: ':nil *:t -:t ::t <:t H:3 \n:nil ^:t arch:headline +#+OPTIONS: author:t c:nil creator:comment d:(not "LOGBOOK") date:t +#+OPTIONS: e:t email:nil f:t inline:t num:t p:nil pri:nil stat:t +#+OPTIONS: tags:t tasks:t tex:t timestamp:t toc:t todo:t |:t +#+CREATOR: Emacs 24.5.1 (Org mode 8.2.10) +#+DESCRIPTION: +#+EXCLUDE_TAGS: noexport +#+KEYWORDS: +#+LANGUAGE: zh +#+SELECT_TAGS: export + +* 使用 api proxy + +** 服务端配置 + +*** 从 nuget 安装包 + + 在api的站点层,引用包 : WebApiProxy(WebApi Proxy Provider) ,创建者为 Fanie Reynders 的这个. + +*** 注册 Endpoint + + 在 web api 配置类中注册 + + #+BEGIN_SRC csharp + config.RegisterProxyRoutes(); + #+END_SRC + +** 客户端配置 + +*** 安装包 + + 在需要用到 client 的地方,建立一个类库项目,作为这个 client 的寄宿.对这个类库项目引用 uoko nuget 上的 UOKO.ApiProxy.CSharp (WebApiProxy c# Proxy Client Generator). + + #+BEGIN_QUOTE + 为什么要单独建立一个类库项目? + + 因为目前这个 proxy client 的代码生成不支持多个 endpoint ,所以在需要调用 api 的项目中直接使用的话,没法做到多个 api 一起用.后期可以改改源码,支持多个 endpoint 的代码生成. + #+END_QUOTE + +*** config 和 使用 + + 安装成功以后,在项目中会出现一个 WebApiProxy 的文件夹.分别有一个代码生成类文件 以及 一个配置文件. + + #+BEGIN_SRC xml + + #+END_SRC + + 我们主要配置三个东西: + + - endpoint : 这个是你需要使用的 api 服务端地址 + - namespace : proxy 代码生成类的命名空间 + - generateOnBuild : 是否在 build 的时候,生成代码. 建议是按需调整.需要生成的时候置为 1 , 生成完成后修改为 0 + + 然后 build 这个解决方案, 相应的 proxy 代码即可生成了. + +** 细节处理 + + +*** 服务端相关 + + 大家都知道 web api Action 的返回类型支持就 4 种. + + + 1. void + 2. HttpResponseMessage + 3. IHttpActionResult + 4. Some other type + + 见: http://www.asp.net/web-api/overview/getting-started-with-aspnet-web-api/action-results + + 如果你的返回类型是 1, 4 那么不用修改什么. 如果你的返回类型是 2,3 两种的话,那么你需要告诉 Proxy 你请求成功时候真正的返回类型是什么类型.这样代码生成的时候才能生成相应的类.这时候在 Action 使用 [ResponseType(xxxType)] 即可.如下: + + [[./img/web-api-uoko/api-response-type-assign.jpg]] + +*** 客户端相关 + + 客户端生成的代码中有一类情况需要完善修改的.就是大家需要搜索生成代码中 =throw new NotImplementedException();= 的地方.需要对这些类进行继承以后重写实现这个方法. + + #+BEGIN_QUOTE + 什么时候回出现这类情况? + + 如果大家在服务端 Action 的参数中使用了复杂类型参数,并且请求是 Get 请求, 并且这个参数的绑定方式是 FromUri 的时候,那么生成的 Proxy 代码就会出现这类情况. + #+END_QUOTE + + 见如下代码: + + #+BEGIN_SRC csharp + /// + /// 获取部门分页列表 + /// + /// 查询实体类 + public virtual async Task GetAsync(DepartmentQuery query) + { + var requestUrl = "api/Department"; + + var queryHasParamUrl = ""; + + + var queryNoParamUrlTpl = "CompanyId={CompanyId}&DepLevel={DepLevel}&offset={offset}&pageSize={pageSize}&sortBy={sortBy}&sortType={sortType}"; + var queryNoParamUrl = GenerateGetQueryString(queryNoParamUrlTpl, query); + + if (string.IsNullOrEmpty(queryHasParamUrl)) + { + requestUrl = requestUrl + "?" + queryNoParamUrl; + } + else + { + requestUrl = requestUrl + "?" + queryHasParamUrl + "&" + queryNoParamUrl; + } + + + return await HttpClient.GetAsync(requestUrl ).ConfigureAwait(false); + } + + + public virtual string GenerateGetQueryString(string urlQueryString, DepartmentQuery query) + { + var kvList = GenerateGetKeyValueList( query ); + var urlTpl = GenerateQueryStrFromKvList(kvList); + + return urlTpl; + } + + public virtual List> GenerateGetKeyValueList(DepartmentQuery query) + { + throw new NotImplementedException(); + } + #+END_SRC + + 这类情况我们需要做的就是: + + #+BEGIN_SRC csharp + public class DepartmentClientIndeed : DepartmentClient + { + public override List> GenerateGetKeyValueList(DepartmentQuery query) + { + var kvList = new List>() + { + new KeyValuePair("CompanyId", query.CompanyId), + new KeyValuePair("DepLevel", query.DepLevel), + + new KeyValuePair("offset", query.offset), + new KeyValuePair("pageSize", query.pageSize), + new KeyValuePair("sortBy", query.sortBy), + new KeyValuePair("sortType", query.sortType), + }; + return kvList; + } + } + #+END_SRC + + 这里做的就是, 指定上面 url 中查询串的参数,都如何从 复杂对象 中获取. + + 因为 Proxy 代码是生成的, 所以这个新建的子类,应该是独立的类文件, 不会被生成覆盖的. + + +*** 使用 + + 到此,基本上就可以正常使用了. 因为会有子类的存在,所以我们最好不要直接在需要用 api 的地方, 创建具体的实体类. 这样不利于后期维护和修改调整.因为生成代码中已经生成了接口代码.所以最好是对接口进行依赖.然后通过大家喜欢的 DI 框架,注入到接口中进行使用.比如: + + [[./img/web-api-uoko/api-client-usage.jpg]] + + 如下是 DI 框架注入的, 箭头都是被重写过的类. + + [[./img/web-api-uoko/api-client-usage-di.jpg]] + + +* 关于 proxy + + 使用的是 https://github.com/faniereynders/WebApiProxy + + 该项目分两大部分,服务端 api 描述信息生成. 客户端代码根据描述信息,生成本地代理.我们只是把生成代理的代码做了一些定制化修改,方便我们自己使用.更多有意思的东西,可以直接看官方使用 wiki: https://github.com/faniereynders/WebApiProxy/wiki 或者源码进行了解. + + 有兴趣还可了解下来由: [[file:user-permission-refactor.org::*web%20api%20proxy/help%20page(api%20lifecycle)][web api proxy/help page(api lifecycle)]] diff --git a/img/nuget-package-uoko/api-key-in-uoko-nuget-site.jpg b/img/nuget-package-uoko/api-key-in-uoko-nuget-site.jpg new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uFo%7=EmWh+t^__K1#%81ooy-hVO$>_a`3@1Y+tbYXgbE zSC7RiWc;}*?$z0@W{O?r7NR{b3ZpzJIPP5{i zVTN2Yq^E>DxTN~RD-mpcEZOrxPs~|`z2F5o)p#?$SyjKTcCv~0>ChJWi^oY?#`qo; z2a++*O2U37nXXTo&R6^a(DZgetih1`b?{S@gnIyFq@WOY|KLU>b`9F)j>Tzzs8d$BXe;y zY|1zo3J(wq{sHvrkvOZkJ;r|d#c|X(jXQV6J^Xa`%!}$A1I6oc@iKQhMYejn9z0dl zwkU9v#rkrso!=)=@fcK;+9y%nA#rGcqIS1}1{{f(j@YIKXJv@}V!#!D^naPE|G4RwKG9ibqe_#? z1D>T)TnBeUPGjajqeJbV!Bz4|&WS(bzq=)1x2OX6&k)4d%l{cYg#X9qWKp6b(Sd&t RLyo_P@caKyM)7C%e*q~d>X85d literal 0 HcmV?d00001 diff --git a/img/nuget-package-uoko/install-pkg-from-uoko.jpg b/img/nuget-package-uoko/install-pkg-from-uoko.jpg new file mode 100644 index 0000000000000000000000000000000000000000..266049c80bc1586db76ad7f11eeb70a5780cbf33 GIT binary patch literal 53865 zcmeFZWmsKJvM{=Fhd^)-?(R+qo&?v81$TFspuq_c+}+(Z1ef6M?he5=cfWaO<|H$7 z-shZq?)T$<&)Lu{y4PCOUDZ|9W$--ryasq7BOxsTfPer1Ai!UM=S6@R03H?=4i*L; z4h{|h0Ui+<69pLw2^kOLB^o9XJ_#`qJ|Q6~1rs$X83Q>XAq_Vz0}Cq$2L}l?uOJVb z024b0+aEw65D*ZMk&tmwP;l8^5x!#kZ-1UU0qF3M>QEn{Ajkla=nzoo5YIgT67V`< zAbx%TfBQf{LP5j8!oedTB7q;MdjWuifP#XAhJt~Ch6X?F1-=h}Mu)+8#VQK>QsDy} znH?sZUrZJ}`Rl4KEXDCN3U+;ae*{Eq99%qnN-Am^S~?C+E^Z!PKCw6A5|UEVGD^xS zs%q*Qng)hO#wMm_<_?Zd&MvNQ?g1YIgMv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2{-L zTjfHA>3#pHHiDbydD9Cj5v$P;xsvVvwUofs$~$dT!yh}#CNrTpt6(<*YUSzJQYn@j z=p5YqnLWr0bgA$TU#h7~8L=RhyieO?IjUI_Rct}*h|Gl13ABnb?DU1XLnPuF;Lo&m zWh=M5U}8`+E#6=JY(c3G+YxgLMsH9ytHd9R=1-|KFGK6^QYs0jZhJ;HDJlVf>~xxJ z>sHam=*M8$UWgeZ-EBjHFmUcU*)tpz7*TN}8~k>Glr;qZ&@92xRWewLZeEw0Z2lbj zBV6YT&?t+X{X;rN9Ye$NO*956>oKNjReitM=htCU)78tCVYpM@P zllGiZJI-1$$|wP}7K7v{yF2QW91K3ndM4T-il!H!2+ZXV#4++uRLA4-)$BTME2v;= zrHxiK>YN@Z4|UzV0}023FgF_sYrTDlbfWfWg=X7STc`Xr4}bLSuoH)PH^Dt%S-7$&K2s8Rux$cTe{2 zBLgid5BL6S@C3{6zbECJf>s|Zv^x)qCx6X>707c0)C_q~9bB@jkzNCa2kxG&*o31r zac2G6Ccdg&UbbEXe95D~>8GvSMzpYK8 zi!W83qmnfFzi?%V`i&@D%{V^~LSC{vx~OAYp~|IdbxIr^VPAdIFDkf{{YqGruV&)T zO9bKGbG_y7ctY0q585MtbTa>6T%U@HqslYWn$_n;4+1w=MtC1U+n|e@)4zY!)lZp( z<9`oS;5FAP+M4C-Rhabpg6NM_G`Kyfn8`LCuOZM42bCk#Bkj3bDM9S`OO|CBd1}(F~ z0iFpGONh&CfiOSuH<%&Hl+=L(cyvrwV_5sN~T< vBlYK+`ZwHtxlfBnHp~Ll3XGYv!qH-j6k&#ik&|65-1%aIq#BQiu0Q?<1;99c literal 0 HcmV?d00001 diff --git a/img/nuget-package-uoko/nuget-package-source-in-vs.jpg b/img/nuget-package-uoko/nuget-package-source-in-vs.jpg new file mode 100644 index 0000000000000000000000000000000000000000..425895f71f87699f7def48a04250239b4708c8f7 GIT binary patch literal 70730 zcmeFZ1yo$kwl2DGhoFJr&;)mP3l=Pp;1Y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