From 504814d29780e81366fc764515da9bcca9e7e1a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Pozler?= Date: Thu, 7 Dec 2023 00:55:50 +0100 Subject: [PATCH] fix: semantic fixes --- .../Converters/Models/Schema/EntitySchemaConverter.cs | 4 ++-- .../DelegatingLocalCatalogSchemaMutationConverter.cs | 4 ++-- .../DataTypes/Data/NonSerializableDataAttribute.cs | 6 ++++++ EvitaDB.Client/EvitaClient.cs | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 EvitaDB.Client/DataTypes/Data/NonSerializableDataAttribute.cs diff --git a/EvitaDB.Client/Converters/Models/Schema/EntitySchemaConverter.cs b/EvitaDB.Client/Converters/Models/Schema/EntitySchemaConverter.cs index 625bc7d..8ea52f2 100644 --- a/EvitaDB.Client/Converters/Models/Schema/EntitySchemaConverter.cs +++ b/EvitaDB.Client/Converters/Models/Schema/EntitySchemaConverter.cs @@ -27,7 +27,7 @@ public static GrpcEntitySchema Convert(IEntitySchema entitySchema) EvolutionMode = {entitySchema.EvolutionModes.Select(EvitaEnumConverter.ToGrpcEvolutionMode)}, SortableAttributeCompounds = {ToGrpcSortableAttributeCompoundSchemas(entitySchema.GetSortableAttributeCompounds())}, - Version = entitySchema.Version, + Version = entitySchema.Version }; } @@ -345,4 +345,4 @@ private static GrpcReferenceSchema ToGrpcReferenceSchema(IReferenceSchema refere DeprecationNotice = referenceSchema.DeprecationNotice }; } -} \ No newline at end of file +} diff --git a/EvitaDB.Client/Converters/Models/Schema/Mutations/DelegatingLocalCatalogSchemaMutationConverter.cs b/EvitaDB.Client/Converters/Models/Schema/Mutations/DelegatingLocalCatalogSchemaMutationConverter.cs index 9bd179e..a903764 100644 --- a/EvitaDB.Client/Converters/Models/Schema/Mutations/DelegatingLocalCatalogSchemaMutationConverter.cs +++ b/EvitaDB.Client/Converters/Models/Schema/Mutations/DelegatingLocalCatalogSchemaMutationConverter.cs @@ -85,7 +85,7 @@ public GrpcLocalCatalogSchemaMutation Convert(ILocalCatalogSchemaMutation mutati grpcLocalCatalogSchemaMutation.RemoveEntitySchemaMutation = new RemoveEntitySchemaMutationConverter().Convert(removeEntitySchemaMutation); break; default: - throw new EvitaInternalError("This should never happen!");; + throw new EvitaInternalError("This should never happen!"); } return grpcLocalCatalogSchemaMutation; } @@ -122,4 +122,4 @@ public ILocalCatalogSchemaMutation Convert(GrpcLocalCatalogSchemaMutation mutati _ => throw new EvitaInternalError("This should never happen!") }; } -} \ No newline at end of file +} diff --git a/EvitaDB.Client/DataTypes/Data/NonSerializableDataAttribute.cs b/EvitaDB.Client/DataTypes/Data/NonSerializableDataAttribute.cs new file mode 100644 index 0000000..933789b --- /dev/null +++ b/EvitaDB.Client/DataTypes/Data/NonSerializableDataAttribute.cs @@ -0,0 +1,6 @@ +namespace EvitaDB.Client.DataTypes.Data; + +[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] +public class NonSerializableDataAttribute : Attribute +{ +} \ No newline at end of file diff --git a/EvitaDB.Client/EvitaClient.cs b/EvitaDB.Client/EvitaClient.cs index c85f8eb..72eef9e 100644 --- a/EvitaDB.Client/EvitaClient.cs +++ b/EvitaDB.Client/EvitaClient.cs @@ -583,6 +583,6 @@ private void AssertActive() } } - [GeneratedRegex("(\\w+:\\w+:\\w+): (.*)", RegexOptions.IgnoreCase | RegexOptions.Compiled, "en-US")] + [GeneratedRegex(@"(\w+:\w+:\w+): (.*)", RegexOptions.IgnoreCase | RegexOptions.Compiled, "en-US")] private static partial Regex MyRegex(); }