Skip to content

upgraded to .NET 9.0 and some fixes #20

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

bradyguyc
Copy link

Added parameters to MyBooks api.
Upgraded to .net 9.0

The target framework for the project has been updated from .NET 6.0 (net6.0) to .NET 9.0 (net9.0). This change is reflected in the <TargetFramework> element within the project file (OpenLibraryNET.csproj).
Updated target frameworks to net9.0 for multiple projects:
- OpenLibraryNET.Diagnostics.csproj
- OpenLibraryNET.GeneratorAttributes.csproj
- OpenLibraryNET.RemoveGeneratorAttributes.csproj
- OpenLibraryNET.SourceGenerators.csproj
- OpenLibraryNET.Tests.csproj
- OpenLibraryNET.csproj

Modified method signatures in IOLMyBooksLoader.cs and OLMyBooksLoader.cs to include additional parameters:
- TryGetWantToReadAsync
- GetWantToReadAsync
- TryGetCurrentlyReadingAsync
- GetCurrentlyReadingAsync
- TryGetAlreadyReadAsync
- GetAlreadyReadAsync

Enhanced OpenLibraryUtility.BuildMyBooksUri to accept and include additional parameters in URI construction.

Ensured OpenLibraryUtility.cs returns default value for empty JSON responses.

Updated OpenLibraryNET.csproj to use $(TargetFramework) variable for dynamic paths in Analyzer and PostBuild sections.

Added using System.Diagnostics; directive to OpenLibraryUtility.cs.
@Luca3317
Copy link
Owner

I dont know about changing the target framework to 9.0 -- ive been using this in a Unity project and afaik Unity still doesnt support 9.0 (though that mightve changed with Unity6? not sure)

Is there a specific reason you updated it?

@bradyguyc
Copy link
Author

I am working with .NET Maui and pushing into the beta of .NET 9.0 for some of the latest features. I don't think it would be an issue to switch it to .NET 8.0 the currently supported version that's not beta. I can do that and try it out if you like. Could also consider having a 9.0 beta of openlibrary.net but let the 8.0 be production if that's not to hard.

Reorganized using directives in OpenLibraryClient.cs for better clarity.
Added OperationKeyHandler class for handling HTTP requests with resilience context.
Introduced httpClientName constant for HttpClient naming.
Added _cookieContainer field for cookie management.
Updated OpenLibraryClient constructor to accept optional configuration actions.
Configured ServiceCollection to build a service provider for HttpClient setup.
HttpClient is now created using IHttpClientFactory from the service provider.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants