Skip to content

Commit cd52736

Browse files
committed
Add Configuration.FindTypeStringConverter()
1 parent 81c3b87 commit cd52736

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Src/Configuration.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,19 @@ public static void DeregisterTypeStringConverter(Type type)
259259
s_typeStringConverters.Remove(type);
260260
}
261261

262-
internal static ITypeStringConverter FindTypeStringConverter(Type type)
262+
/// <summary>
263+
/// Looks up a registered type converter for a specific type.
264+
/// </summary>
265+
/// <param name="type">The type whose converter to look up.</param>
266+
/// <returns>A reference to the registered converter, if found; null otherwise.</returns>
267+
/// <exception cref="ArgumentNullException">When <paramref name="type"/>is null.</exception>
268+
public static ITypeStringConverter FindTypeStringConverter(Type type)
263269
{
270+
if (type == null)
271+
{
272+
throw new ArgumentNullException(nameof(type));
273+
}
274+
264275
if (type.IsEnum)
265276
{
266277
type = typeof(Enum);

0 commit comments

Comments
 (0)