From bbe48814b491795dc4c6d7bb284f0c2860a64ea1 Mon Sep 17 00:00:00 2001 From: Timothy Lusk Date: Tue, 15 Jul 2014 15:36:13 -0400 Subject: [PATCH] CSharp: Add optional api constructor argument to set the basePath --- src/main/resources/csharp/api.mustache | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/resources/csharp/api.mustache b/src/main/resources/csharp/api.mustache index 0984da329a..0b0f36e1c3 100644 --- a/src/main/resources/csharp/api.mustache +++ b/src/main/resources/csharp/api.mustache @@ -8,18 +8,23 @@ namespace {{package}} { {{#operations}} public class {{classname}} { - string basePath = "{{basePath}}"; + string basePath; private readonly ApiInvoker apiInvoker = ApiInvoker.GetInstance(); + public {{classname}}(String basePath = "{{basePath}}") + { + this.basePath = basePath; + } + public ApiInvoker getInvoker() { return apiInvoker; } - + // Sets the endpoint base url for the services being accessed public void setBasePath(string basePath) { this.basePath = basePath; } - + // Gets the endpoint base url for the services being accessed public String getBasePath() { return basePath;