Skip to content

Commit

Permalink
Replace Dictionary with IDictionary in ByKey method (dependent on the…
Browse files Browse the repository at this point in the history
… update to OData Client v7.6.3).
  • Loading branch information
Chebotov Nikolay committed Feb 21, 2020
1 parent a36b622 commit f544be0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@

These are the changes to each version that has been released on the official [Visual Studio extension gallery](https://marketplace.visualstudio.com/items?itemName=unchase.UnchaseODataConnectedService).

## v1.4.1 `(2020-02-21)`

- [x] Replace Dictionary with IDictionary in ByKey method
- [x] This fix is dependent on the update to OData Client v7.6.3 as done in this PR [OData/odata.net#1648](https://github.com/OData/odata.net/pull/1648)

## v1.4.0 `(2020-02-20)`

- [x] Add feature: allow making generated types internal to hide them outside the assembly
Expand Down
4 changes: 2 additions & 2 deletions src/Unchase.OData.ConnectedService/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.4.0.0")]
[assembly: AssemblyFileVersion("1.4.0.0")]
[assembly: AssemblyVersion("1.4.1.0")]
[assembly: AssemblyFileVersion("1.4.1.0")]
[assembly: NeutralResourcesLanguage("en")]

Original file line number Diff line number Diff line change
Expand Up @@ -5235,7 +5235,7 @@ internal override void WriteByKeyMethods(string entityTypeName, string returnTyp

this.Write(this.ToStringHelper.ToStringWithCulture(entityTypeName));

this.Write("> _source, global::System.Collections.Generic.Dictionary<string, object> keys)\r\n " +
this.Write("> _source, global::System.Collections.Generic.IDictionary<string, object> keys)\r\n " +
" {\r\n return new ");

this.Write(this.ToStringHelper.ToStringWithCulture(returnTypeName));
Expand Down Expand Up @@ -5282,7 +5282,7 @@ internal override void WriteByKeyMethods(string entityTypeName, string returnTyp

this.Write(this.ToStringHelper.ToStringWithCulture(keyParameters));

this.Write(")\r\n {\r\n global::System.Collections.Generic.Dictionary<string, o" +
this.Write(")\r\n {\r\n global::System.Collections.Generic.IDictionary<string, o" +
"bject> keys = new global::System.Collections.Generic.Dictionary<string, object>\r" +
"\n {\r\n ");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4351,7 +4351,7 @@ namespace <#= fullNamespace #>
/// </summary>
/// <param name="source">source entity set</param>
/// <param name="keys">dictionary with the names and values of keys</param>
public static <#= returnTypeName #> ByKey(this global::Microsoft.OData.Client.DataServiceQuery<<#= entityTypeName #>> source, global::System.Collections.Generic.Dictionary<string, object> keys)
public static <#= returnTypeName #> ByKey(this global::Microsoft.OData.Client.DataServiceQuery<<#= entityTypeName #>> source, global::System.Collections.Generic.IDictionary<string, object> keys)
{
return new <#= returnTypeName #>(source.Context, source.GetKeyPath(global::Microsoft.OData.Client.Serializer.GetKeyString(source.Context, keys)));
}
Expand All @@ -4370,7 +4370,7 @@ namespace <#= fullNamespace #>
public static <#= returnTypeName #> ByKey(this global::Microsoft.OData.Client.DataServiceQuery<<#= entityTypeName #>> source,
<#= keyParameters #>)
{
global::System.Collections.Generic.Dictionary<string, object> keys = new global::System.Collections.Generic.Dictionary<string, object>
global::System.Collections.Generic.Dictionary<string, object> keys = new global::System.Collections.Generic.IDictionary<string, object>
{
<#= keyDictionaryItems #>
};
Expand Down

0 comments on commit f544be0

Please sign in to comment.