diff --git a/src/Constants.cs b/src/Constants.cs
index f8a4cc2..3c42928 100644
--- a/src/Constants.cs
+++ b/src/Constants.cs
@@ -1,4 +1,3 @@
-using System.Reflection.PortableExecutable;
/*
* Constants.cs
*
diff --git a/src/LoggerProvider.cs b/src/LoggerProvider.cs
index 3237f43..4414955 100644
--- a/src/LoggerProvider.cs
+++ b/src/LoggerProvider.cs
@@ -128,11 +128,11 @@ protected virtual void Dispose(bool disposing)
_context.RegisterPostInitializationOutput(
ctx => ctx.AddSource("log.g.cs", GetLogs())
);
- new FileInfo(
- Path.Combine(Path.GetDirectoryName(GetType().Assembly.Location), "log.g.txt")
- )
- .CreateText()
- .Write(GetLogs());
+ // new FileInfo(
+ // Path.Combine(Path.GetDirectoryName(GetType().Assembly.Location), "log.g.txt")
+ // )
+ // .CreateText()
+ // .Write(GetLogs());
}
disposedValue = true;
}
diff --git a/src/Resources/Enumeration.scriban b/src/Resources/Enumeration.scriban
index 3d1e471..b5151f7 100644
--- a/src/Resources/Enumeration.scriban
+++ b/src/Resources/Enumeration.scriban
@@ -23,12 +23,12 @@ public {{ if base_type == "" || base_type == null }} static {{ end }} partial {
/// Parses the to an object of type .
/// if no matching item was found
- public static I{{ dto_type_name }}? Parse(string value)
- => Parse(value);
+ public static I{{ dto_type_name }} Parse(string value)
+ => Parse(e => e.Name == value || e.DisplayName == value || e.GuidString == value || e.UriString == value || e.ShortName == value);
/// Uses the predicate the to find an object of type .
/// if no matching item was found
- public static I{{ dto_type_name }}? Parse(Func matchPredicate)
+ public static I{{ dto_type_name }} Parse(Func matchPredicate)
=> Parse(matchPredicate, true);
private static I{{ dto_type_name }} Parse(Func matchPredicate, bool throwOnNotFound)