cab8fa82a2
* Added a new Fody plugin to add to every model class the JsonExtensionData attribute * retargeted fody plugin to netstandard for msbuild runtime * Fixed runtime issue * Fixed property check for new extension data properties --------- Co-authored-by: Alex <clodanSPT@hotmail.com>
35 lines
902 B
C#
35 lines
902 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text.RegularExpressions;
|
|
|
|
namespace JsonExtensionData.Fody;
|
|
|
|
public partial class ModuleWeaver
|
|
{
|
|
public List<Regex> IncludeNamespacesRegex = new();
|
|
|
|
public void ReadConfig()
|
|
{
|
|
ReadExcludes();
|
|
}
|
|
|
|
void ReadExcludes()
|
|
{
|
|
var includeNamespacesElement = Config.Element("IncludeNamespacesRegex");
|
|
if (includeNamespacesElement != null)
|
|
{
|
|
foreach (var item in includeNamespacesElement.Value
|
|
.Split(
|
|
[
|
|
"\r\n",
|
|
"\n"
|
|
],
|
|
StringSplitOptions.RemoveEmptyEntries)
|
|
.NonEmpty())
|
|
{
|
|
IncludeNamespacesRegex.Add(new Regex(item));
|
|
}
|
|
}
|
|
}
|
|
}
|