From 3b39c9bd28ce2bbdbf6398f147ca4c5ceef830c7 Mon Sep 17 00:00:00 2001 From: Esiur Project Date: Thu, 25 Aug 2022 19:47:02 +0300 Subject: [PATCH] Null Type --- Esiur/Data/RepresentationType.cs | 8 ++++---- Esiur/Esiur.csproj | 2 +- Test/Program.cs | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Esiur/Data/RepresentationType.cs b/Esiur/Data/RepresentationType.cs index 3111ca3..5e6dfef 100644 --- a/Esiur/Data/RepresentationType.cs +++ b/Esiur/Data/RepresentationType.cs @@ -167,13 +167,13 @@ namespace Esiur.Data (RepresentationTypeIdentifier.Float32) => Nullable ? typeof(float?) : typeof(float), (RepresentationTypeIdentifier.Float64) => Nullable ? typeof(double?) : typeof(double), (RepresentationTypeIdentifier.Decimal) => Nullable ? typeof(decimal?) : typeof(decimal), - (RepresentationTypeIdentifier.String) => typeof(string), //Nullable ? typeof(Nullable) : typeof(string), + (RepresentationTypeIdentifier.String) => typeof(string), (RepresentationTypeIdentifier.DateTime) => Nullable ? typeof(DateTime?) : typeof(DateTime), (RepresentationTypeIdentifier.Resource) => typeof(IResource), (RepresentationTypeIdentifier.Record) => typeof(IRecord), - (RepresentationTypeIdentifier.TypedRecord) => Warehouse.GetTemplateByClassId((Guid)GUID, TemplateType.Record).DefinedType, - (RepresentationTypeIdentifier.TypedResource) => Warehouse.GetTemplateByClassId((Guid)GUID, TemplateType.Unspecified).DefinedType, - (RepresentationTypeIdentifier.Enum) => Warehouse.GetTemplateByClassId((Guid)GUID, TemplateType.Enum).DefinedType, + (RepresentationTypeIdentifier.TypedRecord) => Warehouse.GetTemplateByClassId((Guid)GUID, TemplateType.Record)?.DefinedType, + (RepresentationTypeIdentifier.TypedResource) => Warehouse.GetTemplateByClassId((Guid)GUID, TemplateType.Unspecified)?.DefinedType, + (RepresentationTypeIdentifier.Enum) => Warehouse.GetTemplateByClassId((Guid)GUID, TemplateType.Enum)?.DefinedType, _ => null }; diff --git a/Esiur/Esiur.csproj b/Esiur/Esiur.csproj index fd2f955..ea10c02 100644 --- a/Esiur/Esiur.csproj +++ b/Esiur/Esiur.csproj @@ -6,7 +6,7 @@ Ahmed Kh. Zamil http://www.esiur.com true - 2.3.0 + 2.3.1 https://github.com/esiur/esiur-dotnet Ahmed Kh. Zamil diff --git a/Test/Program.cs b/Test/Program.cs index 2a170e8..d43cfb4 100644 --- a/Test/Program.cs +++ b/Test/Program.cs @@ -55,6 +55,7 @@ namespace Test static async Task Main(string[] args) { + // Create stores to keep objects. var system = await Warehouse.Put("sys", new MemoryStore()); var server = await Warehouse.Put("sys/server", new DistributedServer());