File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -66,9 +66,17 @@ public void Execute(GeneratorExecutionContext context)
6666 using System.Collections.Generic; //to support List<T> etc
6767
6868 namespace MapDataReader;
69-
69+
70+ /// <summary>
71+ /// MapDataReader extension methods
72+ /// </summary>
73+ /// <seealso cref="{{ typeNodeSymbol . FullName ( ) }} ">{{ typeNode . Identifier }} </seealso>
7074 public static class {{ typeNode . Identifier }} Extensions
7175 {
76+ /// <summary>
77+ /// Fast compile-time method for setting a property value by name
78+ /// </summary>
79+ /// <seealso cref="{{ typeNodeSymbol . FullName ( ) }} ">{{ typeNode . Identifier }} </seealso>
7280 public static void SetPropertyByName(this {{ typeNodeSymbol . FullName ( ) }} target, string name, object value)
7381 {
7482 SetPropertyByUpperName(target, name.ToUpperInvariant(), value);
@@ -115,6 +123,20 @@ private static void SetPropertyByUpperName(this {{typeNodeSymbol.FullName()}} ta
115123 {
116124 src += $$ """
117125
126+ /// <summary>
127+ /// Map the data reader to <see cref="{{ typeNodeSymbol . FullName ( ) }} ">{{ typeNode . Identifier }} </see>
128+ /// </summary>
129+ /// <seealso cref="{{ typeNodeSymbol . FullName ( ) }} ">{{ typeNode . Identifier }} </seealso>
130+ [Obsolete("Use To<T> instead, this will be removed in future versions.")]
131+ public static List<{{ typeNodeSymbol . FullName ( ) }} > To{{ typeNode . Identifier }} (this IDataReader dr)
132+ {
133+ return dr.To<{{ typeNodeSymbol . FullName ( ) }} >();
134+ }
135+
136+ /// <summary>
137+ /// Map the data reader to <see cref="{{ typeNodeSymbol . FullName ( ) }} ">{{ typeNode . Identifier }} </see>
138+ /// </summary>
139+ /// <seealso cref="{{ typeNodeSymbol . FullName ( ) }} ">{{ typeNode . Identifier }} </seealso>
118140 public static List<{{ typeNodeSymbol . FullName ( ) }} > To<T>(this IDataReader dr) where T : {{ typeNodeSymbol . FullName ( ) }}
119141 {
120142 var list = new List<{{ typeNodeSymbol . FullName ( ) }} >();
You can’t perform that action at this time.
0 commit comments