diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/AnnotatingElementComparer.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/AnnotatingElementComparer.cs
new file mode 100644
index 000000000..eab4d38d8
--- /dev/null
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/AnnotatingElementComparer.cs
@@ -0,0 +1,124 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.DTO.Root.Annotations;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class AnnotatingElementComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IAnnotatingElement x, IAnnotatingElement y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IAnnotatingElement obj)
+ {
+ return HashCode.Combine(typeof(IAnnotatingElement), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/AssociationComparer.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/AssociationComparer.cs
new file mode 100644
index 000000000..21a8b5bdf
--- /dev/null
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/AssociationComparer.cs
@@ -0,0 +1,134 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.DTO.Kernel.Associations;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class AssociationComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IAssociation x, IAssociation y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsImplied != y.IsImplied) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelatedElement, y.OwnedRelatedElement)) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelatedElement != y.OwningRelatedElement) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IAssociation obj)
+ {
+ return HashCode.Combine(typeof(IAssociation), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/DependencyComparer.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/DependencyComparer.cs
new file mode 100644
index 000000000..5964eb41b
--- /dev/null
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/DependencyComparer.cs
@@ -0,0 +1,134 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.DTO.Root.Dependencies;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class DependencyComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IDependency x, IDependency y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.Client, y.Client)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsImplied != y.IsImplied) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelatedElement, y.OwnedRelatedElement)) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelatedElement != y.OwningRelatedElement) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.Supplier, y.Supplier)) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IDependency obj)
+ {
+ return HashCode.Combine(typeof(IDependency), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/EnumerationDefinitionComparer.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/EnumerationDefinitionComparer.cs
new file mode 100644
index 000000000..6df61fd39
--- /dev/null
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/EnumerationDefinitionComparer.cs
@@ -0,0 +1,130 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.DTO.Systems.Enumerations;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class EnumerationDefinitionComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IEnumerationDefinition x, IEnumerationDefinition y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsVariation != y.IsVariation) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IEnumerationDefinition obj)
+ {
+ return HashCode.Combine(typeof(IEnumerationDefinition), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/FeatureComparer.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/FeatureComparer.cs
new file mode 100644
index 000000000..9e147f764
--- /dev/null
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/FeatureComparer.cs
@@ -0,0 +1,147 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.DTO.Core.Features;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class FeatureComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IFeature x, IFeature y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (x.Direction != y.Direction) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsComposite != y.IsComposite) return false;
+
+ if (x.IsConstant != y.IsConstant) return false;
+
+ if (x.IsDerived != y.IsDerived) return false;
+
+ if (x.IsEnd != y.IsEnd) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsOrdered != y.IsOrdered) return false;
+
+ if (x.IsPortion != y.IsPortion) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsUnique != y.IsUnique) return false;
+
+ if (x.IsVariable != y.IsVariable) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IFeature obj)
+ {
+ return HashCode.Combine(typeof(IFeature), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/FeatureTypingComparer.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/FeatureTypingComparer.cs
new file mode 100644
index 000000000..1ababd5e4
--- /dev/null
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/FeatureTypingComparer.cs
@@ -0,0 +1,134 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.DTO.Core.Features;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class FeatureTypingComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IFeatureTyping x, IFeatureTyping y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsImplied != y.IsImplied) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelatedElement, y.OwnedRelatedElement)) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelatedElement != y.OwningRelatedElement) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ if (x.Type != y.Type) return false;
+
+ if (x.TypedFeature != y.TypedFeature) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IFeatureTyping obj)
+ {
+ return HashCode.Combine(typeof(IFeatureTyping), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/FlowComparer.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/FlowComparer.cs
new file mode 100644
index 000000000..273559e59
--- /dev/null
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/FlowComparer.cs
@@ -0,0 +1,153 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.DTO.Kernel.Interactions;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class FlowComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IFlow x, IFlow y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (x.Direction != y.Direction) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsComposite != y.IsComposite) return false;
+
+ if (x.IsConstant != y.IsConstant) return false;
+
+ if (x.IsDerived != y.IsDerived) return false;
+
+ if (x.IsEnd != y.IsEnd) return false;
+
+ if (x.IsImplied != y.IsImplied) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsOrdered != y.IsOrdered) return false;
+
+ if (x.IsPortion != y.IsPortion) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsUnique != y.IsUnique) return false;
+
+ if (x.IsVariable != y.IsVariable) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelatedElement, y.OwnedRelatedElement)) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelatedElement != y.OwningRelatedElement) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IFlow obj)
+ {
+ return HashCode.Combine(typeof(IFlow), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/FramedConcernMembershipComparer.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/FramedConcernMembershipComparer.cs
new file mode 100644
index 000000000..17d8d9a1d
--- /dev/null
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/FramedConcernMembershipComparer.cs
@@ -0,0 +1,136 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.Root.Namespaces;
+ using SysML2.NET.Core.Systems.Requirements;
+ using SysML2.NET.Core.DTO.Systems.Requirements;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class FramedConcernMembershipComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IFramedConcernMembership x, IFramedConcernMembership y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsImplied != y.IsImplied) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.Kind != y.Kind) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelatedElement, y.OwnedRelatedElement)) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelatedElement != y.OwningRelatedElement) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ if (x.Visibility != y.Visibility) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IFramedConcernMembership obj)
+ {
+ return HashCode.Combine(typeof(IFramedConcernMembership), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/LiteralIntegerComparer.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/LiteralIntegerComparer.cs
new file mode 100644
index 000000000..3aca24a47
--- /dev/null
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/LiteralIntegerComparer.cs
@@ -0,0 +1,149 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.DTO.Kernel.Expressions;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class LiteralIntegerComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(ILiteralInteger x, ILiteralInteger y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (x.Direction != y.Direction) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsComposite != y.IsComposite) return false;
+
+ if (x.IsConstant != y.IsConstant) return false;
+
+ if (x.IsDerived != y.IsDerived) return false;
+
+ if (x.IsEnd != y.IsEnd) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsOrdered != y.IsOrdered) return false;
+
+ if (x.IsPortion != y.IsPortion) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsUnique != y.IsUnique) return false;
+
+ if (x.IsVariable != y.IsVariable) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ if (x.Value != y.Value) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(ILiteralInteger obj)
+ {
+ return HashCode.Combine(typeof(ILiteralInteger), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/LiteralRationalComparer.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/LiteralRationalComparer.cs
new file mode 100644
index 000000000..03e258c17
--- /dev/null
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/LiteralRationalComparer.cs
@@ -0,0 +1,149 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.DTO.Kernel.Expressions;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class LiteralRationalComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(ILiteralRational x, ILiteralRational y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (x.Direction != y.Direction) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsComposite != y.IsComposite) return false;
+
+ if (x.IsConstant != y.IsConstant) return false;
+
+ if (x.IsDerived != y.IsDerived) return false;
+
+ if (x.IsEnd != y.IsEnd) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsOrdered != y.IsOrdered) return false;
+
+ if (x.IsPortion != y.IsPortion) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsUnique != y.IsUnique) return false;
+
+ if (x.IsVariable != y.IsVariable) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ if (FloatingPointComparer.NearlyEqual(x.Value, y.Value, FloatingPointComparer.DefaultDoubleEpsilon)) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(ILiteralRational obj)
+ {
+ return HashCode.Combine(typeof(ILiteralRational), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/MembershipComparer.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/MembershipComparer.cs
new file mode 100644
index 000000000..404836a4f
--- /dev/null
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/MembershipComparer.cs
@@ -0,0 +1,139 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.Root.Namespaces;
+ using SysML2.NET.Core.DTO.Root.Namespaces;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class MembershipComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IMembership x, IMembership y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsImplied != y.IsImplied) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.MemberElement != y.MemberElement) return false;
+
+ if (!OrdinalStringComparer.Equals(x.MemberName, y.MemberName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.MemberShortName, y.MemberShortName)) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelatedElement, y.OwnedRelatedElement)) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelatedElement != y.OwningRelatedElement) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ if (x.Visibility != y.Visibility) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IMembership obj)
+ {
+ return HashCode.Combine(typeof(IMembership), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/MultiplicityRangeComparer.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/MultiplicityRangeComparer.cs
new file mode 100644
index 000000000..d5acd64ea
--- /dev/null
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/MultiplicityRangeComparer.cs
@@ -0,0 +1,147 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.DTO.Kernel.Multiplicities;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class MultiplicityRangeComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IMultiplicityRange x, IMultiplicityRange y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (x.Direction != y.Direction) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsComposite != y.IsComposite) return false;
+
+ if (x.IsConstant != y.IsConstant) return false;
+
+ if (x.IsDerived != y.IsDerived) return false;
+
+ if (x.IsEnd != y.IsEnd) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsOrdered != y.IsOrdered) return false;
+
+ if (x.IsPortion != y.IsPortion) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsUnique != y.IsUnique) return false;
+
+ if (x.IsVariable != y.IsVariable) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IMultiplicityRange obj)
+ {
+ return HashCode.Combine(typeof(IMultiplicityRange), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/OwningMembershipComparer.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/OwningMembershipComparer.cs
new file mode 100644
index 000000000..b17495240
--- /dev/null
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/OwningMembershipComparer.cs
@@ -0,0 +1,133 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.Root.Namespaces;
+ using SysML2.NET.Core.DTO.Root.Namespaces;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class OwningMembershipComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IOwningMembership x, IOwningMembership y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsImplied != y.IsImplied) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelatedElement, y.OwnedRelatedElement)) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelatedElement != y.OwningRelatedElement) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ if (x.Visibility != y.Visibility) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IOwningMembership obj)
+ {
+ return HashCode.Combine(typeof(IOwningMembership), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/ReferenceSubsettingComparer.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/ReferenceSubsettingComparer.cs
new file mode 100644
index 000000000..f7249b328
--- /dev/null
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/ReferenceSubsettingComparer.cs
@@ -0,0 +1,132 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.DTO.Core.Features;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class ReferenceSubsettingComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IReferenceSubsetting x, IReferenceSubsetting y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsImplied != y.IsImplied) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelatedElement, y.OwnedRelatedElement)) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelatedElement != y.OwningRelatedElement) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ if (x.ReferencedFeature != y.ReferencedFeature) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IReferenceSubsetting obj)
+ {
+ return HashCode.Combine(typeof(IReferenceSubsetting), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/RequirementUsageComparer.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/RequirementUsageComparer.cs
new file mode 100644
index 000000000..a62c7cc1f
--- /dev/null
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/RequirementUsageComparer.cs
@@ -0,0 +1,152 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.Systems.Occurrences;
+ using SysML2.NET.Core.DTO.Systems.Requirements;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class RequirementUsageComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IRequirementUsage x, IRequirementUsage y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (x.Direction != y.Direction) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsComposite != y.IsComposite) return false;
+
+ if (x.IsConstant != y.IsConstant) return false;
+
+ if (x.IsDerived != y.IsDerived) return false;
+
+ if (x.IsEnd != y.IsEnd) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsIndividual != y.IsIndividual) return false;
+
+ if (x.IsOrdered != y.IsOrdered) return false;
+
+ if (x.IsPortion != y.IsPortion) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsUnique != y.IsUnique) return false;
+
+ if (x.IsVariation != y.IsVariation) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ if (x.PortionKind != y.PortionKind) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ReqId, y.ReqId)) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IRequirementUsage obj)
+ {
+ return HashCode.Combine(typeof(IRequirementUsage), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/SelectExpressionComparer.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/SelectExpressionComparer.cs
new file mode 100644
index 000000000..06113c5d2
--- /dev/null
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/SelectExpressionComparer.cs
@@ -0,0 +1,149 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.DTO.Kernel.Expressions;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class SelectExpressionComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(ISelectExpression x, ISelectExpression y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (x.Direction != y.Direction) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsComposite != y.IsComposite) return false;
+
+ if (x.IsConstant != y.IsConstant) return false;
+
+ if (x.IsDerived != y.IsDerived) return false;
+
+ if (x.IsEnd != y.IsEnd) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsOrdered != y.IsOrdered) return false;
+
+ if (x.IsPortion != y.IsPortion) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsUnique != y.IsUnique) return false;
+
+ if (x.IsVariable != y.IsVariable) return false;
+
+ if (!OrdinalStringComparer.Equals(x.Operator, y.Operator)) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(ISelectExpression obj)
+ {
+ return HashCode.Combine(typeof(ISelectExpression), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/SubclassificationComparer.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/SubclassificationComparer.cs
new file mode 100644
index 000000000..f4e341b15
--- /dev/null
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/SubclassificationComparer.cs
@@ -0,0 +1,134 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.DTO.Core.Classifiers;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class SubclassificationComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(ISubclassification x, ISubclassification y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsImplied != y.IsImplied) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelatedElement, y.OwnedRelatedElement)) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelatedElement != y.OwningRelatedElement) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ if (x.Subclassifier != y.Subclassifier) return false;
+
+ if (x.Superclassifier != y.Superclassifier) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(ISubclassification obj)
+ {
+ return HashCode.Combine(typeof(ISubclassification), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/TextualRepresentationComparer.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/TextualRepresentationComparer.cs
new file mode 100644
index 000000000..1f256011b
--- /dev/null
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/TextualRepresentationComparer.cs
@@ -0,0 +1,128 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.DTO.Root.Annotations;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class TextualRepresentationComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(ITextualRepresentation x, ITextualRepresentation y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.Body, y.Body)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (!OrdinalStringComparer.Equals(x.Language, y.Language)) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(ITextualRepresentation obj)
+ {
+ return HashCode.Combine(typeof(ITextualRepresentation), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/UsageComparer.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/UsageComparer.cs
new file mode 100644
index 000000000..925f3ccfc
--- /dev/null
+++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenDtoComparers/UsageComparer.cs
@@ -0,0 +1,147 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.DTO.Systems.DefinitionAndUsage;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class UsageComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IUsage x, IUsage y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (x.Direction != y.Direction) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsComposite != y.IsComposite) return false;
+
+ if (x.IsConstant != y.IsConstant) return false;
+
+ if (x.IsDerived != y.IsDerived) return false;
+
+ if (x.IsEnd != y.IsEnd) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsOrdered != y.IsOrdered) return false;
+
+ if (x.IsPortion != y.IsPortion) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsUnique != y.IsUnique) return false;
+
+ if (x.IsVariation != y.IsVariation) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IUsage obj)
+ {
+ return HashCode.Combine(typeof(IUsage), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/UmlCoreDtoComparerGeneratorTestFixture.cs b/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/UmlCoreDtoComparerGeneratorTestFixture.cs
new file mode 100644
index 000000000..03411d3e1
--- /dev/null
+++ b/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/UmlCoreDtoComparerGeneratorTestFixture.cs
@@ -0,0 +1,79 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.CodeGenerator.Tests.Generators.UmlHandleBarsGenerators
+{
+ using System.IO;
+ using System.Threading.Tasks;
+
+ using NUnit.Framework;
+
+ using SysML2.NET.CodeGenerator.Generators.UmlHandleBarsGenerators;
+ using SysML2.NET.CodeGenerator.Tests.Expected.Ecore.Core;
+
+ [TestFixture]
+ public class UmlCoreDtoComparerGeneratorTestFixture
+ {
+ private DirectoryInfo umlDtoComparerDirectoryInfo;
+ private UmlCoreDtoComparerGenerator umlCoreDtoComparerGenerator;
+
+ [OneTimeSetUp]
+ public void SetUp()
+ {
+ var directoryInfo = new DirectoryInfo(TestContext.CurrentContext.TestDirectory);
+
+ var path = Path.Combine("UML", "_SysML2.NET.Core.Extensions.AutoGenDtoComparers");
+
+ this.umlDtoComparerDirectoryInfo = directoryInfo.CreateSubdirectory(path);
+ this.umlCoreDtoComparerGenerator = new UmlCoreDtoComparerGenerator();
+ }
+
+ [Test]
+ public async Task Verify_that_DataTransferObjectComparers_are_generated()
+ {
+ await Assert.ThatAsync(() => this.umlCoreDtoComparerGenerator.GenerateAsync(GeneratorSetupFixture.XmiReaderResult,
+ this.umlDtoComparerDirectoryInfo),
+ Throws.Nothing);
+ }
+
+ [Test]
+ public async Task Verify_that_DataTransferObjectComparerProvider_is_generated()
+ {
+ await Assert.ThatAsync(() => this.umlCoreDtoComparerGenerator.GenerateDataTransferObjectComparerProviderAsync(GeneratorSetupFixture.XmiReaderResult,
+ this.umlDtoComparerDirectoryInfo),
+ Throws.Nothing);
+ }
+
+ [Test]
+ [TestCaseSource(typeof(ExpectedConcreteClasses))]
+ [Category("Expected")]
+ public async Task Verify_that_expected_Classes_are_generated(string className)
+ {
+ var generatedCode = await this.umlCoreDtoComparerGenerator.GenerateDataTransferObjectComparerAsync(GeneratorSetupFixture.XmiReaderResult,
+ this.umlDtoComparerDirectoryInfo,
+ className);
+
+ var expected = await File.ReadAllTextAsync(Path.Combine(TestContext.CurrentContext.TestDirectory,
+ $"Expected/UML/Core/AutoGenDtoComparers/{className}Comparer.cs"));
+
+ Assert.That(generatedCode, Is.EqualTo(expected));
+ }
+ }
+}
diff --git a/SysML2.NET.CodeGenerator.Tests/SysML2.NET.CodeGenerator.Tests.csproj b/SysML2.NET.CodeGenerator.Tests/SysML2.NET.CodeGenerator.Tests.csproj
index 13417d2ba..9b3ee45aa 100644
--- a/SysML2.NET.CodeGenerator.Tests/SysML2.NET.CodeGenerator.Tests.csproj
+++ b/SysML2.NET.CodeGenerator.Tests/SysML2.NET.CodeGenerator.Tests.csproj
@@ -24,6 +24,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -75,6 +94,63 @@
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
Always
diff --git a/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlCoreDtoComparerGenerator.cs b/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlCoreDtoComparerGenerator.cs
new file mode 100644
index 000000000..204d72175
--- /dev/null
+++ b/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlCoreDtoComparerGenerator.cs
@@ -0,0 +1,229 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright 2022-2025 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.CodeGenerator.Generators.UmlHandleBarsGenerators
+{
+ using System;
+ using System.IO;
+ using System.Linq;
+ using System.Threading.Tasks;
+
+ using SysML2.NET.CodeGenerator.Extensions;
+ using SysML2.NET.CodeGenerator.UmlHandleBarHelpers;
+
+ using uml4net.Extensions;
+ using uml4net.HandleBars;
+ using uml4net.StructuredClassifiers;
+ using uml4net.xmi.Readers;
+
+ ///
+ /// A UML Handlebars based DTO comparer code generator
+ ///
+ public class UmlCoreDtoComparerGenerator : UmlHandleBarsGenerator
+ {
+ ///
+ /// Generates the SysML2 DTO comparers
+ ///
+ ///
+ /// the that contains the UML model to generate from
+ ///
+ ///
+ /// The target
+ ///
+ ///
+ /// an awaitable
+ ///
+ public override async Task GenerateAsync(XmiReaderResult xmiReaderResult, DirectoryInfo outputDirectory)
+ {
+ await this.GenerateDataTransferObjectComparersAsync(xmiReaderResult, outputDirectory);
+ await this.GenerateDataTransferObjectComparerProviderAsync(xmiReaderResult, outputDirectory);
+ }
+
+ ///
+ /// Generates DTO Interfaces
+ ///
+ ///
+ /// the that contains the UML model to generate from
+ ///
+ ///
+ /// The target
+ ///
+ ///
+ /// an awaitable task
+ ///
+ public Task GenerateDataTransferObjectComparersAsync(XmiReaderResult xmiReaderResult, DirectoryInfo outputDirectory)
+ {
+ ArgumentNullException.ThrowIfNull(xmiReaderResult);
+ ArgumentNullException.ThrowIfNull(outputDirectory);
+
+ return this.GenerateDataTransferObjectComparersInternalAsync(xmiReaderResult, outputDirectory);
+ }
+
+ public Task GenerateDataTransferObjectComparerProviderAsync(XmiReaderResult xmiReaderResult, DirectoryInfo outputDirectory)
+ {
+ ArgumentNullException.ThrowIfNull(xmiReaderResult);
+ ArgumentNullException.ThrowIfNull(outputDirectory);
+
+ return this.GenerateDataTransferObjectComparerProviderInternalAsync(xmiReaderResult, outputDirectory);
+ }
+
+ ///
+ /// Generates DTO class
+ ///
+ ///
+ /// the that contains the UML model to generate from
+ ///
+ ///
+ /// The target
+ ///
+ ///
+ /// The name of the DTO class to generate
+ ///
+ ///
+ /// an awaitable task
+ ///
+ public Task GenerateDataTransferObjectComparerAsync(XmiReaderResult xmiReaderResult, DirectoryInfo outputDirectory, string name)
+ {
+ ArgumentNullException.ThrowIfNull(xmiReaderResult);
+ ArgumentNullException.ThrowIfNull(outputDirectory);
+ ArgumentException.ThrowIfNullOrWhiteSpace(name);
+
+ return this.GenerateDataTransferObjectComparerInternalAsync(xmiReaderResult, outputDirectory, name);
+ }
+
+ ///
+ /// Register the custom helpers
+ ///
+ protected override void RegisterHelpers()
+ {
+ this.Handlebars.RegisterStringHelper();
+ this.Handlebars.RegisterEnumerableHelper();
+ this.Handlebars.RegisterClassHelper();
+ this.Handlebars.RegisterPropertyHelper();
+ this.Handlebars.RegisterGeneralizationHelper();
+ this.Handlebars.RegisterDocumentationHelper();
+ this.Handlebars.RegisterEnumHelper();
+ this.Handlebars.RegisterDecoratorHelper();
+ this.Handlebars.RegisterNamedElementHelper();
+
+ EnumerationLiteralHelper.RegisterTypeNameHelper(this.Handlebars);
+ HandleBarHelpers.ClassHelper.RegisterClassHelper(this.Handlebars);
+ HandleBarHelpers.NamedElementHelper.RegisterNamedElementHelper(this.Handlebars);
+ HandleBarHelpers.PropertyHelper.RegisterPropertyHelper(this.Handlebars);
+ }
+
+ ///
+ /// Register the code templates
+ ///
+ protected override void RegisterTemplates()
+ {
+ this.RegisterTemplate("core-dto-comparer-class-uml-template");
+ this.RegisterTemplate("core-dto-comparerprovider-uml-template");
+ }
+
+ ///
+ /// Generates DTO classes
+ ///
+ ///
+ /// the that contains the UML model to generate from
+ ///
+ ///
+ /// The target
+ ///
+ ///
+ /// an awaitable task
+ ///
+ private async Task GenerateDataTransferObjectComparersInternalAsync(XmiReaderResult xmiReaderResult, DirectoryInfo outputDirectory)
+ {
+ var template = this.Templates["core-dto-comparer-class-uml-template"];
+
+ var classes = xmiReaderResult.QueryContainedAndImported("SysML")
+ .SelectMany(x => x.PackagedElement.OfType())
+ .Where(x => !x.IsAbstract)
+ .ToList();
+
+ foreach (var @class in classes)
+ {
+ var generatedDto = template(@class);
+
+ generatedDto = this.CodeCleanup(generatedDto);
+
+ var fileName = $"{@class.Name.CapitalizeFirstLetter()}Comparer.cs";
+
+ await WriteAsync(generatedDto, outputDirectory, fileName);
+ }
+ }
+
+ ///
+ /// Generates DTO classes
+ ///
+ ///
+ /// the that contains the UML model to generate from
+ ///
+ ///
+ /// The target
+ ///
+ ///
+ /// The name of the DTO class to generate
+ ///
+ ///
+ /// an awaitable task
+ ///
+ private async Task GenerateDataTransferObjectComparerInternalAsync(XmiReaderResult xmiReaderResult, DirectoryInfo outputDirectory, string name)
+ {
+ var template = this.Templates["core-dto-comparer-class-uml-template"];
+
+ var classes = xmiReaderResult.QueryContainedAndImported("SysML")
+ .SelectMany(x => x.PackagedElement.OfType());
+
+ var @class = classes.Single(x => x.Name == name);
+
+ var generatedDataTransferObjectClass = template(@class);
+
+ generatedDataTransferObjectClass = this.CodeCleanup(generatedDataTransferObjectClass);
+
+ var fileName = $"{@class.Name.CapitalizeFirstLetter()}Comparer.cs";
+
+ await WriteAsync(generatedDataTransferObjectClass, outputDirectory, fileName);
+
+ return generatedDataTransferObjectClass;
+ }
+
+ private async Task GenerateDataTransferObjectComparerProviderInternalAsync(XmiReaderResult xmiReaderResult, DirectoryInfo outputDirectory)
+ {
+ var template = this.Templates["core-dto-comparerprovider-uml-template"];
+
+ var classes = xmiReaderResult.QueryContainedAndImported("SysML")
+ .SelectMany(x => x.PackagedElement.OfType())
+ .Where(x => !x.IsAbstract)
+ .OrderBy(x => x.Name);
+
+ var generatedDataTransferObjectComparerProvider = template(classes);
+
+ generatedDataTransferObjectComparerProvider = template(classes);
+
+ generatedDataTransferObjectComparerProvider = this.CodeCleanup(generatedDataTransferObjectComparerProvider);
+
+ await WriteAsync(generatedDataTransferObjectComparerProvider, outputDirectory, "ComparerProvider.cs");
+
+ return generatedDataTransferObjectComparerProvider;
+ }
+ }
+}
diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/PropertyHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/PropertyHelper.cs
index c525fef78..97cda020d 100644
--- a/SysML2.NET.CodeGenerator/HandleBarHelpers/PropertyHelper.cs
+++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/PropertyHelper.cs
@@ -753,6 +753,102 @@ public static void RegisterPropertyHelper(this IHandlebars handlebars)
writer.WriteSafeString(sb);
});
+ handlebars.RegisterHelper("Property.WriteForDTOComparer", (writer, _, parameters) =>
+ {
+ if (parameters.Length != 2)
+ {
+ throw new HandlebarsException("{{#Property.WriteForDTOComparer}} helper must have exactly two arguments");
+ }
+
+ var property = (parameters[0] as IProperty)!;
+ var classContext = (parameters[1] as IClass)!;
+
+ var sb = new StringBuilder();
+ var propertyName = StringExtensions.CapitalizeFirstLetter(property.Name);
+ var isRedefinedPropertyInContext = property.TryQueryRedefinedByProperty(classContext, out var _);
+
+ if (isRedefinedPropertyInContext)
+ {
+ throw new InvalidOperationException("Property.WriteForDTOComparer is invalid for redefined properties");
+ }
+
+ if (property.IsDerived || property.IsDerivedUnion)
+ {
+ throw new InvalidOperationException("Property.WriteForDTOComparer is invalid for derived or derivedunion properties");
+ }
+
+ if (property.Type is IDataType)
+ {
+ if (property.QueryIsString())
+ {
+ if (property.QueryIsEnumerable())
+ {
+ if (property.IsOrdered)
+ {
+ sb.AppendLine($"if (!StringSequenceEquality.OrderedEqual(x.{propertyName}, y.{propertyName})) return false;");
+ }
+ else
+ {
+ sb.AppendLine($"if (!StringSequenceEquality.UnorderedEqual(x.{propertyName}, y.{propertyName})) return false;");
+ }
+ }
+ else
+ {
+ sb.AppendLine($"if (!OrdinalStringComparer.Equals(x.{propertyName}, y.{propertyName})) return false;");
+ }
+ }
+ else if (property.QueryIsDouble())
+ {
+ if (property.QueryIsNullable())
+ {
+ sb.AppendLine($"if (x.{propertyName}.HasValue != y.{propertyName}.HasValue) return false;");
+
+ sb.AppendLine($"if (x.{propertyName}.HasValue && FloatingPointComparer.NearlyEqual(x.{propertyName}, y.{propertyName}, FloatingPointComparer.DefaultDoubleEpsilon)) return false;");
+ }
+ else
+ {
+ sb.AppendLine($"if (FloatingPointComparer.NearlyEqual(x.{propertyName}, y.{propertyName}, FloatingPointComparer.DefaultDoubleEpsilon)) return false;");
+ }
+
+ }
+ else if (property.QueryIsFloat())
+ {
+ if (property.QueryIsNullable())
+ {
+ sb.AppendLine($"if (x.{propertyName}.HasValue != y.{propertyName}.HasValue) return false;");
+
+ sb.AppendLine($"if (x.{propertyName}.HasValue && FloatingPointComparer.NearlyEqual(x.{propertyName}, y.{propertyName}, FloatingPointComparer.DefaultFloatEpsilon)) return false;");
+ }
+
+ sb.AppendLine($"if (FloatingPointComparer.NearlyEqual(x.{propertyName}, y.{propertyName}, FloatingPointComparer.DefaultDoubleEpsilon)) return false;");
+ }
+ else
+ {
+ sb.AppendLine($"if (x.{propertyName} != y.{propertyName}) return false;");
+ }
+ }
+ else
+ {
+ if (property.QueryIsEnumerable())
+ {
+ if (property.IsOrdered)
+ {
+ sb.AppendLine($"if (!GuidSequenceEquality.OrderedEqual(x.{propertyName}, y.{propertyName})) return false;");
+ }
+ else
+ {
+ sb.AppendLine($"if (!GuidSequenceEquality.UnorderedEqual(x.{propertyName}, y.{propertyName})) return false;");
+ }
+ }
+ else
+ {
+ sb.AppendLine($"if (x.{propertyName} != y.{propertyName}) return false;");
+ }
+ }
+
+ writer.WriteSafeString(sb + Environment.NewLine);
+ });
+
handlebars.RegisterHelper("Property.IsPropertyRedefinedInClass", (context, arguments) =>
{
if (context.Value is not IProperty property)
@@ -861,7 +957,7 @@ public static void RegisterPropertyHelper(this IHandlebars handlebars)
writer.WriteSafeString($"{variableName}.{propertyName}");
}
});
-
+
handlebars.RegisterHelper("Property.IsOfTypeBaseElement", (_, arguments) =>
{
if (arguments.Single() is not IProperty property)
diff --git a/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj b/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj
index f7b14396b..6ae57eb58 100644
--- a/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj
+++ b/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj
@@ -118,6 +118,12 @@
Always
+
+ Always
+
+
+ Always
+
Always
diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/core-dto-comparer-class-uml-template.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/core-dto-comparer-class-uml-template.hbs
new file mode 100644
index 000000000..f853ed37c
--- /dev/null
+++ b/SysML2.NET.CodeGenerator/Templates/Uml/core-dto-comparer-class-uml-template.hbs
@@ -0,0 +1,116 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ {{ #Class.WriteEnumerationNameSpaces this}}
+ using SysML2.NET.Core.DTO.{{ #NamedElement.WriteFullyQualifiedNameSpace this }};
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class {{this.Name}}Comparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(I{{this.Name}} x, I{{this.Name}} y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ {{ #each (Class.QueryAllNonDerivedProperties this) as | property | }}
+ {{#unless (Property.IsPropertyRedefinedInClass this ../)}}
+ {{ #Property.WriteForDTOComparer property ../ }}
+ {{/unless}}
+ {{/each}}
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(I{{this.Name}} obj)
+ {
+ return HashCode.Combine(typeof(I{{this.Name}}), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/core-dto-comparerprovider-uml-template.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/core-dto-comparerprovider-uml-template.hbs
new file mode 100644
index 000000000..8e4c670b6
--- /dev/null
+++ b/SysML2.NET.CodeGenerator/Templates/Uml/core-dto-comparerprovider-uml-template.hbs
@@ -0,0 +1,169 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Common;
+
+ ///
+ /// Provides runtime access to equality comparers for DTO types.
+ ///
+ public static class ComparerProvider
+ {
+ private static readonly IReadOnlyDictionary> Comparers =
+ new Dictionary>
+ {
+ {{#each this as | class |}}
+ { typeof(SysML2.NET.Core.DTO.{{ #NamedElement.WriteFullyQualifiedNameSpace class }}.{{ class.Name }}), new Adapter(new {{ class.Name }}Comparer()) },
+ {{/each}}
+ };
+
+ ///
+ /// Resolves the equality comparer for the specified DTO runtime type.
+ ///
+ public static IEqualityComparer Resolve(Type dtoType)
+ {
+ if (dtoType == null)
+ {
+ throw new ArgumentNullException(nameof(dtoType));
+ }
+
+ if (!Comparers.TryGetValue(dtoType, out var comparer))
+ {
+ throw new NotSupportedException($"No equality comparer generated for DTO type '{dtoType.FullName}'.");
+ }
+
+ return comparer;
+ }
+
+ ///
+ /// Resolves the equality comparer for the runtime type of the given DTO.
+ ///
+ public static IEqualityComparer Resolve(IData dto)
+ {
+ if (dto == null)
+ {
+ throw new ArgumentNullException(nameof(dto));
+ }
+
+ return Resolve(dto.GetType());
+ }
+
+ ///
+ /// Adapts a strongly-typed comparer to .
+ /// This adapter exists solely to bridge generic invariance in C#.
+ ///
+ private sealed class Adapter : IEqualityComparer
+ where T : class, IData
+ {
+ private readonly IEqualityComparer inner;
+
+ ///
+ /// Initializes a new instance of the class
+ /// wrapping the specified strongly-typed comparer.
+ ///
+ ///
+ /// The generated equality comparer responsible for comparing instances
+ /// of .
+ ///
+ ///
+ /// Thrown when is null.
+ ///
+ public Adapter(IEqualityComparer inner)
+ {
+ this.inner = inner;
+ }
+
+ ///
+ /// Determines whether the specified instances are
+ /// equal by delegating to the wrapped .
+ ///
+ ///
+ /// The first object to compare.
+ ///
+ ///
+ /// The second object to compare.
+ ///
+ ///
+ /// true if and are
+ /// considered equal according to the wrapped comparer; otherwise,
+ /// false.
+ ///
+ ///
+ ///
+ /// If both references are identical, the method returns true
+ /// immediately. If either reference is null, the method returns
+ /// false.
+ ///
+ ///
+ /// Both arguments are expected to be instances of
+ /// . This invariant is guaranteed by
+ /// , which resolves adapters strictly
+ /// by the runtime type of the DTO.
+ ///
+ ///
+ public bool Equals(IData x, IData y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+ if (x is null || y is null) return false;
+
+ return this.inner.Equals((T)x, (T)y);
+ }
+
+ ///
+ /// Returns a hash code for the specified instance
+ /// by delegating to the wrapped .
+ ///
+ ///
+ /// The object for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code for , suitable for use in hash-based
+ /// collections when combined with the corresponding equality semantics.
+ ///
+ ///
+ ///
+ /// The hash code implementation is fully delegated to the wrapped
+ /// comparer and therefore remains consistent with its
+ /// semantics.
+ ///
+ ///
+ /// The adapter does not attempt to normalize or reinterpret the hash
+ /// code in any way.
+ ///
+ ///
+ public int GetHashCode(IData obj)
+ {
+ return this.inner.GetHashCode((T)obj);
+ }
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions.Tests/Comparers/FloatingPointComparerTestFixture.cs b/SysML2.NET.Extensions.Tests/Comparers/FloatingPointComparerTestFixture.cs
new file mode 100644
index 000000000..525364fe7
--- /dev/null
+++ b/SysML2.NET.Extensions.Tests/Comparers/FloatingPointComparerTestFixture.cs
@@ -0,0 +1,201 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Tests.Comparers
+{
+ using NUnit.Framework;
+
+ using SysML2.NET.Extensions.Comparers;
+
+ [TestFixture]
+ public class FloatingPointComparerTestFixture
+ {
+ [Test]
+ public void NearlyEqual_Double_WhenValuesAreExactlyEqual_ReturnsTrue()
+ {
+ Assert.That(FloatingPointComparer.NearlyEqual(1.234, 1.234), Is.True);
+ }
+
+ [Test]
+ public void NearlyEqual_Double_WhenValuesDifferWithinAbsoluteEpsilonNearZero_ReturnsTrue()
+ {
+ var epsilon = FloatingPointComparer.DefaultDoubleEpsilon;
+
+ Assert.That(FloatingPointComparer.NearlyEqual(0.0, epsilon * 0.5, epsilon), Is.True);
+ Assert.That(FloatingPointComparer.NearlyEqual(0.0, -epsilon * 0.5, epsilon), Is.True);
+ }
+
+ [Test]
+ public void NearlyEqual_Double_WhenValuesDifferMoreThanAbsoluteEpsilonNearZero_ReturnsFalse()
+ {
+ var epsilon = FloatingPointComparer.DefaultDoubleEpsilon;
+
+ Assert.That(FloatingPointComparer.NearlyEqual(0.0, epsilon * 2.0, epsilon), Is.False);
+ Assert.That(FloatingPointComparer.NearlyEqual(0.0, -epsilon * 2.0, epsilon), Is.False);
+ }
+
+ [Test]
+ public void NearlyEqual_Double_WhenValuesDifferWithinRelativeTolerance_ReturnsTrue()
+ {
+ // Ensure we are in the relative regime: epsilon*scale dominates epsilon.
+ // For left=1e9, right=1e9+0.5, scale≈2e9 => epsilon*scale≈2, so diff=0.5 should be true.
+ var epsilon = FloatingPointComparer.DefaultDoubleEpsilon;
+
+ var left = 1_000_000_000d;
+ var right = left + 0.5d;
+
+ Assert.That(FloatingPointComparer.NearlyEqual(left, right, epsilon), Is.True);
+ }
+
+ [Test]
+ public void NearlyEqual_Double_WhenValuesDifferOutsideRelativeTolerance_ReturnsFalse()
+ {
+ // For left=1e9, scale≈2e9 => epsilon*scale≈2, so diff=3 should be false.
+ var epsilon = FloatingPointComparer.DefaultDoubleEpsilon;
+
+ var left = 1_000_000_000d;
+ var right = left + 3d;
+
+ Assert.That(FloatingPointComparer.NearlyEqual(left, right, epsilon), Is.False);
+ }
+
+ [Test]
+ public void NearlyEqual_Double_WhenOneValueIsInfinityAndOtherIsSameInfinity_ReturnsTrue()
+ {
+ Assert.That(FloatingPointComparer.NearlyEqual(double.PositiveInfinity, double.PositiveInfinity), Is.True);
+ Assert.That(FloatingPointComparer.NearlyEqual(double.NegativeInfinity, double.NegativeInfinity), Is.True);
+ }
+
+ [Test]
+ public void NearlyEqual_Double_WhenOneValueIsInfinityAndOtherIsFinite_ReturnsFalse()
+ {
+ Assert.That(FloatingPointComparer.NearlyEqual(double.PositiveInfinity, 1.0), Is.False);
+ Assert.That(FloatingPointComparer.NearlyEqual(double.NegativeInfinity, -1.0), Is.False);
+ }
+
+ [Test]
+ public void NearlyEqual_Double_WhenEitherIsNaN_ReturnsFalse()
+ {
+ Assert.That(FloatingPointComparer.NearlyEqual(double.NaN, double.NaN), Is.False);
+ Assert.That(FloatingPointComparer.NearlyEqual(double.NaN, 0.0), Is.False);
+ Assert.That(FloatingPointComparer.NearlyEqual(0.0, double.NaN), Is.False);
+ }
+
+ [Test]
+ public void NearlyEqual_Float_WhenValuesAreExactlyEqual_ReturnsTrue()
+ {
+ Assert.That(FloatingPointComparer.NearlyEqual(1.234f, 1.234f), Is.True);
+ }
+
+ [Test]
+ public void NearlyEqual_Float_WhenValuesDifferWithinAbsoluteEpsilonNearZero_ReturnsTrue()
+ {
+ var epsilon = FloatingPointComparer.DefaultFloatEpsilon;
+
+ Assert.That(FloatingPointComparer.NearlyEqual(0f, epsilon * 0.5f, epsilon), Is.True);
+ Assert.That(FloatingPointComparer.NearlyEqual(0f, -epsilon * 0.5f, epsilon), Is.True);
+ }
+
+ [Test]
+ public void NearlyEqual_Float_WhenValuesDifferMoreThanAbsoluteEpsilonNearZero_ReturnsFalse()
+ {
+ var epsilon = FloatingPointComparer.DefaultFloatEpsilon;
+
+ Assert.That(FloatingPointComparer.NearlyEqual(0f, epsilon * 2f, epsilon), Is.False);
+ Assert.That(FloatingPointComparer.NearlyEqual(0f, -epsilon * 2f, epsilon), Is.False);
+ }
+
+ [Test]
+ public void NearlyEqual_Float_WhenValuesDifferWithinRelativeTolerance_ReturnsTrue()
+ {
+ // For left=1e6, scale≈2e6 => epsilon*scale≈2 (with epsilon=1e-6) so diff=0.5 should be true.
+ var epsilon = FloatingPointComparer.DefaultFloatEpsilon;
+
+ var left = 1_000_000f;
+ var right = left + 0.5f;
+
+ Assert.That(FloatingPointComparer.NearlyEqual(left, right, epsilon), Is.True);
+ }
+
+ [Test]
+ public void NearlyEqual_Float_WhenValuesDifferOutsideRelativeTolerance_ReturnsFalse()
+ {
+ // For left=1e6, scale≈2e6 => epsilon*scale≈2 so diff=3 should be false.
+ var epsilon = FloatingPointComparer.DefaultFloatEpsilon;
+
+ var left = 1_000_000f;
+ var right = left + 3f;
+
+ Assert.That(FloatingPointComparer.NearlyEqual(left, right, epsilon), Is.False);
+ }
+
+ [Test]
+ public void NearlyEqual_Float_WhenOneValueIsInfinityAndOtherIsSameInfinity_ReturnsTrue()
+ {
+ Assert.That(FloatingPointComparer.NearlyEqual(float.PositiveInfinity, float.PositiveInfinity), Is.True);
+ Assert.That(FloatingPointComparer.NearlyEqual(float.NegativeInfinity, float.NegativeInfinity), Is.True);
+ }
+
+ [Test]
+ public void NearlyEqual_Float_WhenOneValueIsInfinityAndOtherIsFinite_ReturnsFalse()
+ {
+ Assert.That(FloatingPointComparer.NearlyEqual(float.PositiveInfinity, 1f), Is.False);
+ Assert.That(FloatingPointComparer.NearlyEqual(float.NegativeInfinity, -1f), Is.False);
+ }
+
+ [Test]
+ public void NearlyEqual_Float_WhenEitherIsNaN_ReturnsFalse()
+ {
+ Assert.That(FloatingPointComparer.NearlyEqual(float.NaN, float.NaN), Is.False);
+ Assert.That(FloatingPointComparer.NearlyEqual(float.NaN, 0f), Is.False);
+ Assert.That(FloatingPointComparer.NearlyEqual(0f, float.NaN), Is.False);
+ }
+
+ [Test]
+ public void NearlyEqual_UsesProvidedEpsilon()
+ {
+ // Make epsilon big on purpose so the comparison returns true.
+ const double epsilon = 1e-3;
+
+ Assert.That(FloatingPointComparer.NearlyEqual(1.0, 1.0005, epsilon), Is.True);
+
+ // And small so it returns false.
+ const double smallEpsilon = 1e-9;
+
+ Assert.That(FloatingPointComparer.NearlyEqual(1.0, 1.0005, smallEpsilon), Is.False);
+ }
+
+ [Test]
+ public void NearlyEqual_IsSymmetric_ForRepresentativeValues()
+ {
+ var epsilonD = FloatingPointComparer.DefaultDoubleEpsilon;
+ var aD = 1_000_000_000d;
+ var bD = aD + 0.5d;
+
+ Assert.That(FloatingPointComparer.NearlyEqual(aD, bD, epsilonD), Is.EqualTo(FloatingPointComparer.NearlyEqual(bD, aD, epsilonD)));
+
+ var epsilonF = FloatingPointComparer.DefaultFloatEpsilon;
+ var aF = 1_000_000f;
+ var bF = aF + 0.5f;
+
+ Assert.That(FloatingPointComparer.NearlyEqual(aF, bF, epsilonF), Is.EqualTo(FloatingPointComparer.NearlyEqual(bF, aF, epsilonF)));
+ }
+ }
+}
diff --git a/SysML2.NET.Extensions.Tests/Comparers/GuidComparerTestFixture.cs b/SysML2.NET.Extensions.Tests/Comparers/GuidComparerTestFixture.cs
new file mode 100644
index 000000000..e3de342c6
--- /dev/null
+++ b/SysML2.NET.Extensions.Tests/Comparers/GuidComparerTestFixture.cs
@@ -0,0 +1,129 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright 2022-2025 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Tests.Comparers
+{
+ using System;
+
+ using NUnit.Framework;
+
+ using SysML2.NET.Extensions.Comparers;
+
+ [TestFixture]
+ public class GuidComparerTestFixture
+ {
+ private GuidComparer comparer;
+
+ [SetUp]
+ public void SetUp()
+ {
+ this.comparer = new GuidComparer();
+ }
+
+ [Test]
+ public void Verify_that_comparing_equal_guids_returns_zero()
+ {
+ var guid = Guid.NewGuid();
+
+ var result = this.comparer.Compare(guid, guid);
+
+ Assert.That(result, Is.EqualTo(0));
+ }
+
+ [Test]
+ public void Verify_that_comparing_two_identical_guid_values_returns_zero()
+ {
+ var guid = Guid.NewGuid();
+ var sameGuid = new Guid(guid.ToByteArray());
+
+ var result = this.comparer.Compare(guid, sameGuid);
+
+ Assert.That(result, Is.EqualTo(0));
+ }
+
+ [Test]
+ public void Verify_that_comparing_a_smaller_guid_with_a_larger_guid_returns_a_negative_value()
+ {
+ var smaller = Guid.Parse("00000000-0000-0000-0000-000000000001");
+ var larger = Guid.Parse("00000000-0000-0000-0000-000000000002");
+
+ var result = this.comparer.Compare(smaller, larger);
+
+ Assert.That(result, Is.LessThan(0));
+ }
+
+ [Test]
+ public void Verify_that_comparing_a_larger_guid_with_a_smaller_guid_returns_a_positive_value()
+ {
+ var smaller = Guid.Parse("00000000-0000-0000-0000-000000000001");
+ var larger = Guid.Parse("00000000-0000-0000-0000-000000000002");
+
+ var result = this.comparer.Compare(larger, smaller);
+
+ Assert.That(result, Is.GreaterThan(0));
+ }
+
+ [Test]
+ public void Verify_that_guid_comparison_is_symmetric()
+ {
+ var guidA = Guid.NewGuid();
+ var guidB = Guid.NewGuid();
+
+ var ab = this.comparer.Compare(guidA, guidB);
+ var ba = this.comparer.Compare(guidB, guidA);
+
+ Assert.That(ab, Is.EqualTo(-ba));
+ }
+
+ [Test]
+ public void Verify_that_guid_comparison_is_consistent_across_multiple_calls()
+ {
+ var guidA = Guid.NewGuid();
+ var guidB = Guid.NewGuid();
+
+ var first = this.comparer.Compare(guidA, guidB);
+ var second = this.comparer.Compare(guidA, guidB);
+
+ Assert.That(first, Is.EqualTo(second));
+ }
+
+ [Test]
+ public void Verify_that_empty_guid_is_less_than_any_non_empty_guid()
+ {
+ var empty = Guid.Empty;
+ var nonEmpty = Guid.NewGuid();
+
+ var result = this.comparer.Compare(empty, nonEmpty);
+
+ Assert.That(result, Is.LessThan(0));
+ }
+
+ [Test]
+ public void Verify_that_non_empty_guid_is_greater_than_empty_guid()
+ {
+ var empty = Guid.Empty;
+ var nonEmpty = Guid.NewGuid();
+
+ var result = this.comparer.Compare(nonEmpty, empty);
+
+ Assert.That(result, Is.GreaterThan(0));
+ }
+ }
+}
diff --git a/SysML2.NET.Extensions.Tests/Comparers/GuidSequenceEqualityTestFixture.cs b/SysML2.NET.Extensions.Tests/Comparers/GuidSequenceEqualityTestFixture.cs
new file mode 100644
index 000000000..35cef47f5
--- /dev/null
+++ b/SysML2.NET.Extensions.Tests/Comparers/GuidSequenceEqualityTestFixture.cs
@@ -0,0 +1,182 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright 2022-2025 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Tests.Comparers
+{
+ using System;
+ using System.Collections.Generic;
+ using NUnit.Framework;
+ using SysML2.NET.Extensions.Comparers;
+
+ [TestFixture]
+ public class GuidSequenceEqualityTestFixture
+ {
+ [Test]
+ public void Verify_that_ordered_equal_returns_true_for_the_same_reference()
+ {
+ var list = new List { Guid.NewGuid(), Guid.NewGuid() };
+
+ Assert.That(GuidSequenceEquality.OrderedEqual(list, list), Is.True);
+ }
+
+ [Test]
+ public void Verify_that_unordered_equal_returns_true_for_the_same_reference()
+ {
+ var list = new List { Guid.NewGuid(), Guid.NewGuid() };
+
+ Assert.That(GuidSequenceEquality.UnorderedEqual(list, list), Is.True);
+ }
+
+ [Test]
+ public void Verify_that_ordered_equal_returns_false_when_one_sequence_is_null()
+ {
+ var list = new List { Guid.NewGuid() };
+
+ Assert.That(GuidSequenceEquality.OrderedEqual(list, null), Is.False);
+ Assert.That(GuidSequenceEquality.OrderedEqual(null, list), Is.False);
+ }
+
+ [Test]
+ public void Verify_that_unordered_equal_returns_false_when_one_sequence_is_null()
+ {
+ var list = new List { Guid.NewGuid() };
+
+ Assert.That(GuidSequenceEquality.UnorderedEqual(list, null), Is.False);
+ Assert.That(GuidSequenceEquality.UnorderedEqual(null, list), Is.False);
+ }
+
+ [Test]
+ public void Verify_that_ordered_equal_returns_true_for_sequences_with_same_elements_in_same_order()
+ {
+ var g1 = Guid.NewGuid();
+ var g2 = Guid.NewGuid();
+
+ var a = new List { g1, g2 };
+ var b = new List { g1, g2 };
+
+ Assert.That(GuidSequenceEquality.OrderedEqual(a, b), Is.True);
+ }
+
+ [Test]
+ public void Verify_that_ordered_equal_returns_false_for_sequences_with_same_elements_in_different_order()
+ {
+ var g1 = Guid.NewGuid();
+ var g2 = Guid.NewGuid();
+
+ var a = new List { g1, g2 };
+ var b = new List { g2, g1 };
+
+ Assert.That(GuidSequenceEquality.OrderedEqual(a, b), Is.False);
+ }
+
+ [Test]
+ public void Verify_that_unordered_equal_returns_true_for_sequences_with_same_elements_in_different_order()
+ {
+ var g1 = Guid.NewGuid();
+ var g2 = Guid.NewGuid();
+
+ var a = new List { g1, g2 };
+ var b = new List { g2, g1 };
+
+ Assert.That(GuidSequenceEquality.UnorderedEqual(a, b), Is.True);
+ }
+
+ [Test]
+ public void Verify_that_ordered_equal_returns_false_for_sequences_with_different_lengths()
+ {
+ var g1 = Guid.NewGuid();
+
+ var a = new List { g1 };
+ var b = new List { g1, Guid.NewGuid() };
+
+ Assert.That(GuidSequenceEquality.OrderedEqual(a, b), Is.False);
+ }
+
+ [Test]
+ public void Verify_that_unordered_equal_returns_false_for_sequences_with_different_lengths()
+ {
+ var g1 = Guid.NewGuid();
+
+ var a = new List { g1 };
+ var b = new List { g1, Guid.NewGuid() };
+
+ Assert.That(GuidSequenceEquality.UnorderedEqual(a, b), Is.False);
+ }
+
+ [Test]
+ public void Verify_that_unordered_equal_correctly_handles_duplicate_guids()
+ {
+ var g1 = Guid.NewGuid();
+ var g2 = Guid.NewGuid();
+
+ var a = new List { g1, g1, g2 };
+ var b = new List { g2, g1, g1 };
+
+ Assert.That(GuidSequenceEquality.UnorderedEqual(a, b), Is.True);
+ }
+
+ [Test]
+ public void Verify_that_unordered_equal_returns_false_when_duplicate_multiplicity_differs()
+ {
+ var g1 = Guid.NewGuid();
+
+ var a = new List { g1, g1 };
+ var b = new List { g1 };
+
+ Assert.That(GuidSequenceEquality.UnorderedEqual(a, b), Is.False);
+ }
+
+ [Test]
+ public void Verify_that_ordered_equal_returns_false_when_any_element_differs()
+ {
+ var a = new List { Guid.NewGuid(), Guid.NewGuid() };
+ var b = new List { Guid.NewGuid(), Guid.NewGuid() };
+
+ Assert.That(GuidSequenceEquality.OrderedEqual(a, b), Is.False);
+ }
+
+ [Test]
+ public void Verify_that_unordered_equal_returns_false_when_any_element_differs()
+ {
+ var a = new List { Guid.NewGuid(), Guid.NewGuid() };
+ var b = new List { Guid.NewGuid(), Guid.NewGuid() };
+
+ Assert.That(GuidSequenceEquality.UnorderedEqual(a, b), Is.False);
+ }
+
+ [Test]
+ public void Verify_that_empty_sequences_are_considered_equal_for_ordered_comparison()
+ {
+ var a = new List();
+ var b = new List();
+
+ Assert.That(GuidSequenceEquality.OrderedEqual(a, b), Is.True);
+ }
+
+ [Test]
+ public void Verify_that_empty_sequences_are_considered_equal_for_unordered_comparison()
+ {
+ var a = new List();
+ var b = new List();
+
+ Assert.That(GuidSequenceEquality.UnorderedEqual(a, b), Is.True);
+ }
+ }
+}
diff --git a/SysML2.NET.Extensions.Tests/Comparers/StringSequenceEqualityTestFixture.cs b/SysML2.NET.Extensions.Tests/Comparers/StringSequenceEqualityTestFixture.cs
new file mode 100644
index 000000000..9823d4288
--- /dev/null
+++ b/SysML2.NET.Extensions.Tests/Comparers/StringSequenceEqualityTestFixture.cs
@@ -0,0 +1,204 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright 2022-2025 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Tests.Comparers
+{
+ using System;
+ using System.Collections.Generic;
+
+ using NUnit.Framework;
+
+ using SysML2.NET.Extensions.Comparers;
+
+
+ [TestFixture]
+ public class StringSequenceEqualityTestFixture
+ {
+ [Test]
+ public void Verify_that_ordered_equal_returns_true_for_the_same_reference()
+ {
+ var list = new List { "a", "b" };
+
+ Assert.That(StringSequenceEquality.OrderedEqual(list, list), Is.True);
+ }
+
+ [Test]
+ public void Verify_that_unordered_equal_returns_true_for_the_same_reference()
+ {
+ var list = new List { "a", "b" };
+
+ Assert.That(StringSequenceEquality.UnorderedEqual(list, list), Is.True);
+ }
+
+ [Test]
+ public void Verify_that_ordered_equal_returns_false_when_one_sequence_is_null()
+ {
+ var list = new List { "a" };
+
+ Assert.That(StringSequenceEquality.OrderedEqual(list, null), Is.False);
+ Assert.That(StringSequenceEquality.OrderedEqual(null, list), Is.False);
+ }
+
+ [Test]
+ public void Verify_that_unordered_equal_returns_false_when_one_sequence_is_null()
+ {
+ var list = new List { "a" };
+
+ Assert.That(StringSequenceEquality.UnorderedEqual(list, null), Is.False);
+ Assert.That(StringSequenceEquality.UnorderedEqual(null, list), Is.False);
+ }
+
+ [Test]
+ public void Verify_that_ordered_equal_returns_true_for_sequences_with_same_elements_in_same_order_using_default_ordinal_comparer()
+ {
+ var a = new List { "Alpha", "Beta" };
+ var b = new List { "Alpha", "Beta" };
+
+ Assert.That(StringSequenceEquality.OrderedEqual(a, b), Is.True);
+ }
+
+ [Test]
+ public void Verify_that_ordered_equal_returns_false_for_sequences_with_same_elements_in_different_order()
+ {
+ var a = new List { "Alpha", "Beta" };
+ var b = new List { "Beta", "Alpha" };
+
+ Assert.That(StringSequenceEquality.OrderedEqual(a, b), Is.False);
+ }
+
+ [Test]
+ public void Verify_that_unordered_equal_returns_true_for_sequences_with_same_elements_in_different_order()
+ {
+ var a = new List { "Alpha", "Beta" };
+ var b = new List { "Beta", "Alpha" };
+
+ Assert.That(StringSequenceEquality.UnorderedEqual(a, b), Is.True);
+ }
+
+ [Test]
+ public void Verify_that_ordered_equal_returns_false_for_sequences_with_different_lengths()
+ {
+ var a = new List { "Alpha" };
+ var b = new List { "Alpha", "Beta" };
+
+ Assert.That(StringSequenceEquality.OrderedEqual(a, b), Is.False);
+ }
+
+ [Test]
+ public void Verify_that_unordered_equal_returns_false_for_sequences_with_different_lengths()
+ {
+ var a = new List { "Alpha" };
+ var b = new List { "Alpha", "Beta" };
+
+ Assert.That(StringSequenceEquality.UnorderedEqual(a, b), Is.False);
+ }
+
+ [Test]
+ public void Verify_that_unordered_equal_correctly_handles_duplicate_values()
+ {
+ var a = new List { "Alpha", "Alpha", "Beta" };
+ var b = new List { "Beta", "Alpha", "Alpha" };
+
+ Assert.That(StringSequenceEquality.UnorderedEqual(a, b), Is.True);
+ }
+
+ [Test]
+ public void Verify_that_unordered_equal_returns_false_when_duplicate_multiplicity_differs()
+ {
+ var a = new List { "Alpha", "Alpha" };
+ var b = new List { "Alpha", "Beta" };
+
+ Assert.That(StringSequenceEquality.UnorderedEqual(a, b), Is.False);
+ }
+
+ [Test]
+ public void Verify_that_ordered_equal_returns_false_when_any_element_differs()
+ {
+ var a = new List { "Alpha", "Beta" };
+ var b = new List { "Alpha", "Gamma" };
+
+ Assert.That(StringSequenceEquality.OrderedEqual(a, b), Is.False);
+ }
+
+ [Test]
+ public void Verify_that_unordered_equal_returns_false_when_any_element_differs()
+ {
+ var a = new List { "Alpha", "Beta" };
+ var b = new List { "Alpha", "Gamma" };
+
+ Assert.That(StringSequenceEquality.UnorderedEqual(a, b), Is.False);
+ }
+
+ [Test]
+ public void Verify_that_empty_sequences_are_considered_equal_for_ordered_comparison()
+ {
+ var a = new List();
+ var b = new List();
+
+ Assert.That(StringSequenceEquality.OrderedEqual(a, b), Is.True);
+ }
+
+ [Test]
+ public void Verify_that_empty_sequences_are_considered_equal_for_unordered_comparison()
+ {
+ var a = new List();
+ var b = new List();
+
+ Assert.That(StringSequenceEquality.UnorderedEqual(a, b), Is.True);
+ }
+
+ [Test]
+ public void Verify_that_default_ordinal_comparison_is_case_sensitive()
+ {
+ var a = new List { "alpha" };
+ var b = new List { "ALPHA" };
+
+ Assert.That(StringSequenceEquality.OrderedEqual(a, b), Is.False);
+ Assert.That(StringSequenceEquality.UnorderedEqual(a, b), Is.False);
+ }
+
+ [Test]
+ public void Verify_that_a_custom_comparer_can_enable_case_insensitive_ordered_equality()
+ {
+ var a = new List { "alpha", "BETA" };
+ var b = new List { "ALPHA", "beta" };
+
+ Assert.That(StringSequenceEquality.OrderedEqual(a, b, StringComparer.OrdinalIgnoreCase), Is.True);
+ }
+
+ [Test]
+ public void Verify_that_a_custom_comparer_can_enable_case_insensitive_unordered_equality()
+ {
+ var a = new List { "alpha", "alpha", "BETA" };
+ var b = new List { "beta", "ALPHA", "ALPHA" };
+
+ Assert.That(StringSequenceEquality.UnorderedEqual(a, b, StringComparer.OrdinalIgnoreCase), Is.True);
+ }
+
+ [Test]
+ public void Verify_that_unordered_equal_returns_false_when_case_insensitive_comparer_is_not_used_and_casing_differs()
+ {
+ var a = new List { "alpha", "alpha", "BETA" };
+ var b = new List { "beta", "ALPHA", "ALPHA" };
+
+ Assert.That(StringSequenceEquality.UnorderedEqual(a, b), Is.False);
+ }
+ }
+}
diff --git a/SysML2.NET.Extensions/Comparers/FloatingPointComparer.cs b/SysML2.NET.Extensions/Comparers/FloatingPointComparer.cs
new file mode 100644
index 000000000..7d8eb739b
--- /dev/null
+++ b/SysML2.NET.Extensions/Comparers/FloatingPointComparer.cs
@@ -0,0 +1,77 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Comparers
+{
+ using System;
+
+ ///
+ /// Provides robust equality comparison helpers for floating-point values
+ /// using a combination of absolute and relative tolerance.
+ ///
+ public static class FloatingPointComparer
+ {
+ ///
+ /// Default epsilon for double-precision comparisons.
+ ///
+ public const double DefaultDoubleEpsilon = 1e-9;
+
+ ///
+ /// Default epsilon for single-precision comparisons.
+ ///
+ public const float DefaultFloatEpsilon = 1e-6f;
+
+ ///
+ /// Determines whether two values are nearly equal.
+ ///
+ public static bool NearlyEqual(double left, double right, double epsilon = DefaultDoubleEpsilon)
+ {
+ if (left == right)
+ {
+ return true;
+ }
+
+ var difference = Math.Abs(left - right);
+ var scale = Math.Min(
+ Math.Abs(left) + Math.Abs(right),
+ double.MaxValue);
+
+ return difference <= Math.Max(epsilon, epsilon * scale);
+ }
+
+ ///
+ /// Determines whether two values are nearly equal.
+ ///
+ public static bool NearlyEqual(float left, float right, float epsilon = DefaultFloatEpsilon)
+ {
+ if (left == right)
+ {
+ return true;
+ }
+
+ var difference = Math.Abs(left - right);
+ var scale = Math.Min(
+ Math.Abs(left) + Math.Abs(right),
+ float.MaxValue);
+
+ return difference <= Math.Max(epsilon, epsilon * scale);
+ }
+ }
+}
diff --git a/SysML2.NET.Extensions/Comparers/GuidSequenceEquality.cs b/SysML2.NET.Extensions/Comparers/GuidSequenceEquality.cs
new file mode 100644
index 000000000..cf8117dbc
--- /dev/null
+++ b/SysML2.NET.Extensions/Comparers/GuidSequenceEquality.cs
@@ -0,0 +1,130 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Comparers
+{
+ using System;
+ using System.Collections.Generic;
+
+ ///
+ /// Provides utility methods for comparing sequences of values
+ /// according to ordered and unordered equality semantics.
+ ///
+ public static class GuidSequenceEquality
+ {
+ ///
+ /// Determines whether two sequences of values are equal
+ /// using an ordered (positional) comparison.
+ ///
+ ///
+ /// The first sequence to compare. The order of elements is significant.
+ ///
+ ///
+ /// The second sequence to compare. The order of elements is significant.
+ ///
+ ///
+ /// true if both sequences contain the same number of elements and each
+ /// element in is equal to the corresponding element in
+ /// at the same position; otherwise, false.
+ ///
+ ///
+ /// This method performs a fast, allocation-free comparison and is suitable
+ /// for properties with isOrdered = true semantics in the metamodel.
+ ///
+ public static bool OrderedEqual(IReadOnlyList a, IReadOnlyList b)
+ {
+ if (ReferenceEquals(a, b)) return true;
+ if (a is null || b is null) return false;
+
+ var count = a.Count;
+ if (count != b.Count) return false;
+
+ for (var i = 0; i < count; i++)
+ {
+ if (a[i] != b[i]) return false;
+ }
+
+ return true;
+ }
+
+ ///
+ /// Determines whether two sequences of values are equal
+ /// regardless of element ordering.
+ ///
+ ///
+ /// The first sequence to compare. Element order is ignored.
+ ///
+ ///
+ /// The second sequence to compare. Element order is ignored.
+ ///
+ ///
+ /// true if both sequences contain the same elements with the same
+ /// multiplicities, independent of order; otherwise, false.
+ ///
+ ///
+ /// This method uses a hash-based comparison and correctly handles duplicate
+ /// values. It is suitable for properties with isOrdered = false
+ /// semantics in the metamodel.
+ ///
+ public static bool UnorderedEqual(IReadOnlyList a, IReadOnlyList b)
+ {
+ if (ReferenceEquals(a, b)) return true;
+ if (a is null || b is null) return false;
+
+ var count = a.Count;
+ if (count != b.Count) return false;
+
+ var counts = new Dictionary(count);
+
+ for (var i = 0; i < count; i++)
+ {
+ var key = a[i];
+ if (counts.TryGetValue(key, out var existing))
+ {
+ counts[key] = existing + 1;
+ }
+ else
+ {
+ counts.Add(key, 1);
+ }
+ }
+
+ for (var i = 0; i < count; i++)
+ {
+ var key = b[i];
+ if (!counts.TryGetValue(key, out var existing))
+ {
+ return false;
+ }
+
+ if (existing == 1)
+ {
+ counts.Remove(key);
+ }
+ else
+ {
+ counts[key] = existing - 1;
+ }
+ }
+
+ return counts.Count == 0;
+ }
+ }
+}
diff --git a/SysML2.NET.Extensions/Comparers/StringSequenceEquality.cs b/SysML2.NET.Extensions/Comparers/StringSequenceEquality.cs
new file mode 100644
index 000000000..7d19d7d30
--- /dev/null
+++ b/SysML2.NET.Extensions/Comparers/StringSequenceEquality.cs
@@ -0,0 +1,113 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright 2022-2025 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Comparers
+{
+ using System;
+ using System.Collections.Generic;
+
+ ///
+ /// Provides utility methods for comparing sequences of values
+ /// using ordered and unordered equality semantics.
+ ///
+ ///
+ /// All comparisons performed by this class use ordinal string semantics
+ /// by default (), ensuring deterministic,
+ /// culture-independent behavior suitable for identifiers, names, and other
+ /// model-level string values.
+ ///
+ public static class StringSequenceEquality
+ {
+ ///
+ /// Determines whether two string sequences are equal using an ordered
+ /// (positional) comparison with ordinal semantics.
+ ///
+ public static bool OrderedEqual(IReadOnlyList a, IReadOnlyList b, StringComparer comparer = null)
+ {
+ comparer ??= StringComparer.Ordinal;
+
+ if (ReferenceEquals(a, b)) return true;
+ if (a is null || b is null) return false;
+
+ var count = a.Count;
+ if (count != b.Count) return false;
+
+ for (var i = 0; i < count; i++)
+ {
+ if (!comparer.Equals(a[i], b[i]))
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ ///
+ /// Determines whether two string sequences are equal regardless of order,
+ /// using ordinal semantics.
+ ///
+ public static bool UnorderedEqual(IReadOnlyList a, IReadOnlyList b, StringComparer comparer = null)
+ {
+ comparer ??= StringComparer.Ordinal;
+
+ if (ReferenceEquals(a, b)) return true;
+ if (a is null || b is null) return false;
+
+ var count = a.Count;
+ if (count != b.Count) return false;
+
+ var set = new Dictionary(count, comparer);
+
+ for (var i = 0; i < count; i++)
+ {
+ var value = a[i];
+ if (set.TryGetValue(value, out var current))
+ {
+ set[value] = current + 1;
+ }
+ else
+ {
+ set[value] = 1;
+ }
+ }
+
+ for (var i = 0; i < count; i++)
+ {
+ var value = b[i];
+ if (!set.TryGetValue(value, out var current))
+ {
+ return false;
+ }
+
+ if (current == 1)
+ {
+ set.Remove(value);
+ }
+ else
+ {
+ set[value] = current - 1;
+ }
+ }
+
+ return set.Count == 0;
+ }
+ }
+}
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AcceptActionUsageComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AcceptActionUsageComparer.cs
new file mode 100644
index 000000000..ab72e1281
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AcceptActionUsageComparer.cs
@@ -0,0 +1,152 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.Systems.Occurrences;
+ using SysML2.NET.Core.DTO.Systems.Actions;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class AcceptActionUsageComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IAcceptActionUsage x, IAcceptActionUsage y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (x.Direction != y.Direction) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsComposite != y.IsComposite) return false;
+
+ if (x.IsConstant != y.IsConstant) return false;
+
+ if (x.IsDerived != y.IsDerived) return false;
+
+ if (x.IsEnd != y.IsEnd) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsIndividual != y.IsIndividual) return false;
+
+ if (x.IsOrdered != y.IsOrdered) return false;
+
+ if (x.IsPortion != y.IsPortion) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsUnique != y.IsUnique) return false;
+
+ if (x.IsVariation != y.IsVariation) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ if (x.PortionKind != y.PortionKind) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IAcceptActionUsage obj)
+ {
+ return HashCode.Combine(typeof(IAcceptActionUsage), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/ActionDefinitionComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/ActionDefinitionComparer.cs
new file mode 100644
index 000000000..f0ac75e13
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/ActionDefinitionComparer.cs
@@ -0,0 +1,132 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.DTO.Systems.Actions;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class ActionDefinitionComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IActionDefinition x, IActionDefinition y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsIndividual != y.IsIndividual) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsVariation != y.IsVariation) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IActionDefinition obj)
+ {
+ return HashCode.Combine(typeof(IActionDefinition), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/ActionUsageComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/ActionUsageComparer.cs
new file mode 100644
index 000000000..2ff6e020c
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/ActionUsageComparer.cs
@@ -0,0 +1,152 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.Systems.Occurrences;
+ using SysML2.NET.Core.DTO.Systems.Actions;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class ActionUsageComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IActionUsage x, IActionUsage y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (x.Direction != y.Direction) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsComposite != y.IsComposite) return false;
+
+ if (x.IsConstant != y.IsConstant) return false;
+
+ if (x.IsDerived != y.IsDerived) return false;
+
+ if (x.IsEnd != y.IsEnd) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsIndividual != y.IsIndividual) return false;
+
+ if (x.IsOrdered != y.IsOrdered) return false;
+
+ if (x.IsPortion != y.IsPortion) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsUnique != y.IsUnique) return false;
+
+ if (x.IsVariation != y.IsVariation) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ if (x.PortionKind != y.PortionKind) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IActionUsage obj)
+ {
+ return HashCode.Combine(typeof(IActionUsage), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/ActorMembershipComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/ActorMembershipComparer.cs
new file mode 100644
index 000000000..248e487fd
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/ActorMembershipComparer.cs
@@ -0,0 +1,133 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.Root.Namespaces;
+ using SysML2.NET.Core.DTO.Systems.Requirements;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class ActorMembershipComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IActorMembership x, IActorMembership y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsImplied != y.IsImplied) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelatedElement, y.OwnedRelatedElement)) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelatedElement != y.OwningRelatedElement) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ if (x.Visibility != y.Visibility) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IActorMembership obj)
+ {
+ return HashCode.Combine(typeof(IActorMembership), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AllocationDefinitionComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AllocationDefinitionComparer.cs
new file mode 100644
index 000000000..78610f3de
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AllocationDefinitionComparer.cs
@@ -0,0 +1,138 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.DTO.Systems.Allocations;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class AllocationDefinitionComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IAllocationDefinition x, IAllocationDefinition y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsImplied != y.IsImplied) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsIndividual != y.IsIndividual) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsVariation != y.IsVariation) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelatedElement, y.OwnedRelatedElement)) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelatedElement != y.OwningRelatedElement) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IAllocationDefinition obj)
+ {
+ return HashCode.Combine(typeof(IAllocationDefinition), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AllocationUsageComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AllocationUsageComparer.cs
new file mode 100644
index 000000000..02bc7025d
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AllocationUsageComparer.cs
@@ -0,0 +1,158 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.Systems.Occurrences;
+ using SysML2.NET.Core.DTO.Systems.Allocations;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class AllocationUsageComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IAllocationUsage x, IAllocationUsage y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (x.Direction != y.Direction) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsComposite != y.IsComposite) return false;
+
+ if (x.IsConstant != y.IsConstant) return false;
+
+ if (x.IsDerived != y.IsDerived) return false;
+
+ if (x.IsEnd != y.IsEnd) return false;
+
+ if (x.IsImplied != y.IsImplied) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsIndividual != y.IsIndividual) return false;
+
+ if (x.IsOrdered != y.IsOrdered) return false;
+
+ if (x.IsPortion != y.IsPortion) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsUnique != y.IsUnique) return false;
+
+ if (x.IsVariation != y.IsVariation) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelatedElement, y.OwnedRelatedElement)) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelatedElement != y.OwningRelatedElement) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ if (x.PortionKind != y.PortionKind) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IAllocationUsage obj)
+ {
+ return HashCode.Combine(typeof(IAllocationUsage), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AnalysisCaseDefinitionComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AnalysisCaseDefinitionComparer.cs
new file mode 100644
index 000000000..d51e8e9be
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AnalysisCaseDefinitionComparer.cs
@@ -0,0 +1,132 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.DTO.Systems.AnalysisCases;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class AnalysisCaseDefinitionComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IAnalysisCaseDefinition x, IAnalysisCaseDefinition y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsIndividual != y.IsIndividual) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsVariation != y.IsVariation) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IAnalysisCaseDefinition obj)
+ {
+ return HashCode.Combine(typeof(IAnalysisCaseDefinition), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AnalysisCaseUsageComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AnalysisCaseUsageComparer.cs
new file mode 100644
index 000000000..e5a331e49
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AnalysisCaseUsageComparer.cs
@@ -0,0 +1,152 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.Systems.Occurrences;
+ using SysML2.NET.Core.DTO.Systems.AnalysisCases;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class AnalysisCaseUsageComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IAnalysisCaseUsage x, IAnalysisCaseUsage y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (x.Direction != y.Direction) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsComposite != y.IsComposite) return false;
+
+ if (x.IsConstant != y.IsConstant) return false;
+
+ if (x.IsDerived != y.IsDerived) return false;
+
+ if (x.IsEnd != y.IsEnd) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsIndividual != y.IsIndividual) return false;
+
+ if (x.IsOrdered != y.IsOrdered) return false;
+
+ if (x.IsPortion != y.IsPortion) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsUnique != y.IsUnique) return false;
+
+ if (x.IsVariation != y.IsVariation) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ if (x.PortionKind != y.PortionKind) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IAnalysisCaseUsage obj)
+ {
+ return HashCode.Combine(typeof(IAnalysisCaseUsage), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AnnotatingElementComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AnnotatingElementComparer.cs
new file mode 100644
index 000000000..eab4d38d8
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AnnotatingElementComparer.cs
@@ -0,0 +1,124 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.DTO.Root.Annotations;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class AnnotatingElementComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IAnnotatingElement x, IAnnotatingElement y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IAnnotatingElement obj)
+ {
+ return HashCode.Combine(typeof(IAnnotatingElement), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AnnotationComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AnnotationComparer.cs
new file mode 100644
index 000000000..80d22db2f
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AnnotationComparer.cs
@@ -0,0 +1,132 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.DTO.Root.Annotations;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class AnnotationComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IAnnotation x, IAnnotation y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (x.AnnotatedElement != y.AnnotatedElement) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsImplied != y.IsImplied) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelatedElement, y.OwnedRelatedElement)) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelatedElement != y.OwningRelatedElement) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IAnnotation obj)
+ {
+ return HashCode.Combine(typeof(IAnnotation), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AssertConstraintUsageComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AssertConstraintUsageComparer.cs
new file mode 100644
index 000000000..dcd4814bf
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AssertConstraintUsageComparer.cs
@@ -0,0 +1,154 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.Systems.Occurrences;
+ using SysML2.NET.Core.DTO.Systems.Constraints;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class AssertConstraintUsageComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IAssertConstraintUsage x, IAssertConstraintUsage y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (x.Direction != y.Direction) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsComposite != y.IsComposite) return false;
+
+ if (x.IsConstant != y.IsConstant) return false;
+
+ if (x.IsDerived != y.IsDerived) return false;
+
+ if (x.IsEnd != y.IsEnd) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsIndividual != y.IsIndividual) return false;
+
+ if (x.IsNegated != y.IsNegated) return false;
+
+ if (x.IsOrdered != y.IsOrdered) return false;
+
+ if (x.IsPortion != y.IsPortion) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsUnique != y.IsUnique) return false;
+
+ if (x.IsVariation != y.IsVariation) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ if (x.PortionKind != y.PortionKind) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IAssertConstraintUsage obj)
+ {
+ return HashCode.Combine(typeof(IAssertConstraintUsage), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AssignmentActionUsageComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AssignmentActionUsageComparer.cs
new file mode 100644
index 000000000..6fa054f26
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AssignmentActionUsageComparer.cs
@@ -0,0 +1,152 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.Systems.Occurrences;
+ using SysML2.NET.Core.DTO.Systems.Actions;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class AssignmentActionUsageComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IAssignmentActionUsage x, IAssignmentActionUsage y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (x.Direction != y.Direction) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsComposite != y.IsComposite) return false;
+
+ if (x.IsConstant != y.IsConstant) return false;
+
+ if (x.IsDerived != y.IsDerived) return false;
+
+ if (x.IsEnd != y.IsEnd) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsIndividual != y.IsIndividual) return false;
+
+ if (x.IsOrdered != y.IsOrdered) return false;
+
+ if (x.IsPortion != y.IsPortion) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsUnique != y.IsUnique) return false;
+
+ if (x.IsVariation != y.IsVariation) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ if (x.PortionKind != y.PortionKind) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IAssignmentActionUsage obj)
+ {
+ return HashCode.Combine(typeof(IAssignmentActionUsage), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AssociationComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AssociationComparer.cs
new file mode 100644
index 000000000..21a8b5bdf
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AssociationComparer.cs
@@ -0,0 +1,134 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.DTO.Kernel.Associations;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class AssociationComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IAssociation x, IAssociation y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsImplied != y.IsImplied) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelatedElement, y.OwnedRelatedElement)) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelatedElement != y.OwningRelatedElement) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IAssociation obj)
+ {
+ return HashCode.Combine(typeof(IAssociation), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AssociationStructureComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AssociationStructureComparer.cs
new file mode 100644
index 000000000..f5ef44b25
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AssociationStructureComparer.cs
@@ -0,0 +1,134 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.DTO.Kernel.Associations;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class AssociationStructureComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IAssociationStructure x, IAssociationStructure y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsImplied != y.IsImplied) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelatedElement, y.OwnedRelatedElement)) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelatedElement != y.OwningRelatedElement) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IAssociationStructure obj)
+ {
+ return HashCode.Combine(typeof(IAssociationStructure), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AttributeDefinitionComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AttributeDefinitionComparer.cs
new file mode 100644
index 000000000..6ffdb83c6
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AttributeDefinitionComparer.cs
@@ -0,0 +1,130 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.DTO.Systems.Attributes;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class AttributeDefinitionComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IAttributeDefinition x, IAttributeDefinition y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsVariation != y.IsVariation) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IAttributeDefinition obj)
+ {
+ return HashCode.Combine(typeof(IAttributeDefinition), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AttributeUsageComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AttributeUsageComparer.cs
new file mode 100644
index 000000000..421822dc7
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/AttributeUsageComparer.cs
@@ -0,0 +1,147 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.DTO.Systems.Attributes;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class AttributeUsageComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IAttributeUsage x, IAttributeUsage y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (x.Direction != y.Direction) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsComposite != y.IsComposite) return false;
+
+ if (x.IsConstant != y.IsConstant) return false;
+
+ if (x.IsDerived != y.IsDerived) return false;
+
+ if (x.IsEnd != y.IsEnd) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsOrdered != y.IsOrdered) return false;
+
+ if (x.IsPortion != y.IsPortion) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsUnique != y.IsUnique) return false;
+
+ if (x.IsVariation != y.IsVariation) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IAttributeUsage obj)
+ {
+ return HashCode.Combine(typeof(IAttributeUsage), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/BehaviorComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/BehaviorComparer.cs
new file mode 100644
index 000000000..cca506d35
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/BehaviorComparer.cs
@@ -0,0 +1,128 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.DTO.Kernel.Behaviors;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class BehaviorComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IBehavior x, IBehavior y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IBehavior obj)
+ {
+ return HashCode.Combine(typeof(IBehavior), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/BindingConnectorAsUsageComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/BindingConnectorAsUsageComparer.cs
new file mode 100644
index 000000000..a0b14e92a
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/BindingConnectorAsUsageComparer.cs
@@ -0,0 +1,153 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.DTO.Systems.Connections;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class BindingConnectorAsUsageComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IBindingConnectorAsUsage x, IBindingConnectorAsUsage y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (x.Direction != y.Direction) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsComposite != y.IsComposite) return false;
+
+ if (x.IsConstant != y.IsConstant) return false;
+
+ if (x.IsDerived != y.IsDerived) return false;
+
+ if (x.IsEnd != y.IsEnd) return false;
+
+ if (x.IsImplied != y.IsImplied) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsOrdered != y.IsOrdered) return false;
+
+ if (x.IsPortion != y.IsPortion) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsUnique != y.IsUnique) return false;
+
+ if (x.IsVariation != y.IsVariation) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelatedElement, y.OwnedRelatedElement)) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelatedElement != y.OwningRelatedElement) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IBindingConnectorAsUsage obj)
+ {
+ return HashCode.Combine(typeof(IBindingConnectorAsUsage), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/BindingConnectorComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/BindingConnectorComparer.cs
new file mode 100644
index 000000000..971212f54
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/BindingConnectorComparer.cs
@@ -0,0 +1,153 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.DTO.Kernel.Connectors;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class BindingConnectorComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IBindingConnector x, IBindingConnector y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (x.Direction != y.Direction) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsComposite != y.IsComposite) return false;
+
+ if (x.IsConstant != y.IsConstant) return false;
+
+ if (x.IsDerived != y.IsDerived) return false;
+
+ if (x.IsEnd != y.IsEnd) return false;
+
+ if (x.IsImplied != y.IsImplied) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsOrdered != y.IsOrdered) return false;
+
+ if (x.IsPortion != y.IsPortion) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsUnique != y.IsUnique) return false;
+
+ if (x.IsVariable != y.IsVariable) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelatedElement, y.OwnedRelatedElement)) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelatedElement != y.OwningRelatedElement) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IBindingConnector obj)
+ {
+ return HashCode.Combine(typeof(IBindingConnector), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/BooleanExpressionComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/BooleanExpressionComparer.cs
new file mode 100644
index 000000000..2056e1382
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/BooleanExpressionComparer.cs
@@ -0,0 +1,147 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.DTO.Kernel.Functions;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class BooleanExpressionComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IBooleanExpression x, IBooleanExpression y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (x.Direction != y.Direction) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsComposite != y.IsComposite) return false;
+
+ if (x.IsConstant != y.IsConstant) return false;
+
+ if (x.IsDerived != y.IsDerived) return false;
+
+ if (x.IsEnd != y.IsEnd) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsOrdered != y.IsOrdered) return false;
+
+ if (x.IsPortion != y.IsPortion) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsUnique != y.IsUnique) return false;
+
+ if (x.IsVariable != y.IsVariable) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IBooleanExpression obj)
+ {
+ return HashCode.Combine(typeof(IBooleanExpression), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/CalculationDefinitionComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/CalculationDefinitionComparer.cs
new file mode 100644
index 000000000..ca751035d
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/CalculationDefinitionComparer.cs
@@ -0,0 +1,132 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.DTO.Systems.Calculations;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class CalculationDefinitionComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(ICalculationDefinition x, ICalculationDefinition y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsIndividual != y.IsIndividual) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsVariation != y.IsVariation) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(ICalculationDefinition obj)
+ {
+ return HashCode.Combine(typeof(ICalculationDefinition), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/CalculationUsageComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/CalculationUsageComparer.cs
new file mode 100644
index 000000000..5894715fd
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/CalculationUsageComparer.cs
@@ -0,0 +1,152 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.Systems.Occurrences;
+ using SysML2.NET.Core.DTO.Systems.Calculations;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class CalculationUsageComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(ICalculationUsage x, ICalculationUsage y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (x.Direction != y.Direction) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsComposite != y.IsComposite) return false;
+
+ if (x.IsConstant != y.IsConstant) return false;
+
+ if (x.IsDerived != y.IsDerived) return false;
+
+ if (x.IsEnd != y.IsEnd) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsIndividual != y.IsIndividual) return false;
+
+ if (x.IsOrdered != y.IsOrdered) return false;
+
+ if (x.IsPortion != y.IsPortion) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsUnique != y.IsUnique) return false;
+
+ if (x.IsVariation != y.IsVariation) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ if (x.PortionKind != y.PortionKind) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(ICalculationUsage obj)
+ {
+ return HashCode.Combine(typeof(ICalculationUsage), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/CaseDefinitionComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/CaseDefinitionComparer.cs
new file mode 100644
index 000000000..2d20d8e5a
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/CaseDefinitionComparer.cs
@@ -0,0 +1,132 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.DTO.Systems.Cases;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class CaseDefinitionComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(ICaseDefinition x, ICaseDefinition y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsIndividual != y.IsIndividual) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsVariation != y.IsVariation) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(ICaseDefinition obj)
+ {
+ return HashCode.Combine(typeof(ICaseDefinition), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/CaseUsageComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/CaseUsageComparer.cs
new file mode 100644
index 000000000..b25da2b8d
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/CaseUsageComparer.cs
@@ -0,0 +1,152 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.Systems.Occurrences;
+ using SysML2.NET.Core.DTO.Systems.Cases;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class CaseUsageComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(ICaseUsage x, ICaseUsage y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (x.Direction != y.Direction) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsComposite != y.IsComposite) return false;
+
+ if (x.IsConstant != y.IsConstant) return false;
+
+ if (x.IsDerived != y.IsDerived) return false;
+
+ if (x.IsEnd != y.IsEnd) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsIndividual != y.IsIndividual) return false;
+
+ if (x.IsOrdered != y.IsOrdered) return false;
+
+ if (x.IsPortion != y.IsPortion) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsUnique != y.IsUnique) return false;
+
+ if (x.IsVariation != y.IsVariation) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ if (x.PortionKind != y.PortionKind) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(ICaseUsage obj)
+ {
+ return HashCode.Combine(typeof(ICaseUsage), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/ClassComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/ClassComparer.cs
new file mode 100644
index 000000000..6de09b78c
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/ClassComparer.cs
@@ -0,0 +1,128 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.DTO.Kernel.Classes;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class ClassComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IClass x, IClass y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IClass obj)
+ {
+ return HashCode.Combine(typeof(IClass), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/ClassifierComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/ClassifierComparer.cs
new file mode 100644
index 000000000..25de7b397
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/ClassifierComparer.cs
@@ -0,0 +1,128 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.DTO.Core.Classifiers;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class ClassifierComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IClassifier x, IClassifier y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IClassifier obj)
+ {
+ return HashCode.Combine(typeof(IClassifier), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/CollectExpressionComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/CollectExpressionComparer.cs
new file mode 100644
index 000000000..39f244cd2
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/CollectExpressionComparer.cs
@@ -0,0 +1,149 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.Core.Types;
+ using SysML2.NET.Core.DTO.Kernel.Expressions;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class CollectExpressionComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(ICollectExpression x, ICollectExpression y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (x.Direction != y.Direction) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsAbstract != y.IsAbstract) return false;
+
+ if (x.IsComposite != y.IsComposite) return false;
+
+ if (x.IsConstant != y.IsConstant) return false;
+
+ if (x.IsDerived != y.IsDerived) return false;
+
+ if (x.IsEnd != y.IsEnd) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (x.IsOrdered != y.IsOrdered) return false;
+
+ if (x.IsPortion != y.IsPortion) return false;
+
+ if (x.IsSufficient != y.IsSufficient) return false;
+
+ if (x.IsUnique != y.IsUnique) return false;
+
+ if (x.IsVariable != y.IsVariable) return false;
+
+ if (!OrdinalStringComparer.Equals(x.Operator, y.Operator)) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(ICollectExpression obj)
+ {
+ return HashCode.Combine(typeof(ICollectExpression), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/CommentComparer.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/CommentComparer.cs
new file mode 100644
index 000000000..2aa850d56
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/CommentComparer.cs
@@ -0,0 +1,128 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright (C) 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.CodeDom.Compiler;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Core.DTO.Root.Annotations;
+ using SysML2.NET.Extensions.Comparers;
+
+ ///
+ /// Provides an equality comparison for instances
+ /// based on their semantic content rather than object reference identity.
+ ///
+ ///
+ /// This comparer is intended for use in deserialization, testing, and model
+ /// validation scenarios where two instances
+ /// originating from different sources (e.g. JSON and MessagePack) must be
+ /// considered equal if they represent the same SysML v2 model element.
+ ///
+ [GeneratedCode("SysML2.NET", "latest")]
+ public sealed class CommentComparer : IEqualityComparer
+ {
+ ///
+ /// The used for all string comparisons performed
+ /// by this comparer.
+ ///
+ ///
+ /// is used to ensure culture-independent,
+ /// deterministic comparison semantics suitable for identifiers and
+ /// model-level string values.
+ ///
+ private static readonly StringComparer OrdinalStringComparer = StringComparer.Ordinal;
+
+ ///
+ /// Determines whether two instances are equal.
+ ///
+ ///
+ /// The first to compare.
+ ///
+ ///
+ /// The second to compare.
+ ///
+ ///
+ /// true if both instances represent the same
+ /// according to their semantic content; otherwise, false.
+ ///
+ ///
+ /// This method performs a deep, deterministic comparison of all relevant
+ /// properties, ignoring object reference identity and any transient or
+ /// derived state.
+ ///
+ public bool Equals(IComment x, IComment y)
+ {
+ if (ReferenceEquals(x, y)) return true;
+
+ if (x is null || y is null) return false;
+
+ if (x.Id != y.Id) return false;
+
+ if (!StringSequenceEquality.OrderedEqual(x.AliasIds, y.AliasIds)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.Body, y.Body)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredName, y.DeclaredName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.DeclaredShortName, y.DeclaredShortName)) return false;
+
+ if (!OrdinalStringComparer.Equals(x.ElementId, y.ElementId)) return false;
+
+ if (x.IsImpliedIncluded != y.IsImpliedIncluded) return false;
+
+ if (!OrdinalStringComparer.Equals(x.Locale, y.Locale)) return false;
+
+ if (!GuidSequenceEquality.OrderedEqual(x.OwnedRelationship, y.OwnedRelationship)) return false;
+
+ if (x.OwningRelationship != y.OwningRelationship) return false;
+
+ return true;
+ }
+
+ ///
+ /// Returns a hash code for the specified .
+ ///
+ ///
+ /// The for which a hash code is to be returned.
+ ///
+ ///
+ /// A hash code based on the stable identity of the element.
+ ///
+ ///
+ /// The hash code is intentionally derived from the element identity only,
+ /// ensuring stability and compatibility with collection-based equality
+ /// checks
+ ///
+ public int GetHashCode(IComment obj)
+ {
+ return HashCode.Combine(typeof(IComment), obj.Id);
+ }
+ }
+}
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
diff --git a/SysML2.NET.Extensions/Core/AutoGenDtoComparers/ComparerProvider.cs b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/ComparerProvider.cs
new file mode 100644
index 000000000..9427dfcfd
--- /dev/null
+++ b/SysML2.NET.Extensions/Core/AutoGenDtoComparers/ComparerProvider.cs
@@ -0,0 +1,333 @@
+// -------------------------------------------------------------------------------------------------
+//
+//
+// Copyright 2022-2026 Starion Group S.A.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// ------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------
+// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
+// ------------------------------------------------------------------------------------------------
+
+namespace SysML2.NET.Extensions.Core.DTO.Comparers
+{
+ using System;
+ using System.Collections.Generic;
+
+ using SysML2.NET.Common;
+
+ ///
+ /// Provides runtime access to equality comparers for DTO types.
+ ///
+ public static class ComparerProvider
+ {
+ private static readonly IReadOnlyDictionary> Comparers =
+ new Dictionary>
+ {
+ { typeof(SysML2.NET.Core.DTO.Systems.Actions.AcceptActionUsage), new Adapter(new AcceptActionUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Actions.ActionDefinition), new Adapter(new ActionDefinitionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Actions.ActionUsage), new Adapter(new ActionUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Requirements.ActorMembership), new Adapter(new ActorMembershipComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Allocations.AllocationDefinition), new Adapter(new AllocationDefinitionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Allocations.AllocationUsage), new Adapter(new AllocationUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.AnalysisCases.AnalysisCaseDefinition), new Adapter(new AnalysisCaseDefinitionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.AnalysisCases.AnalysisCaseUsage), new Adapter(new AnalysisCaseUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Root.Annotations.AnnotatingElement), new Adapter(new AnnotatingElementComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Root.Annotations.Annotation), new Adapter(new AnnotationComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Constraints.AssertConstraintUsage), new Adapter(new AssertConstraintUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Actions.AssignmentActionUsage), new Adapter(new AssignmentActionUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Associations.Association), new Adapter(new AssociationComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Associations.AssociationStructure), new Adapter(new AssociationStructureComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Attributes.AttributeDefinition), new Adapter(new AttributeDefinitionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Attributes.AttributeUsage), new Adapter(new AttributeUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Behaviors.Behavior), new Adapter(new BehaviorComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Connectors.BindingConnector), new Adapter(new BindingConnectorComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Connections.BindingConnectorAsUsage), new Adapter(new BindingConnectorAsUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Functions.BooleanExpression), new Adapter(new BooleanExpressionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Calculations.CalculationDefinition), new Adapter(new CalculationDefinitionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Calculations.CalculationUsage), new Adapter(new CalculationUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Cases.CaseDefinition), new Adapter(new CaseDefinitionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Cases.CaseUsage), new Adapter(new CaseUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Classes.Class), new Adapter(new ClassComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Core.Classifiers.Classifier), new Adapter(new ClassifierComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.CollectExpression), new Adapter(new CollectExpressionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Root.Annotations.Comment), new Adapter(new CommentComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Requirements.ConcernDefinition), new Adapter(new ConcernDefinitionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Requirements.ConcernUsage), new Adapter(new ConcernUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Ports.ConjugatedPortDefinition), new Adapter(new ConjugatedPortDefinitionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Ports.ConjugatedPortTyping), new Adapter(new ConjugatedPortTypingComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Core.Types.Conjugation), new Adapter(new ConjugationComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Connections.ConnectionDefinition), new Adapter(new ConnectionDefinitionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Connections.ConnectionUsage), new Adapter(new ConnectionUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Connectors.Connector), new Adapter(new ConnectorComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Constraints.ConstraintDefinition), new Adapter(new ConstraintDefinitionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Constraints.ConstraintUsage), new Adapter(new ConstraintUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.ConstructorExpression), new Adapter(new ConstructorExpressionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Core.Features.CrossSubsetting), new Adapter(new CrossSubsettingComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.DataTypes.DataType), new Adapter(new DataTypeComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Actions.DecisionNode), new Adapter(new DecisionNodeComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.DefinitionAndUsage.Definition), new Adapter(new DefinitionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Root.Dependencies.Dependency), new Adapter(new DependencyComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Core.Types.Differencing), new Adapter(new DifferencingComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Core.Types.Disjoining), new Adapter(new DisjoiningComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Root.Annotations.Documentation), new Adapter(new DocumentationComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Packages.ElementFilterMembership), new Adapter(new ElementFilterMembershipComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Core.Features.EndFeatureMembership), new Adapter(new EndFeatureMembershipComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Enumerations.EnumerationDefinition), new Adapter(new EnumerationDefinitionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Enumerations.EnumerationUsage), new Adapter(new EnumerationUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Occurrences.EventOccurrenceUsage), new Adapter(new EventOccurrenceUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.States.ExhibitStateUsage), new Adapter(new ExhibitStateUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Functions.Expression), new Adapter(new ExpressionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Core.Features.Feature), new Adapter(new FeatureComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.FeatureChainExpression), new Adapter(new FeatureChainExpressionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Core.Features.FeatureChaining), new Adapter(new FeatureChainingComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Core.Features.FeatureInverting), new Adapter(new FeatureInvertingComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Core.Types.FeatureMembership), new Adapter(new FeatureMembershipComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.FeatureReferenceExpression), new Adapter(new FeatureReferenceExpressionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Core.Features.FeatureTyping), new Adapter(new FeatureTypingComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.FeatureValues.FeatureValue), new Adapter(new FeatureValueComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Interactions.Flow), new Adapter(new FlowComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Flows.FlowDefinition), new Adapter(new FlowDefinitionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Interactions.FlowEnd), new Adapter(new FlowEndComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Flows.FlowUsage), new Adapter(new FlowUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Actions.ForkNode), new Adapter(new ForkNodeComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Actions.ForLoopActionUsage), new Adapter(new ForLoopActionUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Requirements.FramedConcernMembership), new Adapter(new FramedConcernMembershipComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Functions.Function), new Adapter(new FunctionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Actions.IfActionUsage), new Adapter(new IfActionUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.UseCases.IncludeUseCaseUsage), new Adapter(new IncludeUseCaseUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.IndexExpression), new Adapter(new IndexExpressionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Interactions.Interaction), new Adapter(new InteractionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Interfaces.InterfaceDefinition), new Adapter(new InterfaceDefinitionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Interfaces.InterfaceUsage), new Adapter(new InterfaceUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Core.Types.Intersecting), new Adapter(new IntersectingComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Functions.Invariant), new Adapter(new InvariantComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.InvocationExpression), new Adapter(new InvocationExpressionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Items.ItemDefinition), new Adapter(new ItemDefinitionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Items.ItemUsage), new Adapter(new ItemUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Actions.JoinNode), new Adapter(new JoinNodeComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Packages.LibraryPackage), new Adapter(new LibraryPackageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.LiteralBoolean), new Adapter(new LiteralBooleanComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.LiteralExpression), new Adapter(new LiteralExpressionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.LiteralInfinity), new Adapter(new LiteralInfinityComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.LiteralInteger), new Adapter(new LiteralIntegerComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.LiteralRational), new Adapter(new LiteralRationalComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.LiteralString), new Adapter(new LiteralStringComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Root.Namespaces.Membership), new Adapter(new MembershipComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Views.MembershipExpose), new Adapter(new MembershipExposeComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Root.Namespaces.MembershipImport), new Adapter(new MembershipImportComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Actions.MergeNode), new Adapter(new MergeNodeComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Metadata.Metaclass), new Adapter(new MetaclassComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.MetadataAccessExpression), new Adapter(new MetadataAccessExpressionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Metadata.MetadataDefinition), new Adapter(new MetadataDefinitionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Metadata.MetadataFeature), new Adapter(new MetadataFeatureComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Metadata.MetadataUsage), new Adapter(new MetadataUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Core.Types.Multiplicity), new Adapter(new MultiplicityComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Multiplicities.MultiplicityRange), new Adapter(new MultiplicityRangeComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Root.Namespaces.Namespace), new Adapter(new NamespaceComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Views.NamespaceExpose), new Adapter(new NamespaceExposeComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Root.Namespaces.NamespaceImport), new Adapter(new NamespaceImportComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.NullExpression), new Adapter(new NullExpressionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Cases.ObjectiveMembership), new Adapter(new ObjectiveMembershipComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Occurrences.OccurrenceDefinition), new Adapter(new OccurrenceDefinitionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Occurrences.OccurrenceUsage), new Adapter(new OccurrenceUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Expressions.OperatorExpression), new Adapter(new OperatorExpressionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Root.Namespaces.OwningMembership), new Adapter(new OwningMembershipComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Packages.Package), new Adapter(new PackageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Behaviors.ParameterMembership), new Adapter(new ParameterMembershipComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Parts.PartDefinition), new Adapter(new PartDefinitionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Parts.PartUsage), new Adapter(new PartUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Kernel.Interactions.PayloadFeature), new Adapter(new PayloadFeatureComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Actions.PerformActionUsage), new Adapter(new PerformActionUsageComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Ports.PortConjugation), new Adapter(new PortConjugationComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Ports.PortDefinition), new Adapter(new PortDefinitionComparer()) },
+ { typeof(SysML2.NET.Core.DTO.Systems.Ports.PortUsage), new Adapter