Skip to content

Commit

Permalink
Merge pull request #187 from hwoodiwiss/hwoodiwiss-fix-missing-annota…
Browse files Browse the repository at this point in the history
…tion

Add missing DynamicallyAccessedMembers annotation
  • Loading branch information
baywet authored Feb 4, 2024
2 parents f3fece1 + aac3286 commit 7363f17
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.7.9] - 2024-02-05

### Changed

- Added `DynamicallyAccessedMembers` annotation to `RequestInformation.Configure`.
- Fixes `IsTrimmable` property on the project.

## [1.7.8] - 2024-02-02

### Changed
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.Kiota.Abstractions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PackageProjectUrl>https://aka.ms/kiota/docs</PackageProjectUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<Deterministic>true</Deterministic>
<VersionPrefix>1.7.8</VersionPrefix>
<VersionPrefix>1.7.9</VersionPrefix>
<VersionSuffix></VersionSuffix>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<SignAssembly>false</SignAssembly>
Expand All @@ -34,7 +34,7 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
<NoWarn>$(NoWarn);NU5048;NETSDK1138</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFrameworkVersion)' == 'net5.0'">
<PropertyGroup Condition="'$(TargetFramework)' == 'net5.0'">
<IsTrimmable>true</IsTrimmable>
</PropertyGroup>

Expand Down
4 changes: 4 additions & 0 deletions src/RequestInformation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ public RequestInformation(Method method, string urlTemplate, IDictionary<string,
/// </summary>
/// <typeparam name="T">Type for the query parameters</typeparam>
/// <param name="requestConfiguration">Callback to configure the request</param>
#if NET5_0_OR_GREATER
public void Configure<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] T>(Action<RequestConfiguration<T>>? requestConfiguration) where T : class, new()
#else
public void Configure<T>(Action<RequestConfiguration<T>>? requestConfiguration) where T : class, new()
#endif
{
if(requestConfiguration == null) return;
var requestConfig = new RequestConfiguration<T>();
Expand Down

0 comments on commit 7363f17

Please sign in to comment.