Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing DynamicallyAccessedMembers annotation #187

Merged
merged 3 commits into from
Feb 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading