From d80c1ac5a0c657e5d07c6bc27d63a9ba9550d3f2 Mon Sep 17 00:00:00 2001
From: JFronny <33260128+jfronny@users.noreply.github.com>
Date: Thu, 19 Nov 2020 19:35:17 +0100
Subject: [PATCH] Add AspNet GenericExtensions
---
AspNet/GenericExtensions.cs | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 AspNet/GenericExtensions.cs
diff --git a/AspNet/GenericExtensions.cs b/AspNet/GenericExtensions.cs
new file mode 100644
index 0000000..9bcf583
--- /dev/null
+++ b/AspNet/GenericExtensions.cs
@@ -0,0 +1,21 @@
+using System.Text.Json;
+
+namespace CC_Functions.AspNet
+{
+ ///
+ /// Extension methods for various types
+ ///
+ public static class GenericExtensions
+ {
+ ///
+ /// Include CCF json extensions for this serializer
+ ///
+ /// The options to include CCF in
+ /// The options including CCF
+ public static JsonSerializerOptions AddCcf(this JsonSerializerOptions options)
+ {
+ options.Converters.Add(new DictionaryGuidConverter());
+ return options;
+ }
+ }
+}
\ No newline at end of file