[csharp] Options: useCollection, returnICollection

This change is inline with Microsoft's recommended guidelines for
collects
(https://msdn.microsoft.com/en-us/library/dn169389(v=vs.110).aspx).

Added generator options for csharp to:

* useCollection: Deserialize responses into and return Collection<T>
* returnICollection: For List<T> or Collection<T>, return ICollection<T>
  instead of the concrete type

As a consequence of useCollection, method imputs will also change to
Collection<T>.
This commit is contained in:
Jim Schubert
2016-01-23 16:22:26 -05:00
parent 421b70c259
commit 9dc40128ac
14 changed files with 94 additions and 3 deletions

View File

@@ -221,7 +221,7 @@ namespace SwaggerClientTest.TestPet
{
Assembly _assembly = Assembly.GetExecutingAssembly();
Stream _imageStream = _assembly.GetManifestResourceStream("SwaggerClientTest.swagger-logo.png");
PetApi petApi = new PetApi ();
PetApi petApi = new PetApi ();
// test file upload with form parameters
petApi.UploadFile(petId, "new form name", _imageStream);