Skip to content

Commit 6576d38

Browse files
committed
Template formatting
1 parent 61ad83d commit 6576d38

3 files changed

Lines changed: 13 additions & 14 deletions

File tree

src/DataverseProxyGenerator.Core/Templates/CustomApiRequest.scriban-cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
public partial class {{ sanitized_unique_name }}Request : Microsoft.Xrm.Sdk.OrganizationRequest
66
{
77
{{~ for param in request_parameters ~}}
8-
8+
99
{{ param.xml_doc_comment }}
1010
public {{ param.csharp_type }}{{ if param.is_optional }}?{{ end }} {{ param.name }}
1111
{
@@ -26,7 +26,7 @@ public partial class {{ sanitized_unique_name }}Request : Microsoft.Xrm.Sdk.Orga
2626
}
2727
}
2828
{{~ end ~}}
29-
29+
3030
public {{ sanitized_unique_name }}Request()
3131
{
3232
this.RequestName = "{{ unique_name }}";

src/DataverseProxyGenerator.Core/Templates/CustomApiResponse.scriban-cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
[System.CodeDom.Compiler.GeneratedCodeAttribute("DataverseProxyGenerator", "{{ version }}")]
55
public partial class {{ sanitized_unique_name }}Response : Microsoft.Xrm.Sdk.OrganizationResponse
66
{
7-
7+
88
public {{ sanitized_unique_name }}Response()
99
{
1010
}
11-
11+
1212
{{~ for prop in response_properties ~}}
1313
{{ prop.xml_doc_comment }}
1414
public {{ prop.csharp_type }} {{ prop.name }}

src/DataverseProxyGenerator.Core/Templates/SingleFile.scriban-cs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,7 @@ public partial class {{table.SchemaName}} : ExtendedEntity{{ if table.Interfaces
178178
{{~ end ~}}
179179
{{~ end ~}}
180180
}
181-
182-
{{ end }}
181+
{{~ end ~}}
183182

184183
// ============================================================================
185184
// INTERSECTION INTERFACES
@@ -207,8 +206,7 @@ public interface {{interface.Name}}
207206
{{~ end ~}}
208207
{{~ end ~}}
209208
}
210-
211-
{{ end }}
209+
{{~ end ~}}
212210

213211
// ============================================================================
214212
// ENUM OPTION SETS
@@ -217,7 +215,9 @@ public interface {{interface.Name}}
217215
{{~ for optionset in optionsets | array.sort "Name" ~}}
218216
[System.CodeDom.Compiler.GeneratedCode("DataverseProxyGenerator", "{{version}}")]
219217
[DataContract]
220-
public enum {{optionset.Name | string.capitalize}}
218+
#pragma warning disable CS8981
219+
public enum {{optionsetName}}
220+
#pragma warning restore CS8981
221221
{
222222
{{~ for pair in optionset.Values | array.sort "Value" ~}}
223223
[EnumMember]
@@ -227,8 +227,7 @@ public enum {{optionset.Name | string.capitalize}}
227227
{{ pair.Name }} = {{ pair.Value }},
228228
{{~ end ~}}
229229
}
230-
231-
{{ end }}
230+
{{~ end ~}}
232231

233232
// ============================================================================
234233
// ATTRIBUTE CLASSES
@@ -519,11 +518,11 @@ public class {{serviceContextName}} : OrganizationServiceContext
519518
: base(service)
520519
{
521520
}
522-
523521
{{~ for table in tables | array.sort "SchemaName" ~}}
522+
524523
public IQueryable<{{ table.SchemaName }}> {{ table.SchemaName }}Set
525524
{
526525
get { return CreateQuery<{{ table.SchemaName }}>(); }
527526
}
528-
{{ end }}
529-
}
527+
{{~ end ~}}
528+
}

0 commit comments

Comments
 (0)