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

Updated to NET8, Added Unit Tests #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lordfrishetti1
Copy link

This commit updates the serilog-enrichers-memory solution to support Visual Studio 2022 and introduces a new test project to enhance code quality and maintainability. Key changes include:

  • Upgraded the solution file to Visual Studio 2022 and added a new test project (Serilog.Enrichers.Memory.Tests) with a "tests" solution folder and a "Solution Items" folder for better organization.
  • Updated copyright year in MemoryUsageEnricher.cs to 2024 and refactored the file using the latest C# syntax, including file-scoped namespaces and target-typed new expressions. Improved documentation comments and aligned the namespace declaration with ReSharper's recommendations.
  • Introduced a new static class ProcessLoggerConfigurationExtensions providing an extension method WithMemoryUsage to enrich log events with memory usage information, leveraging the latest C# syntax for cleaner method chaining.
  • Updated the main project file to target .NET 8.0, upgraded the Serilog dependency to version 4.0.0, and updated the package version to 1.1.0 to reflect new features and improvements.
  • Added unit tests for MemoryUsageEnricher and ProcessLoggerConfigurationExtensions in new test files, ensuring correct functionality and error handling.
  • Created a new test project file targeting .NET 8.0 with modern project settings, including implicit usings and nullable reference types, and added necessary package references for xUnit, Moq, and Serilog testing.

This commit updates the `serilog-enrichers-memory` solution to support Visual Studio 2022 and introduces a new test project to enhance code quality and maintainability. Key changes include:

- Upgraded the solution file to Visual Studio 2022 and added a new test project (`Serilog.Enrichers.Memory.Tests`) with a "tests" solution folder and a "Solution Items" folder for better organization.
- Updated copyright year in `MemoryUsageEnricher.cs` to 2024 and refactored the file using the latest C# syntax, including file-scoped namespaces and target-typed `new` expressions. Improved documentation comments and aligned the namespace declaration with ReSharper's recommendations.
- Introduced a new static class `ProcessLoggerConfigurationExtensions` providing an extension method `WithMemoryUsage` to enrich log events with memory usage information, leveraging the latest C# syntax for cleaner method chaining.
- Updated the main project file to target .NET 8.0, upgraded the Serilog dependency to version 4.0.0, and updated the package version to 1.1.0 to reflect new features and improvements.
- Added unit tests for `MemoryUsageEnricher` and `ProcessLoggerConfigurationExtensions` in new test files, ensuring correct functionality and error handling.
- Created a new test project file targeting .NET 8.0 with modern project settings, including implicit usings and nullable reference types, and added necessary package references for xUnit, Moq, and Serilog testing.
Removed the "Solution Items" project from the solution to streamline project structure and focus on specific project-related files.
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.

1 participant