From 8a7fcf1fe1e2c12ba56c59614f2cf019c451b4ab Mon Sep 17 00:00:00 2001
From: Bart Koelman <10324372+bkoelman@users.noreply.github.com>
Date: Sun, 3 Mar 2024 13:43:12 +0100
Subject: [PATCH] Add missing documentation for type parameters
---
.../Queries/Expressions/QueryExpressionVisitor.cs | 6 ++++++
src/JsonApiDotNetCore/Repositories/DbContextResolver.cs | 3 +++
.../Repositories/EntityFrameworkCoreRepository.cs | 6 ++++++
src/JsonApiDotNetCore/Resources/IResourceChangeTracker.cs | 3 +++
.../Resources/QueryStringParameterHandlers.cs | 3 +++
.../Serialization/Objects/SingleOrManyData.cs | 3 +++
6 files changed, 24 insertions(+)
diff --git a/src/JsonApiDotNetCore/Queries/Expressions/QueryExpressionVisitor.cs b/src/JsonApiDotNetCore/Queries/Expressions/QueryExpressionVisitor.cs
index 7dcf44b1f4..12242c29ff 100644
--- a/src/JsonApiDotNetCore/Queries/Expressions/QueryExpressionVisitor.cs
+++ b/src/JsonApiDotNetCore/Queries/Expressions/QueryExpressionVisitor.cs
@@ -5,6 +5,12 @@ namespace JsonApiDotNetCore.Queries.Expressions;
///
/// Implements the visitor design pattern that enables traversing a tree.
///
+///
+/// The type to use for passing custom state between visit methods.
+///
+///
+/// The type that is returned from visit methods.
+///
[PublicAPI]
public abstract class QueryExpressionVisitor
{
diff --git a/src/JsonApiDotNetCore/Repositories/DbContextResolver.cs b/src/JsonApiDotNetCore/Repositories/DbContextResolver.cs
index 794eecc6f2..bc275a96c1 100644
--- a/src/JsonApiDotNetCore/Repositories/DbContextResolver.cs
+++ b/src/JsonApiDotNetCore/Repositories/DbContextResolver.cs
@@ -4,6 +4,9 @@
namespace JsonApiDotNetCore.Repositories;
///
+///
+/// The type of the to resolve.
+///
[PublicAPI]
public sealed class DbContextResolver : IDbContextResolver
where TDbContext : DbContext
diff --git a/src/JsonApiDotNetCore/Repositories/EntityFrameworkCoreRepository.cs b/src/JsonApiDotNetCore/Repositories/EntityFrameworkCoreRepository.cs
index 4c3314ddab..a5f083932b 100644
--- a/src/JsonApiDotNetCore/Repositories/EntityFrameworkCoreRepository.cs
+++ b/src/JsonApiDotNetCore/Repositories/EntityFrameworkCoreRepository.cs
@@ -21,6 +21,12 @@ namespace JsonApiDotNetCore.Repositories;
///
/// Implements the foundational Repository layer in the JsonApiDotNetCore architecture that uses Entity Framework Core.
///
+///
+/// The resource type.
+///
+///
+/// The resource identifier type.
+///
[PublicAPI]
public class EntityFrameworkCoreRepository : IResourceRepository, IRepositorySupportsTransaction
where TResource : class, IIdentifiable
diff --git a/src/JsonApiDotNetCore/Resources/IResourceChangeTracker.cs b/src/JsonApiDotNetCore/Resources/IResourceChangeTracker.cs
index 1f69735f92..13404f2759 100644
--- a/src/JsonApiDotNetCore/Resources/IResourceChangeTracker.cs
+++ b/src/JsonApiDotNetCore/Resources/IResourceChangeTracker.cs
@@ -3,6 +3,9 @@ namespace JsonApiDotNetCore.Resources;
///
/// Used to determine whether additional changes to a resource (side effects), not specified in a POST or PATCH request, have been applied.
///
+///
+/// The resource type.
+///
public interface IResourceChangeTracker
where TResource : class, IIdentifiable
{
diff --git a/src/JsonApiDotNetCore/Resources/QueryStringParameterHandlers.cs b/src/JsonApiDotNetCore/Resources/QueryStringParameterHandlers.cs
index b48c46e26e..7fe8970b53 100644
--- a/src/JsonApiDotNetCore/Resources/QueryStringParameterHandlers.cs
+++ b/src/JsonApiDotNetCore/Resources/QueryStringParameterHandlers.cs
@@ -6,4 +6,7 @@ namespace JsonApiDotNetCore.Resources;
/// This is an alias type intended to simplify the implementation's method signature. See
/// for usage details.
///
+///
+/// The resource type.
+///
public sealed class QueryStringParameterHandlers : Dictionary, StringValues, IQueryable>>;
diff --git a/src/JsonApiDotNetCore/Serialization/Objects/SingleOrManyData.cs b/src/JsonApiDotNetCore/Serialization/Objects/SingleOrManyData.cs
index 1126f84f26..99884d61e6 100644
--- a/src/JsonApiDotNetCore/Serialization/Objects/SingleOrManyData.cs
+++ b/src/JsonApiDotNetCore/Serialization/Objects/SingleOrManyData.cs
@@ -9,6 +9,9 @@ namespace JsonApiDotNetCore.Serialization.Objects;
/// Represents the value of the "data" element, which is either null, a single object or an array of objects. Add
/// to to properly roundtrip.
///
+///
+/// The type of elements being wrapped, typically or .
+///
[PublicAPI]
public readonly struct SingleOrManyData
// The "new()" constraint exists for parity with SingleOrManyDataConverterFactory, which creates empty instances