Skip to content

Commit 4e8e0ee

Browse files
author
Robert Anderson
committed
Tweaks from code review (Gina).
1 parent 2f94c54 commit 4e8e0ee

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Templates/CSharp/Requests/MethodRequestBuilder.cs.tt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ namespace Microsoft.Graph
6060
using System.IO;
6161

6262
/// <summary>
63-
/// The type DriveItemDeltaRequestBuilder.
63+
/// The type <#=requestBuilderType#>.
6464
/// </summary>
6565
public partial class <#=requestBuilderType#> : Base<#=methodType#>MethodRequestBuilder<I<#=requestType#>>, I<#=requestBuilderType#>
6666
{
@@ -82,7 +82,7 @@ foreach (var m in methods)
8282
foreach (var p in m.Parameters)
8383
{
8484
#>
85-
SetParameter("<#=p.Name#>", <#=p.ParameterName#>, <#=p.IsNullable.ToString().ToLowerInvariant()#>);
85+
this.SetParameter("<#=p.Name#>", <#=p.ParameterName#>, <#=p.IsNullable.ToString().ToLowerInvariant()#>);
8686
<#
8787
}
8888
#>
@@ -109,8 +109,10 @@ foreach (var m in methods)
109109
foreach (var p in m.Parameters)
110110
{
111111
#>
112-
if (HasParameter("<#=p.Name#>"))
113-
request.RequestBody.<#=p.PropertyName#> = GetParameter<<#=p.Type#>>("<#=p.Name#>");
112+
if (this.HasParameter("<#=p.Name#>"))
113+
{
114+
request.RequestBody.<#=p.PropertyName#> = this.GetParameter<<#=p.Type#>>("<#=p.Name#>");
115+
}
114116

115117
<#
116118
}

src/GraphODataTemplateWriter/Extensions/OdcmModelExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private static OdcmNamespace GetOdcmNamespace(OdcmModel model)
4242
public static IEnumerable<OdcmClass> GetComplexTypes(this OdcmModel model)
4343
{
4444
var @namespace = GetOdcmNamespace(model);
45-
return @namespace.Classes.Where(x => x is OdcmComplexClass && x.CanonicalName() != "microsoft.graph.Json");
45+
return @namespace.Classes.Where(x => x is OdcmComplexClass && x.CanonicalName().ToLowerInvariant() != "microsoft.graph.json");
4646
}
4747

4848
public static IEnumerable<OdcmClass> GetEntityTypes(this OdcmModel model)

0 commit comments

Comments
 (0)