Skip to content

Commit 7363f17

Browse files
authored
Merge pull request #187 from hwoodiwiss/hwoodiwiss-fix-missing-annotation
Add missing DynamicallyAccessedMembers annotation
2 parents f3fece1 + aac3286 commit 7363f17

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.7.9] - 2024-02-05
11+
12+
### Changed
13+
14+
- Added `DynamicallyAccessedMembers` annotation to `RequestInformation.Configure`.
15+
- Fixes `IsTrimmable` property on the project.
16+
1017
## [1.7.8] - 2024-02-02
1118

1219
### Changed

src/Microsoft.Kiota.Abstractions.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<PackageProjectUrl>https://aka.ms/kiota/docs</PackageProjectUrl>
1515
<EmbedUntrackedSources>true</EmbedUntrackedSources>
1616
<Deterministic>true</Deterministic>
17-
<VersionPrefix>1.7.8</VersionPrefix>
17+
<VersionPrefix>1.7.9</VersionPrefix>
1818
<VersionSuffix></VersionSuffix>
1919
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
2020
<SignAssembly>false</SignAssembly>
@@ -34,7 +34,7 @@
3434
<PackageReadmeFile>README.md</PackageReadmeFile>
3535
<NoWarn>$(NoWarn);NU5048;NETSDK1138</NoWarn>
3636
</PropertyGroup>
37-
<PropertyGroup Condition="'$(TargetFrameworkVersion)' == 'net5.0'">
37+
<PropertyGroup Condition="'$(TargetFramework)' == 'net5.0'">
3838
<IsTrimmable>true</IsTrimmable>
3939
</PropertyGroup>
4040

src/RequestInformation.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ public RequestInformation(Method method, string urlTemplate, IDictionary<string,
4747
/// </summary>
4848
/// <typeparam name="T">Type for the query parameters</typeparam>
4949
/// <param name="requestConfiguration">Callback to configure the request</param>
50+
#if NET5_0_OR_GREATER
51+
public void Configure<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] T>(Action<RequestConfiguration<T>>? requestConfiguration) where T : class, new()
52+
#else
5053
public void Configure<T>(Action<RequestConfiguration<T>>? requestConfiguration) where T : class, new()
54+
#endif
5155
{
5256
if(requestConfiguration == null) return;
5357
var requestConfig = new RequestConfiguration<T>();

0 commit comments

Comments
 (0)