Merge pull request #879 from shoatman/master

Updates to csharp model template to support inheritance
This commit is contained in:
Tony Tam 2015-06-17 08:30:07 -07:00
commit e39ec927a2

View File

@ -13,7 +13,7 @@ namespace {{package}} {
/// {{description}}
/// </summary>
[DataContract]
public class {{classname}} {
public class {{classname}}{{#parent}} : {{{parent}}}{{/parent}} {
{{#vars}}
{{#description}}/* {{{description}}} */{{/description}}
[DataMember(Name="{{baseName}}", EmitDefaultValue=false)]
@ -39,11 +39,11 @@ namespace {{package}} {
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
public {{#parent}} new {{/parent}}string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
{{/model}}
{{/models}}
}
}