diff --git a/src/Tomlyn.Tests/ModelTests/ReflectionModelTests.cs b/src/Tomlyn.Tests/ModelTests/ReflectionModelTests.cs
index a83aab2..11b0cb4 100644
--- a/src/Tomlyn.Tests/ModelTests/ReflectionModelTests.cs
+++ b/src/Tomlyn.Tests/ModelTests/ReflectionModelTests.cs
@@ -107,6 +107,64 @@ static void ValidateModel(PrimitiveModel model)
}
}
+ ///
+ /// Serialize back and forth all integer/float primitives with fields.
+ ///
+ [Test]
+ public void TestPrimitiveFields()
+ {
+ var model = new PrimitiveFieldsModel()
+ {
+ Int8Value = 1,
+ Int16Value = 2,
+ Int32Value = 3,
+ Int64Value = 4,
+ UInt8Value = 5,
+ UInt16Value = 6,
+ UInt32Value = 7,
+ UInt64Value = 8,
+ Float32Value = 2.5f,
+ Float64Value = 2.5,
+ DateTime = new DateTime(1970, 1, 1),
+ DateTimeOffset = new DateTimeOffset(1980, 1, 1, 0, 23, 1, TimeSpan.FromHours(-2)),
+ DateOnly = new DateOnly(1970, 5, 27),
+ TimeOnly = new TimeOnly(7, 32, 0, 999),
+ TomlDateTime = new TomlDateTime(new DateTimeOffset(new DateTime(1990, 11, 15)), 0, TomlDateTimeKind.LocalDateTime)
+ };
+
+ StandardTests.DisplayHeader("validation 1");
+ ValidateModel(model);
+
+ StandardTests.DisplayHeader("validation 2");
+ model.Int8Value = sbyte.MinValue;
+ model.Int16Value = short.MinValue;
+ model.Int32Value = int.MinValue;
+ model.Int64Value = long.MinValue;
+ model.UInt8Value = byte.MaxValue;
+ model.UInt16Value = ushort.MaxValue;
+ model.UInt32Value = uint.MaxValue;
+ model.UInt64Value = ulong.MaxValue;
+ model.Float32Value = float.PositiveInfinity;
+ model.Float64Value = double.PositiveInfinity;
+ ValidateModel(model);
+
+ static void ValidateModel(PrimitiveFieldsModel model)
+ {
+ var options = new TomlModelOptions();
+ options.IncludeFields = true;
+
+ var toml = Toml.FromModel(model, options: options);
+ StandardTests.DisplayHeader("toml from model");
+ Console.WriteLine(toml);
+ var model2 = Toml.ToModel(toml, options: options);
+
+ Console.WriteLine($"From Model: {model}");
+ Console.WriteLine($"From Model2: {model2}");
+
+ Assert.AreEqual(model.ToString(), model2.ToString());
+ }
+ }
+
///
/// Serialize back and forth all numeric and struct primitives as nullable value types.
///
@@ -180,6 +238,82 @@ static void ValidateModel(NullableValueTypesModel model)
}
}
+ ///
+ /// Serialize back and forth all numeric and struct primitives as nullable value type fieldss.
+ ///
+ [Test]
+ public void TestNullableValueTypeFields()
+ {
+ var model = new NullableValueTypeFieldsModel()
+ {
+ Int8Value = 1,
+ Int16Value = 2,
+ Int32Value = 3,
+ Int64Value = 4,
+ UInt8Value = 5,
+ UInt16Value = 6,
+ UInt32Value = 7,
+ UInt64Value = 8,
+ Float32Value = 2.5f,
+ Float64Value = 2.5,
+ DateTime = new DateTime(1970, 1, 1),
+ DateTimeOffset = new DateTimeOffset(1980, 1, 1, 0, 23, 1, TimeSpan.FromHours(-2)),
+ DateOnly = new DateOnly(1970, 5, 27),
+ TimeOnly = new TimeOnly(7, 32, 0, 999),
+ TomlDateTime = new TomlDateTime(new DateTimeOffset(new DateTime(1990, 11, 15)), 0, TomlDateTimeKind.LocalDateTime)
+ };
+
+ StandardTests.DisplayHeader("validation 1");
+ ValidateModel(model);
+
+ StandardTests.DisplayHeader("validation 2");
+ model.Int8Value = sbyte.MinValue;
+ model.Int16Value = short.MinValue;
+ model.Int32Value = int.MinValue;
+ model.Int64Value = long.MinValue;
+ model.UInt8Value = byte.MaxValue;
+ model.UInt16Value = ushort.MaxValue;
+ model.UInt32Value = uint.MaxValue;
+ model.UInt64Value = ulong.MaxValue;
+ model.Float32Value = float.PositiveInfinity;
+ model.Float64Value = double.PositiveInfinity;
+ ValidateModel(model);
+
+ StandardTests.DisplayHeader("validation 3");
+ model.Int8Value = null;
+ model.Int16Value = null;
+ model.Int32Value = null;
+ model.Int64Value = null;
+ model.UInt8Value = null;
+ model.UInt16Value = null;
+ model.UInt32Value = null;
+ model.UInt64Value = null;
+ model.Float32Value = null;
+ model.Float64Value = null;
+ model.DateTime = null;
+ model.DateTimeOffset = null;
+ model.DateOnly = null;
+ model.TimeOnly = null;
+ model.TomlDateTime = null;
+ ValidateModel(model);
+
+ static void ValidateModel(NullableValueTypeFieldsModel model)
+ {
+ var options = new TomlModelOptions();
+ options.IncludeFields = true;
+
+ var toml = Toml.FromModel(model, options: options);
+ StandardTests.DisplayHeader("toml from model");
+ Console.WriteLine(toml);
+ var model2 = Toml.ToModel(toml, options: options);
+
+ Console.WriteLine($"From Model: {model}");
+ Console.WriteLine($"From Model2: {model2}");
+
+ Assert.AreEqual(model.ToString(), model2.ToString());
+ }
+ }
+
[Test]
public void TestReflectionModel()
{
@@ -234,6 +368,63 @@ public void TestReflectionModel()
Assert.AreEqual(127, result);
}
+ [Test]
+ public void TestReflectionFieldsModel()
+ {
+ var input = @"name = ""this is a name""
+values = [""a"", ""b"", ""c"", 1]
+
+int_values = 1
+int_value = 2
+double_value = 2.5
+
+[[sub]]
+id = ""id1""
+publish = true
+
+[[sub]]
+id = ""id2""
+publish = false
+
+[[sub]]
+id = ""id3""";
+ var syntax = Toml.Parse(input);
+ Assert.False(syntax.HasErrors, "The document should not have any errors");
+
+ StandardTests.Dump(input, syntax, syntax.ToString());
+
+ var options = new TomlModelOptions();
+ options.IncludeFields = true;
+
+ var model = syntax.ToModel(options);
+
+ Assert.AreEqual("this is a name", model.Name);
+ Assert.AreEqual(new List() { "a", "b", "c", "1" }, model.Values);
+ Assert.AreEqual(new List() { 1 }, model.IntValues);
+ Assert.AreEqual(2, model.IntValue);
+ Assert.AreEqual(2.5, model.DoubleValue);
+ Assert.AreEqual(3, model.SubModels.Count);
+ var sub = model.SubModels[0];
+ Assert.AreEqual("id1", sub.Id);
+ Assert.True(sub.Publish);
+ sub = model.SubModels[1];
+ Assert.AreEqual("id2", sub.Id);
+ Assert.False(sub.Publish);
+ sub = model.SubModels[2];
+ Assert.AreEqual("id3", sub.Id);
+ Assert.False(sub.Publish);
+
+ model.SubModels[2].Value = 127;
+
+ var toml = Toml.FromModel(model, options: options);
+ StandardTests.DisplayHeader("toml from model");
+ Console.WriteLine(toml);
+
+ var model2 = Toml.ToModel(toml, options: options);
+ var result = (model2["sub"] as TomlTableArray)?[2]?["value"];
+ Assert.AreEqual(127, result);
+ }
+
[Test]
public void TestReflectionModelWithConvertName()
{
@@ -291,6 +482,62 @@ public void TestReflectionModelWithConvertName()
Assert.AreEqual(127, result);
}
+ [Test]
+ public void TestReflectionFieldsModelWithConvertName()
+ {
+ var input = @"Name = ""this is a name""
+Values = [""a"", ""b"", ""c"", 1]
+
+IntValues = 1
+IntValue = 2
+DoubleValue = 2.5
+
+[[sub]]
+Id = ""id1""
+Publish = true
+
+[[sub]]
+Id = ""id2""
+Publish = false
+
+[[sub]]
+Id = ""id3""";
+ var syntax = Toml.Parse(input);
+ Assert.False(syntax.HasErrors, "The document should not have any errors");
+
+ StandardTests.Dump(input, syntax, syntax.ToString());
+
+ var options = new TomlModelOptions() { ConvertPropertyName = name => name, ConvertFieldName = name => name, IncludeFields = true};
+
+ var model = syntax.ToModel(options);
+
+ Assert.AreEqual("this is a name", model.Name);
+ Assert.AreEqual(new List() { "a", "b", "c", "1" }, model.Values);
+ Assert.AreEqual(new List() { 1 }, model.IntValues);
+ Assert.AreEqual(2, model.IntValue);
+ Assert.AreEqual(2.5, model.DoubleValue);
+ Assert.AreEqual(3, model.SubModels.Count);
+ var sub = model.SubModels[0];
+ Assert.AreEqual("id1", sub.Id);
+ Assert.True(sub.Publish);
+ sub = model.SubModels[1];
+ Assert.AreEqual("id2", sub.Id);
+ Assert.False(sub.Publish);
+ sub = model.SubModels[2];
+ Assert.AreEqual("id3", sub.Id);
+ Assert.False(sub.Publish);
+
+ model.SubModels[2].Value = 127;
+
+ var toml = Toml.FromModel(model, options);
+ StandardTests.DisplayHeader("toml from model");
+ Console.WriteLine(toml);
+
+ var model2 = Toml.ToModel(toml, options: options);
+ var result = (model2["sub"] as TomlTableArray)?[2]?["Value"];
+ Assert.AreEqual(127, result);
+ }
+
[Test]
public void TestReflectionModelWithErrors()
@@ -346,6 +593,63 @@ public void TestReflectionModelWithErrors()
StringAssert.Contains("id3", diag.Message);
}
+ [Test]
+ public void TestReflectionFieldsModelWithErrors()
+ {
+ var input = @"name = ""this is a name""
+values = [""a"", ""b"", ""c"", 1]
+
+int_values1 = 1 # error
+int_value = 2
+double_value = 2.5
+
+[[sub]]
+id2 = ""id1"" # error
+publish = true
+
+[[sub]]
+id = ""id2""
+publish = false
+
+[[sub]]
+id3 = ""id3"" # error
+";
+ var syntax = Toml.Parse(input);
+ Assert.False(syntax.HasErrors, "The document should not have any errors");
+
+ StandardTests.Dump(input, syntax, syntax.ToString());
+
+ var options = new TomlModelOptions();
+ options.IncludeFields = true;
+
+ var result = syntax.TryToModel(out var model, out var diagnostics, options: options);
+
+ foreach (var message in diagnostics)
+ {
+ Console.WriteLine(message);
+ }
+
+ Assert.False(result);
+ Assert.NotNull(model);
+
+ // Expecting 3 errors
+ Assert.AreEqual(3, diagnostics.Count);
+
+ Debug.Assert(model is not null);
+ // The model is still partially valid
+ Assert.AreEqual("this is a name", model.Name);
+
+ var diag = diagnostics[0];
+ Assert.AreEqual(3, diag.Span.Start.Line);
+ StringAssert.Contains("int_values1", diag.Message);
+ diag = diagnostics[1];
+ Assert.AreEqual(8, diag.Span.Start.Line);
+ StringAssert.Contains("id2", diag.Message);
+ diag = diagnostics[2];
+ Assert.AreEqual(16, diag.Span.Start.Line);
+ StringAssert.Contains("id3", diag.Message);
+ }
+
[Test]
public void TestCommentRoundtripWithModel()
{
@@ -413,6 +717,21 @@ public void TestModelWithArray()
CollectionAssert.AreEqual(new string[] { "1", "2", "3"}, model.Values);
}
+ [Test]
+ public void TestModelWithArrayField()
+ {
+ var input = @"values = ['1', '2', '3']";
+
+ StandardTests.DisplayHeader("input");
+ Console.WriteLine(input);
+
+ var options = new TomlModelOptions();
+ options.IncludeFields = true;
+
+ var model = Toml.ToModel(input, options: options);
+ CollectionAssert.AreEqual(new string[] { "1", "2", "3" }, model.Values);
+ }
+
[Test]
public void TestModelWithFixedList()
{
@@ -424,6 +743,20 @@ public void TestModelWithFixedList()
CollectionAssert.AreEqual(new List { "1", "2", "3" }, model.Values);
}
+ [Test]
+ public void TestModelWithFixedListField()
+ {
+ var input = @"values = ['1', '2', '3']";
+
+ StandardTests.DisplayHeader("input");
+ Console.WriteLine(input);
+
+ var options = new TomlModelOptions();
+ options.IncludeFields = true;
+ var model = Toml.ToModel(input, options: options);
+ CollectionAssert.AreEqual(new List { "1", "2", "3" }, model.Values);
+ }
+
[Test]
public void TestModelWithMissingProperties()
{
@@ -444,6 +777,31 @@ public void TestModelWithMissingProperties()
}
+ [Test]
+ public void TestFieldsModelWithMissingProperties()
+ {
+ var input = @"values = ['1', '2', '3']
+some_thing_that_doesnt_exist = true
+[object_that_doesnt_exist]
+required = true";
+
+ StandardTests.DisplayHeader("input");
+ Console.WriteLine(input);
+ var model = Toml.ToModel(input, options: new TomlModelOptions
+ {
+ IgnoreMissingProperties = true,
+ IncludeFields = true
+ });
+ CollectionAssert.AreEqual(new List { "1", "2", "3" }, model.Values);
+
+ Assert.Throws(() => Toml.ToModel(input, options: new TomlModelOptions
+ {
+ IgnoreMissingProperties = false,
+ IncludeFields = true
+ }));
+
+ }
+
public class SimpleModel
{
public SimpleModel()
@@ -466,11 +824,39 @@ public SimpleModel()
public List SubModels { get; }
}
+ public class SimpleFieldsModel
+ {
+ public SimpleFieldsModel()
+ {
+ Values = new List();
+ SubModels = new List();
+ }
+
+ public string? Name { get; set; }
+
+ public List Values;
+
+ public List? IntValues;
+
+ public int IntValue { get; set; }
+
+ public double DoubleValue { get; set; }
+
+ [JsonPropertyName("sub")]
+ public List SubModels;
+ }
+
public class ModelWithArray
{
public string[]? Values { get; set; }
}
+
+ public class ModelWithArrayField
+ {
+ public string[]? Values;
+ }
+
public class ModelWithFixedList
{
public ModelWithFixedList()
@@ -481,6 +867,16 @@ public ModelWithFixedList()
public List Values { get; }
}
+ public class ModelWithFixedListField
+ {
+ public ModelWithFixedListField()
+ {
+ Values = new List();
+ }
+
+ public List Values;
+ }
+
public class SimpleSubModel
{
@@ -562,6 +958,66 @@ public override string ToString()
}
}
+ public class PrimitiveFieldsModel : IEquatable
+ {
+ public sbyte Int8Value;
+ public short Int16Value;
+ public int Int32Value;
+ public long Int64Value;
+ public byte UInt8Value;
+ public ushort UInt16Value;
+ public uint UInt32Value;
+ public ulong UInt64Value;
+ public float Float32Value;
+ public double Float64Value;
+ public DateTime DateTime;
+ public DateTimeOffset DateTimeOffset;
+ public DateOnly DateOnly;
+ public TimeOnly TimeOnly;
+ public TomlDateTime TomlDateTime;
+
+ public bool Equals(PrimitiveFieldsModel? other)
+ {
+ if (ReferenceEquals(null, other)) return false;
+ if (ReferenceEquals(this, other)) return true;
+ return Int8Value == other.Int8Value && Int16Value == other.Int16Value && Int32Value == other.Int32Value && Int64Value == other.Int64Value && UInt8Value == other.UInt8Value && UInt16Value == other.UInt16Value && UInt32Value == other.UInt32Value && UInt64Value == other.UInt64Value && Float32Value.Equals(other.Float32Value) && Float64Value.Equals(other.Float64Value) && DateTime.Equals(other.DateTime) && DateTimeOffset.Equals(other.DateTimeOffset) && DateOnly.Equals(other.DateOnly) && TimeOnly.Equals(other.TimeOnly) && TomlDateTime.Equals(other.TomlDateTime);
+ }
+
+ public override bool Equals(object? obj)
+ {
+ if (ReferenceEquals(null, obj)) return false;
+ if (ReferenceEquals(this, obj)) return true;
+ if (obj.GetType() != this.GetType()) return false;
+ return Equals((PrimitiveFieldsModel)obj);
+ }
+
+ public override int GetHashCode()
+ {
+ var hashCode = new HashCode();
+ hashCode.Add(Int8Value);
+ hashCode.Add(Int16Value);
+ hashCode.Add(Int32Value);
+ hashCode.Add(Int64Value);
+ hashCode.Add(UInt8Value);
+ hashCode.Add(UInt16Value);
+ hashCode.Add(UInt32Value);
+ hashCode.Add(UInt64Value);
+ hashCode.Add(Float32Value);
+ hashCode.Add(Float64Value);
+ hashCode.Add(DateTime);
+ hashCode.Add(DateTimeOffset);
+ hashCode.Add(DateOnly);
+ hashCode.Add(TimeOnly);
+ hashCode.Add(TomlDateTime);
+ return hashCode.ToHashCode();
+ }
+
+ public override string ToString()
+ {
+ return $"{nameof(Int8Value)}: {Int8Value}, {nameof(Int16Value)}: {Int16Value}, {nameof(Int32Value)}: {Int32Value}, {nameof(Int64Value)}: {Int64Value}, {nameof(UInt8Value)}: {UInt8Value}, {nameof(UInt16Value)}: {UInt16Value}, {nameof(UInt32Value)}: {UInt32Value}, {nameof(UInt64Value)}: {UInt64Value}, {nameof(Float32Value)}: {Float32Value}, {nameof(Float64Value)}: {Float64Value}, {nameof(DateTime)}: {DateTime.ToUniversalTime()}, {nameof(DateTimeOffset)}: {DateTimeOffset.ToUniversalTime()}, {nameof(DateOnly)}: {DateOnly}, {nameof(TimeOnly)}: {TimeOnly}, {nameof(TomlDateTime)}: {TomlDateTime}";
+ }
+ }
+
public class NullableValueTypesModel : IEquatable
{
public sbyte? Int8Value { get; set; }
@@ -635,5 +1091,79 @@ public override string ToString()
return $"{nameof(Int8Value)}: {Int8Value}, {nameof(Int16Value)}: {Int16Value}, {nameof(Int32Value)}: {Int32Value}, {nameof(Int64Value)}: {Int64Value}, {nameof(UInt8Value)}: {UInt8Value}, {nameof(UInt16Value)}: {UInt16Value}, {nameof(UInt32Value)}: {UInt32Value}, {nameof(UInt64Value)}: {UInt64Value}, {nameof(Float32Value)}: {Float32Value}, {nameof(Float64Value)}: {Float64Value}, {nameof(DateTime)}: {(DateTime.HasValue ? DateTime.Value.ToUniversalTime() : "null")}, {nameof(DateTimeOffset)}: {(DateTimeOffset.HasValue ? DateTimeOffset.Value.ToUniversalTime() : "null")}, {nameof(DateOnly)}: {DateOnly}, {nameof(TimeOnly)}: {TimeOnly}, {nameof(TomlDateTime)}: {TomlDateTime}";
}
}
+
+ public class NullableValueTypeFieldsModel : IEquatable
+ {
+ public sbyte? Int8Value;
+ public short? Int16Value;
+ public int? Int32Value;
+ public long? Int64Value;
+ public byte? UInt8Value;
+ public ushort? UInt16Value;
+ public uint? UInt32Value;
+ public ulong? UInt64Value;
+ public float? Float32Value;
+ public double? Float64Value;
+ public DateTime? DateTime;
+ public DateTimeOffset? DateTimeOffset;
+ public DateOnly? DateOnly;
+ public TimeOnly? TimeOnly;
+ public TomlDateTime? TomlDateTime;
+
+ public bool Equals(NullableValueTypeFieldsModel? other)
+ {
+ if (ReferenceEquals(null, other)) return false;
+ if (ReferenceEquals(this, other)) return true;
+ return Int8Value == other.Int8Value
+ && Int16Value == other.Int16Value
+ && Int32Value == other.Int32Value
+ && Int64Value == other.Int64Value
+ && UInt8Value == other.UInt8Value
+ && UInt16Value == other.UInt16Value
+ && UInt32Value == other.UInt32Value
+ && UInt64Value == other.UInt64Value
+ && ((!Float32Value.HasValue && !other.Float32Value.HasValue) || Float32Value.Equals(other.Float32Value))
+ && ((!Float64Value.HasValue && !other.Float64Value.HasValue) || Float64Value.Equals(other.Float64Value))
+ && ((!DateTime.HasValue && !other.DateTime.HasValue) || DateTime.Equals(other.DateTime))
+ && ((!DateTimeOffset.HasValue && !other.DateTimeOffset.HasValue) || DateTimeOffset.Equals(other.DateTimeOffset))
+ && ((!DateOnly.HasValue && !other.DateOnly.HasValue) || DateOnly.Equals(other.DateOnly))
+ && ((!TimeOnly.HasValue && !other.TimeOnly.HasValue) || TimeOnly.Equals(other.TimeOnly))
+ && ((!TomlDateTime.HasValue && !other.TomlDateTime.HasValue) || TomlDateTime.Equals(other.TomlDateTime));
+ }
+
+ public override bool Equals(object? obj)
+ {
+ if (ReferenceEquals(null, obj)) return false;
+ if (ReferenceEquals(this, obj)) return true;
+ if (obj.GetType() != this.GetType()) return false;
+ return Equals((PrimitiveModel)obj);
+ }
+
+ public override int GetHashCode()
+ {
+ var hashCode = new HashCode();
+ hashCode.Add(Int8Value);
+ hashCode.Add(Int16Value);
+ hashCode.Add(Int32Value);
+ hashCode.Add(Int64Value);
+ hashCode.Add(UInt8Value);
+ hashCode.Add(UInt16Value);
+ hashCode.Add(UInt32Value);
+ hashCode.Add(UInt64Value);
+ hashCode.Add(Float32Value);
+ hashCode.Add(Float64Value);
+ hashCode.Add(DateTime);
+ hashCode.Add(DateTimeOffset);
+ hashCode.Add(DateOnly);
+ hashCode.Add(TimeOnly);
+ hashCode.Add(TomlDateTime);
+ return hashCode.ToHashCode();
+ }
+
+ public override string ToString()
+ {
+ return $"{nameof(Int8Value)}: {Int8Value}, {nameof(Int16Value)}: {Int16Value}, {nameof(Int32Value)}: {Int32Value}, {nameof(Int64Value)}: {Int64Value}, {nameof(UInt8Value)}: {UInt8Value}, {nameof(UInt16Value)}: {UInt16Value}, {nameof(UInt32Value)}: {UInt32Value}, {nameof(UInt64Value)}: {UInt64Value}, {nameof(Float32Value)}: {Float32Value}, {nameof(Float64Value)}: {Float64Value}, {nameof(DateTime)}: {(DateTime.HasValue ? DateTime.Value.ToUniversalTime() : "null")}, {nameof(DateTimeOffset)}: {(DateTimeOffset.HasValue ? DateTimeOffset.Value.ToUniversalTime() : "null")}, {nameof(DateOnly)}: {DateOnly}, {nameof(TimeOnly)}: {TimeOnly}, {nameof(TomlDateTime)}: {TomlDateTime}";
+ }
+ }
}
}
\ No newline at end of file
diff --git a/src/Tomlyn/Model/Accessors/DynamicModelReadContext.cs b/src/Tomlyn/Model/Accessors/DynamicModelReadContext.cs
index e97d09d..d44c151 100644
--- a/src/Tomlyn/Model/Accessors/DynamicModelReadContext.cs
+++ b/src/Tomlyn/Model/Accessors/DynamicModelReadContext.cs
@@ -15,18 +15,25 @@ internal class DynamicModelReadContext
public DynamicModelReadContext(TomlModelOptions options)
{
GetPropertyName = options.GetPropertyName;
+ GetFieldName = options.GetFieldName;
ConvertPropertyName = options.ConvertPropertyName;
+ ConvertFieldName = options.ConvertFieldName;
CreateInstance = options.CreateInstance;
ConvertToModel = options.ConvertToModel;
IgnoreMissingProperties = options.IgnoreMissingProperties;
+ IncludeFields = options.IncludeFields;
Diagnostics = new DiagnosticsBag();
_accessors = new Dictionary();
}
public Func GetPropertyName { get; set; }
+ public Func GetFieldName { get; set; }
+
public Func ConvertPropertyName { get; set; }
+ public Func ConvertFieldName { get; set; }
+
public Func CreateInstance { get; set; }
public Func