From 7294c72ffea8c621a4ae4fbbf29a30e174df5ad4 Mon Sep 17 00:00:00 2001 From: Michael Ganss Date: Fri, 12 Apr 2024 16:43:51 +0200 Subject: [PATCH] Fix sonarcloud issue --- XmlSchemaClassGenerator/TypeModel.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XmlSchemaClassGenerator/TypeModel.cs b/XmlSchemaClassGenerator/TypeModel.cs index 824a9a5..93cb45e 100644 --- a/XmlSchemaClassGenerator/TypeModel.cs +++ b/XmlSchemaClassGenerator/TypeModel.cs @@ -1102,8 +1102,8 @@ private IEnumerable GetAttributes(bool isArray, TypeMo { var qualifiedName = xmlSchemaType.GetQualifiedName(); - if ((qualifiedName.Namespace == XmlSchema.Namespace && qualifiedName.Name != "anySimpleType") && - (xmlSchemaType.Datatype.ValueType == typeof(DateTime) && Configuration.DateTimeWithTimeZone) == false) + if (qualifiedName.Namespace == XmlSchema.Namespace && qualifiedName.Name != "anySimpleType" && + !(xmlSchemaType.Datatype.ValueType == typeof(DateTime) && Configuration.DateTimeWithTimeZone)) { args.Add(new("DataType", new CodePrimitiveExpression(qualifiedName.Name))); break;