Documentation modifications
This commit is contained in:
@@ -3,12 +3,24 @@ using System.Reflection;
|
||||
|
||||
namespace adas_core.Domain.Utils;
|
||||
|
||||
/// <summary>
|
||||
/// Provides a static mapping utility for instances of the reference type <typeparamref name="T"/>.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The reference type that this mapper operates on, constrained to reference types via the <c>class</c> constraint.</typeparam>
|
||||
/// <remarks>
|
||||
/// As indicated by the <c>where T : class</c> constraint, only reference types can be supplied as the generic argument for <typeparamref name="T"/>.
|
||||
/// </remarks>
|
||||
/// <!-- aidoc:v1 sig=4a87291 -->
|
||||
public static class Mapper<T>
|
||||
// We can only use reference types
|
||||
where T : class
|
||||
{
|
||||
private static readonly Dictionary<string, PropertyInfo> PropertyMap;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the static <see cref="Mapper{T}.PropertyMap"/> cache used by the mapper to look up <see cref="System.Reflection.PropertyInfo"/> entries for the type parameter T by their lowercased property name.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=ed9693b body=3dc0e55 -->
|
||||
static Mapper()
|
||||
{
|
||||
// At this point we can convert each
|
||||
|
||||
Reference in New Issue
Block a user