From a61e12945c396418f4747df32c97b330e6b67f67 Mon Sep 17 00:00:00 2001 From: atheate Date: Mon, 16 Feb 2026 09:42:37 +0100 Subject: [PATCH 1/3] Fix #75: Containmnet principle implemented --- .../UML/Core/AutoGenPoco/AnnotatingElement.cs | 24 ++- .../UML/Core/AutoGenPoco/Association.cs | 38 ++++- .../UML/Core/AutoGenPoco/Dependency.cs | 38 ++++- .../Core/AutoGenPoco/EnumerationDefinition.cs | 24 ++- .../Expected/UML/Core/AutoGenPoco/Feature.cs | 24 ++- .../UML/Core/AutoGenPoco/FeatureTyping.cs | 38 ++++- .../Expected/UML/Core/AutoGenPoco/Flow.cs | 38 ++++- .../AutoGenPoco/FramedConcernMembership.cs | 38 ++++- .../Expected/UML/Core/AutoGenPoco/IElement.cs | 4 +- .../UML/Core/AutoGenPoco/IRelationship.cs | 4 +- .../UML/Core/AutoGenPoco/LiteralInteger.cs | 24 ++- .../UML/Core/AutoGenPoco/LiteralRational.cs | 24 ++- .../UML/Core/AutoGenPoco/Membership.cs | 38 ++++- .../UML/Core/AutoGenPoco/MultiplicityRange.cs | 24 ++- .../UML/Core/AutoGenPoco/OwningMembership.cs | 38 ++++- .../Core/AutoGenPoco/ReferenceSubsetting.cs | 38 ++++- .../UML/Core/AutoGenPoco/RequirementUsage.cs | 24 ++- .../UML/Core/AutoGenPoco/SelectExpression.cs | 24 ++- .../UML/Core/AutoGenPoco/Subclassification.cs | 38 ++++- .../Core/AutoGenPoco/TextualRepresentation.cs | 24 ++- .../Expected/UML/Core/AutoGenPoco/Usage.cs | 24 ++- .../AnnotatingElementExtensions.cs | 9 +- .../AssociationExtensions.cs | 17 +- .../DependencyExtensions.cs | 17 +- .../EnumerationDefinitionExtensions.cs | 9 +- .../AutoGenPocoExtension/FeatureExtensions.cs | 9 +- .../FeatureTypingExtensions.cs | 17 +- .../AutoGenPocoExtension/FlowExtensions.cs | 17 +- .../FramedConcernMembershipExtensions.cs | 17 +- .../LiteralIntegerExtensions.cs | 9 +- .../LiteralRationalExtensions.cs | 9 +- .../MembershipExtensions.cs | 17 +- .../MultiplicityRangeExtensions.cs | 9 +- .../OwningMembershipExtensions.cs | 17 +- .../ReferenceSubsettingExtensions.cs | 17 +- .../RequirementUsageExtensions.cs | 9 +- .../SelectExpressionExtensions.cs | 9 +- .../SubclassificationExtensions.cs | 17 +- .../TextualRepresentationExtensions.cs | 9 +- .../AutoGenPocoExtension/UsageExtensions.cs | 9 +- .../AnnotatingElementExtensions.cs | 5 +- .../AssociationExtensions.cs | 9 +- .../DependencyExtensions.cs | 9 +- .../EnumerationDefinitionExtensions.cs | 5 +- .../FeatureExtensions.cs | 5 +- .../FeatureTypingExtensions.cs | 9 +- .../FlowExtensions.cs | 9 +- .../FramedConcernMembershipExtensions.cs | 9 +- .../LiteralIntegerExtensions.cs | 5 +- .../LiteralRationalExtensions.cs | 5 +- .../MembershipExtensions.cs | 9 +- .../MultiplicityRangeExtensions.cs | 5 +- .../OwningMembershipExtensions.cs | 9 +- .../ReferenceSubsettingExtensions.cs | 9 +- .../RequirementUsageExtensions.cs | 5 +- .../SelectExpressionExtensions.cs | 5 +- .../SubclassificationExtensions.cs | 9 +- .../TextualRepresentationExtensions.cs | 5 +- .../UsageExtensions.cs | 5 +- .../AutoGenReaders/AnnotatingElementReader.cs | 9 +- .../Core/AutoGenReaders/AssociationReader.cs | 17 +- .../Core/AutoGenReaders/DependencyReader.cs | 17 +- .../EnumerationDefinitionReader.cs | 9 +- .../UML/Core/AutoGenReaders/FeatureReader.cs | 9 +- .../AutoGenReaders/FeatureTypingReader.cs | 17 +- .../UML/Core/AutoGenReaders/FlowReader.cs | 17 +- .../FramedConcernMembershipReader.cs | 17 +- .../AutoGenReaders/LiteralIntegerReader.cs | 9 +- .../AutoGenReaders/LiteralRationalReader.cs | 9 +- .../Core/AutoGenReaders/MembershipReader.cs | 17 +- .../AutoGenReaders/MultiplicityRangeReader.cs | 9 +- .../AutoGenReaders/OwningMembershipReader.cs | 17 +- .../ReferenceSubsettingReader.cs | 17 +- .../AutoGenReaders/RequirementUsageReader.cs | 9 +- .../AutoGenReaders/SelectExpressionReader.cs | 9 +- .../AutoGenReaders/SubclassificationReader.cs | 17 +- .../TextualRepresentationReader.cs | 9 +- .../UML/Core/AutoGenReaders/UsageReader.cs | 9 +- .../SysML2.NET.CodeGenerator.Tests.csproj | 157 +++++++++--------- .../Extensions/ClassExtensions.cs | 17 ++ .../Extensions/PropertyExtension.cs | 18 ++ .../HandleBarHelpers/ClassHelper.cs | 30 +++- .../HandleBarHelpers/PropertyHelper.cs | 96 +++++++++-- ...mi-reader-partial-for-element-template.hbs | 12 +- .../Uml/core-dal-poco-uml-extensions.hbs | 79 +++++++-- .../Uml/core-poco-class-uml-template.hbs | 13 +- ...o-reference-resolve-extension-template.hbs | 13 +- .../Uml/core-xmi-reader-template.hbs | 1 + .../AnnotatingElementExtensionsTestFixture.cs | 8 +- .../AcceptActionUsageExtensions.cs | 9 +- .../ActionDefinitionExtensions.cs | 9 +- .../ActionUsageExtensions.cs | 9 +- .../ActorMembershipExtensions.cs | 17 +- .../AllocationDefinitionExtensions.cs | 17 +- .../AllocationUsageExtensions.cs | 17 +- .../AnalysisCaseDefinitionExtensions.cs | 9 +- .../AnalysisCaseUsageExtensions.cs | 9 +- .../AnnotatingElementExtensions.cs | 9 +- .../AnnotationExtensions.cs | 17 +- .../AssertConstraintUsageExtensions.cs | 9 +- .../AssignmentActionUsageExtensions.cs | 9 +- .../AssociationExtensions.cs | 17 +- .../AssociationStructureExtensions.cs | 17 +- .../AttributeDefinitionExtensions.cs | 9 +- .../AttributeUsageExtensions.cs | 9 +- .../BehaviorExtensions.cs | 9 +- .../BindingConnectorAsUsageExtensions.cs | 17 +- .../BindingConnectorExtensions.cs | 17 +- .../BooleanExpressionExtensions.cs | 9 +- .../CalculationDefinitionExtensions.cs | 9 +- .../CalculationUsageExtensions.cs | 9 +- .../CaseDefinitionExtensions.cs | 9 +- .../CaseUsageExtensions.cs | 9 +- .../AutoGenPocoExtension/ClassExtensions.cs | 9 +- .../ClassifierExtensions.cs | 9 +- .../CollectExpressionExtensions.cs | 9 +- .../AutoGenPocoExtension/CommentExtensions.cs | 9 +- .../ConcernDefinitionExtensions.cs | 9 +- .../ConcernUsageExtensions.cs | 9 +- .../ConjugatedPortDefinitionExtensions.cs | 9 +- .../ConjugatedPortTypingExtensions.cs | 17 +- .../ConjugationExtensions.cs | 17 +- .../ConnectionDefinitionExtensions.cs | 17 +- .../ConnectionUsageExtensions.cs | 17 +- .../ConnectorExtensions.cs | 17 +- .../ConstraintDefinitionExtensions.cs | 9 +- .../ConstraintUsageExtensions.cs | 9 +- .../ConstructorExpressionExtensions.cs | 9 +- .../CrossSubsettingExtensions.cs | 17 +- .../DataTypeExtensions.cs | 9 +- .../DecisionNodeExtensions.cs | 9 +- .../DefinitionExtensions.cs | 9 +- .../DependencyExtensions.cs | 17 +- .../DifferencingExtensions.cs | 17 +- .../DisjoiningExtensions.cs | 17 +- .../DocumentationExtensions.cs | 9 +- .../ElementFilterMembershipExtensions.cs | 17 +- .../EndFeatureMembershipExtensions.cs | 17 +- .../EnumerationDefinitionExtensions.cs | 9 +- .../EnumerationUsageExtensions.cs | 9 +- .../EventOccurrenceUsageExtensions.cs | 9 +- .../ExhibitStateUsageExtensions.cs | 9 +- .../ExpressionExtensions.cs | 9 +- .../FeatureChainExpressionExtensions.cs | 9 +- .../FeatureChainingExtensions.cs | 17 +- .../AutoGenPocoExtension/FeatureExtensions.cs | 9 +- .../FeatureInvertingExtensions.cs | 17 +- .../FeatureMembershipExtensions.cs | 17 +- .../FeatureReferenceExpressionExtensions.cs | 9 +- .../FeatureTypingExtensions.cs | 17 +- .../FeatureValueExtensions.cs | 17 +- .../FlowDefinitionExtensions.cs | 17 +- .../AutoGenPocoExtension/FlowEndExtensions.cs | 9 +- .../AutoGenPocoExtension/FlowExtensions.cs | 17 +- .../FlowUsageExtensions.cs | 17 +- .../ForLoopActionUsageExtensions.cs | 9 +- .../ForkNodeExtensions.cs | 9 +- .../FramedConcernMembershipExtensions.cs | 17 +- .../FunctionExtensions.cs | 9 +- .../IfActionUsageExtensions.cs | 9 +- .../IncludeUseCaseUsageExtensions.cs | 9 +- .../IndexExpressionExtensions.cs | 9 +- .../InteractionExtensions.cs | 17 +- .../InterfaceDefinitionExtensions.cs | 17 +- .../InterfaceUsageExtensions.cs | 17 +- .../IntersectingExtensions.cs | 17 +- .../InvariantExtensions.cs | 9 +- .../InvocationExpressionExtensions.cs | 9 +- .../ItemDefinitionExtensions.cs | 9 +- .../ItemUsageExtensions.cs | 9 +- .../JoinNodeExtensions.cs | 9 +- .../LibraryPackageExtensions.cs | 9 +- .../LiteralBooleanExtensions.cs | 9 +- .../LiteralExpressionExtensions.cs | 9 +- .../LiteralInfinityExtensions.cs | 9 +- .../LiteralIntegerExtensions.cs | 9 +- .../LiteralRationalExtensions.cs | 9 +- .../LiteralStringExtensions.cs | 9 +- .../MembershipExposeExtensions.cs | 17 +- .../MembershipExtensions.cs | 17 +- .../MembershipImportExtensions.cs | 17 +- .../MergeNodeExtensions.cs | 9 +- .../MetaclassExtensions.cs | 9 +- .../MetadataAccessExpressionExtensions.cs | 9 +- .../MetadataDefinitionExtensions.cs | 9 +- .../MetadataFeatureExtensions.cs | 9 +- .../MetadataUsageExtensions.cs | 9 +- .../MultiplicityExtensions.cs | 9 +- .../MultiplicityRangeExtensions.cs | 9 +- .../NamespaceExposeExtensions.cs | 17 +- .../NamespaceExtensions.cs | 9 +- .../NamespaceImportExtensions.cs | 17 +- .../NullExpressionExtensions.cs | 9 +- .../ObjectiveMembershipExtensions.cs | 17 +- .../OccurrenceDefinitionExtensions.cs | 9 +- .../OccurrenceUsageExtensions.cs | 9 +- .../OperatorExpressionExtensions.cs | 9 +- .../OwningMembershipExtensions.cs | 17 +- .../AutoGenPocoExtension/PackageExtensions.cs | 9 +- .../ParameterMembershipExtensions.cs | 17 +- .../PartDefinitionExtensions.cs | 9 +- .../PartUsageExtensions.cs | 9 +- .../PayloadFeatureExtensions.cs | 9 +- .../PerformActionUsageExtensions.cs | 9 +- .../PortConjugationExtensions.cs | 17 +- .../PortDefinitionExtensions.cs | 9 +- .../PortUsageExtensions.cs | 9 +- .../PredicateExtensions.cs | 9 +- .../RedefinitionExtensions.cs | 17 +- .../ReferenceSubsettingExtensions.cs | 17 +- .../ReferenceUsageExtensions.cs | 9 +- .../RenderingDefinitionExtensions.cs | 9 +- .../RenderingUsageExtensions.cs | 9 +- ...quirementConstraintMembershipExtensions.cs | 17 +- .../RequirementDefinitionExtensions.cs | 9 +- .../RequirementUsageExtensions.cs | 9 +- ...irementVerificationMembershipExtensions.cs | 17 +- .../ResultExpressionMembershipExtensions.cs | 17 +- .../ReturnParameterMembershipExtensions.cs | 17 +- .../SatisfyRequirementUsageExtensions.cs | 9 +- .../SelectExpressionExtensions.cs | 9 +- .../SendActionUsageExtensions.cs | 9 +- .../SpecializationExtensions.cs | 17 +- .../StakeholderMembershipExtensions.cs | 17 +- .../StateDefinitionExtensions.cs | 9 +- .../StateSubactionMembershipExtensions.cs | 17 +- .../StateUsageExtensions.cs | 9 +- .../AutoGenPocoExtension/StepExtensions.cs | 9 +- .../StructureExtensions.cs | 9 +- .../SubclassificationExtensions.cs | 17 +- .../SubjectMembershipExtensions.cs | 17 +- .../SubsettingExtensions.cs | 17 +- .../SuccessionAsUsageExtensions.cs | 17 +- .../SuccessionExtensions.cs | 17 +- .../SuccessionFlowExtensions.cs | 17 +- .../SuccessionFlowUsageExtensions.cs | 17 +- .../TerminateActionUsageExtensions.cs | 9 +- .../TextualRepresentationExtensions.cs | 9 +- .../TransitionFeatureMembershipExtensions.cs | 17 +- .../TransitionUsageExtensions.cs | 9 +- .../TriggerInvocationExpressionExtensions.cs | 9 +- .../AutoGenPocoExtension/TypeExtensions.cs | 9 +- .../TypeFeaturingExtensions.cs | 17 +- .../UnioningExtensions.cs | 17 +- .../AutoGenPocoExtension/UsageExtensions.cs | 9 +- .../UseCaseDefinitionExtensions.cs | 9 +- .../UseCaseUsageExtensions.cs | 9 +- .../VariantMembershipExtensions.cs | 17 +- .../VerificationCaseDefinitionExtensions.cs | 9 +- .../VerificationCaseUsageExtensions.cs | 9 +- .../ViewDefinitionExtensions.cs | 9 +- .../ViewRenderingMembershipExtensions.cs | 17 +- .../ViewUsageExtensions.cs | 9 +- .../ViewpointDefinitionExtensions.cs | 9 +- .../ViewpointUsageExtensions.cs | 9 +- .../WhileLoopActionUsageExtensions.cs | 9 +- .../AcceptActionUsageExtensions.cs | 5 +- .../ActionDefinitionExtensions.cs | 5 +- .../ActionUsageExtensions.cs | 5 +- .../ActorMembershipExtensions.cs | 9 +- .../AllocationDefinitionExtensions.cs | 9 +- .../AllocationUsageExtensions.cs | 9 +- .../AnalysisCaseDefinitionExtensions.cs | 5 +- .../AnalysisCaseUsageExtensions.cs | 5 +- .../AnnotatingElementExtensions.cs | 5 +- .../AnnotationExtensions.cs | 9 +- .../AssertConstraintUsageExtensions.cs | 5 +- .../AssignmentActionUsageExtensions.cs | 5 +- .../AssociationExtensions.cs | 9 +- .../AssociationStructureExtensions.cs | 9 +- .../AttributeDefinitionExtensions.cs | 5 +- .../AttributeUsageExtensions.cs | 5 +- .../BehaviorExtensions.cs | 5 +- .../BindingConnectorAsUsageExtensions.cs | 9 +- .../BindingConnectorExtensions.cs | 9 +- .../BooleanExpressionExtensions.cs | 5 +- .../CalculationDefinitionExtensions.cs | 5 +- .../CalculationUsageExtensions.cs | 5 +- .../CaseDefinitionExtensions.cs | 5 +- .../CaseUsageExtensions.cs | 5 +- .../ClassExtensions.cs | 5 +- .../ClassifierExtensions.cs | 5 +- .../CollectExpressionExtensions.cs | 5 +- .../CommentExtensions.cs | 5 +- .../ConcernDefinitionExtensions.cs | 5 +- .../ConcernUsageExtensions.cs | 5 +- .../ConjugatedPortDefinitionExtensions.cs | 5 +- .../ConjugatedPortTypingExtensions.cs | 9 +- .../ConjugationExtensions.cs | 9 +- .../ConnectionDefinitionExtensions.cs | 9 +- .../ConnectionUsageExtensions.cs | 9 +- .../ConnectorExtensions.cs | 9 +- .../ConstraintDefinitionExtensions.cs | 5 +- .../ConstraintUsageExtensions.cs | 5 +- .../ConstructorExpressionExtensions.cs | 5 +- .../CrossSubsettingExtensions.cs | 9 +- .../DataTypeExtensions.cs | 5 +- .../DecisionNodeExtensions.cs | 5 +- .../DefinitionExtensions.cs | 5 +- .../DependencyExtensions.cs | 9 +- .../DifferencingExtensions.cs | 9 +- .../DisjoiningExtensions.cs | 9 +- .../DocumentationExtensions.cs | 5 +- .../ElementFilterMembershipExtensions.cs | 9 +- .../EndFeatureMembershipExtensions.cs | 9 +- .../EnumerationDefinitionExtensions.cs | 5 +- .../EnumerationUsageExtensions.cs | 5 +- .../EventOccurrenceUsageExtensions.cs | 5 +- .../ExhibitStateUsageExtensions.cs | 5 +- .../ExpressionExtensions.cs | 5 +- .../FeatureChainExpressionExtensions.cs | 5 +- .../FeatureChainingExtensions.cs | 9 +- .../FeatureExtensions.cs | 5 +- .../FeatureInvertingExtensions.cs | 9 +- .../FeatureMembershipExtensions.cs | 9 +- .../FeatureReferenceExpressionExtensions.cs | 5 +- .../FeatureTypingExtensions.cs | 9 +- .../FeatureValueExtensions.cs | 9 +- .../FlowDefinitionExtensions.cs | 9 +- .../FlowEndExtensions.cs | 5 +- .../FlowExtensions.cs | 9 +- .../FlowUsageExtensions.cs | 9 +- .../ForLoopActionUsageExtensions.cs | 5 +- .../ForkNodeExtensions.cs | 5 +- .../FramedConcernMembershipExtensions.cs | 9 +- .../FunctionExtensions.cs | 5 +- .../IfActionUsageExtensions.cs | 5 +- .../IncludeUseCaseUsageExtensions.cs | 5 +- .../IndexExpressionExtensions.cs | 5 +- .../InteractionExtensions.cs | 9 +- .../InterfaceDefinitionExtensions.cs | 9 +- .../InterfaceUsageExtensions.cs | 9 +- .../IntersectingExtensions.cs | 9 +- .../InvariantExtensions.cs | 5 +- .../InvocationExpressionExtensions.cs | 5 +- .../ItemDefinitionExtensions.cs | 5 +- .../ItemUsageExtensions.cs | 5 +- .../JoinNodeExtensions.cs | 5 +- .../LibraryPackageExtensions.cs | 5 +- .../LiteralBooleanExtensions.cs | 5 +- .../LiteralExpressionExtensions.cs | 5 +- .../LiteralInfinityExtensions.cs | 5 +- .../LiteralIntegerExtensions.cs | 5 +- .../LiteralRationalExtensions.cs | 5 +- .../LiteralStringExtensions.cs | 5 +- .../MembershipExposeExtensions.cs | 9 +- .../MembershipExtensions.cs | 9 +- .../MembershipImportExtensions.cs | 9 +- .../MergeNodeExtensions.cs | 5 +- .../MetaclassExtensions.cs | 5 +- .../MetadataAccessExpressionExtensions.cs | 5 +- .../MetadataDefinitionExtensions.cs | 5 +- .../MetadataFeatureExtensions.cs | 5 +- .../MetadataUsageExtensions.cs | 5 +- .../MultiplicityExtensions.cs | 5 +- .../MultiplicityRangeExtensions.cs | 5 +- .../NamespaceExposeExtensions.cs | 9 +- .../NamespaceExtensions.cs | 5 +- .../NamespaceImportExtensions.cs | 9 +- .../NullExpressionExtensions.cs | 5 +- .../ObjectiveMembershipExtensions.cs | 9 +- .../OccurrenceDefinitionExtensions.cs | 5 +- .../OccurrenceUsageExtensions.cs | 5 +- .../OperatorExpressionExtensions.cs | 5 +- .../OwningMembershipExtensions.cs | 9 +- .../PackageExtensions.cs | 5 +- .../ParameterMembershipExtensions.cs | 9 +- .../PartDefinitionExtensions.cs | 5 +- .../PartUsageExtensions.cs | 5 +- .../PayloadFeatureExtensions.cs | 5 +- .../PerformActionUsageExtensions.cs | 5 +- .../PortConjugationExtensions.cs | 9 +- .../PortDefinitionExtensions.cs | 5 +- .../PortUsageExtensions.cs | 5 +- .../PredicateExtensions.cs | 5 +- .../RedefinitionExtensions.cs | 9 +- .../ReferenceSubsettingExtensions.cs | 9 +- .../ReferenceUsageExtensions.cs | 5 +- .../RenderingDefinitionExtensions.cs | 5 +- .../RenderingUsageExtensions.cs | 5 +- ...quirementConstraintMembershipExtensions.cs | 9 +- .../RequirementDefinitionExtensions.cs | 5 +- .../RequirementUsageExtensions.cs | 5 +- ...irementVerificationMembershipExtensions.cs | 9 +- .../ResultExpressionMembershipExtensions.cs | 9 +- .../ReturnParameterMembershipExtensions.cs | 9 +- .../SatisfyRequirementUsageExtensions.cs | 5 +- .../SelectExpressionExtensions.cs | 5 +- .../SendActionUsageExtensions.cs | 5 +- .../SpecializationExtensions.cs | 9 +- .../StakeholderMembershipExtensions.cs | 9 +- .../StateDefinitionExtensions.cs | 5 +- .../StateSubactionMembershipExtensions.cs | 9 +- .../StateUsageExtensions.cs | 5 +- .../StepExtensions.cs | 5 +- .../StructureExtensions.cs | 5 +- .../SubclassificationExtensions.cs | 9 +- .../SubjectMembershipExtensions.cs | 9 +- .../SubsettingExtensions.cs | 9 +- .../SuccessionAsUsageExtensions.cs | 9 +- .../SuccessionExtensions.cs | 9 +- .../SuccessionFlowExtensions.cs | 9 +- .../SuccessionFlowUsageExtensions.cs | 9 +- .../TerminateActionUsageExtensions.cs | 5 +- .../TextualRepresentationExtensions.cs | 5 +- .../TransitionFeatureMembershipExtensions.cs | 9 +- .../TransitionUsageExtensions.cs | 5 +- .../TriggerInvocationExpressionExtensions.cs | 5 +- .../TypeExtensions.cs | 5 +- .../TypeFeaturingExtensions.cs | 9 +- .../UnioningExtensions.cs | 9 +- .../UsageExtensions.cs | 5 +- .../UseCaseDefinitionExtensions.cs | 5 +- .../UseCaseUsageExtensions.cs | 5 +- .../VariantMembershipExtensions.cs | 9 +- .../VerificationCaseDefinitionExtensions.cs | 5 +- .../VerificationCaseUsageExtensions.cs | 5 +- .../ViewDefinitionExtensions.cs | 5 +- .../ViewRenderingMembershipExtensions.cs | 9 +- .../ViewUsageExtensions.cs | 5 +- .../ViewpointDefinitionExtensions.cs | 5 +- .../ViewpointUsageExtensions.cs | 5 +- .../WhileLoopActionUsageExtensions.cs | 5 +- .../AutoGenReaders/AcceptActionUsageReader.cs | 8 +- .../AutoGenReaders/ActionDefinitionReader.cs | 8 +- .../AutoGenReaders/ActionUsageReader.cs | 8 +- .../AutoGenReaders/ActorMembershipReader.cs | 16 +- .../AllocationDefinitionReader.cs | 16 +- .../AutoGenReaders/AllocationUsageReader.cs | 16 +- .../AnalysisCaseDefinitionReader.cs | 8 +- .../AutoGenReaders/AnalysisCaseUsageReader.cs | 8 +- .../AutoGenReaders/AnnotatingElementReader.cs | 8 +- .../AutoGenReaders/AnnotationReader.cs | 16 +- .../AssertConstraintUsageReader.cs | 8 +- .../AssignmentActionUsageReader.cs | 8 +- .../AutoGenReaders/AssociationReader.cs | 16 +- .../AssociationStructureReader.cs | 16 +- .../AttributeDefinitionReader.cs | 8 +- .../AutoGenReaders/AttributeUsageReader.cs | 8 +- .../Readers/AutoGenReaders/BehaviorReader.cs | 8 +- .../BindingConnectorAsUsageReader.cs | 16 +- .../AutoGenReaders/BindingConnectorReader.cs | 16 +- .../AutoGenReaders/BooleanExpressionReader.cs | 8 +- .../CalculationDefinitionReader.cs | 8 +- .../AutoGenReaders/CalculationUsageReader.cs | 8 +- .../AutoGenReaders/CaseDefinitionReader.cs | 8 +- .../Readers/AutoGenReaders/CaseUsageReader.cs | 8 +- .../Readers/AutoGenReaders/ClassReader.cs | 8 +- .../AutoGenReaders/ClassifierReader.cs | 8 +- .../AutoGenReaders/CollectExpressionReader.cs | 8 +- .../Readers/AutoGenReaders/CommentReader.cs | 8 +- .../AutoGenReaders/ConcernDefinitionReader.cs | 8 +- .../AutoGenReaders/ConcernUsageReader.cs | 8 +- .../ConjugatedPortDefinitionReader.cs | 8 +- .../ConjugatedPortTypingReader.cs | 16 +- .../AutoGenReaders/ConjugationReader.cs | 16 +- .../ConnectionDefinitionReader.cs | 16 +- .../AutoGenReaders/ConnectionUsageReader.cs | 16 +- .../Readers/AutoGenReaders/ConnectorReader.cs | 16 +- .../ConstraintDefinitionReader.cs | 8 +- .../AutoGenReaders/ConstraintUsageReader.cs | 8 +- .../ConstructorExpressionReader.cs | 8 +- .../AutoGenReaders/CrossSubsettingReader.cs | 16 +- .../Readers/AutoGenReaders/DataTypeReader.cs | 8 +- .../AutoGenReaders/DecisionNodeReader.cs | 8 +- .../AutoGenReaders/DefinitionReader.cs | 8 +- .../AutoGenReaders/DependencyReader.cs | 16 +- .../AutoGenReaders/DifferencingReader.cs | 16 +- .../AutoGenReaders/DisjoiningReader.cs | 16 +- .../AutoGenReaders/DocumentationReader.cs | 8 +- .../ElementFilterMembershipReader.cs | 16 +- .../EndFeatureMembershipReader.cs | 16 +- .../EnumerationDefinitionReader.cs | 8 +- .../AutoGenReaders/EnumerationUsageReader.cs | 8 +- .../EventOccurrenceUsageReader.cs | 8 +- .../AutoGenReaders/ExhibitStateUsageReader.cs | 8 +- .../AutoGenReaders/ExpressionReader.cs | 8 +- .../FeatureChainExpressionReader.cs | 8 +- .../AutoGenReaders/FeatureChainingReader.cs | 16 +- .../AutoGenReaders/FeatureInvertingReader.cs | 16 +- .../AutoGenReaders/FeatureMembershipReader.cs | 16 +- .../Readers/AutoGenReaders/FeatureReader.cs | 8 +- .../FeatureReferenceExpressionReader.cs | 8 +- .../AutoGenReaders/FeatureTypingReader.cs | 16 +- .../AutoGenReaders/FeatureValueReader.cs | 16 +- .../AutoGenReaders/FlowDefinitionReader.cs | 16 +- .../Readers/AutoGenReaders/FlowEndReader.cs | 8 +- .../Readers/AutoGenReaders/FlowReader.cs | 16 +- .../Readers/AutoGenReaders/FlowUsageReader.cs | 16 +- .../ForLoopActionUsageReader.cs | 8 +- .../Readers/AutoGenReaders/ForkNodeReader.cs | 8 +- .../FramedConcernMembershipReader.cs | 16 +- .../Readers/AutoGenReaders/FunctionReader.cs | 8 +- .../AutoGenReaders/IfActionUsageReader.cs | 8 +- .../IncludeUseCaseUsageReader.cs | 8 +- .../AutoGenReaders/IndexExpressionReader.cs | 8 +- .../AutoGenReaders/InteractionReader.cs | 16 +- .../InterfaceDefinitionReader.cs | 16 +- .../AutoGenReaders/InterfaceUsageReader.cs | 16 +- .../AutoGenReaders/IntersectingReader.cs | 16 +- .../Readers/AutoGenReaders/InvariantReader.cs | 8 +- .../InvocationExpressionReader.cs | 8 +- .../AutoGenReaders/ItemDefinitionReader.cs | 8 +- .../Readers/AutoGenReaders/ItemUsageReader.cs | 8 +- .../Readers/AutoGenReaders/JoinNodeReader.cs | 8 +- .../AutoGenReaders/LibraryPackageReader.cs | 8 +- .../AutoGenReaders/LiteralBooleanReader.cs | 8 +- .../AutoGenReaders/LiteralExpressionReader.cs | 8 +- .../AutoGenReaders/LiteralInfinityReader.cs | 8 +- .../AutoGenReaders/LiteralIntegerReader.cs | 8 +- .../AutoGenReaders/LiteralRationalReader.cs | 8 +- .../AutoGenReaders/LiteralStringReader.cs | 8 +- .../AutoGenReaders/MembershipExposeReader.cs | 16 +- .../AutoGenReaders/MembershipImportReader.cs | 16 +- .../AutoGenReaders/MembershipReader.cs | 16 +- .../Readers/AutoGenReaders/MergeNodeReader.cs | 8 +- .../Readers/AutoGenReaders/MetaclassReader.cs | 8 +- .../MetadataAccessExpressionReader.cs | 8 +- .../MetadataDefinitionReader.cs | 8 +- .../AutoGenReaders/MetadataFeatureReader.cs | 8 +- .../AutoGenReaders/MetadataUsageReader.cs | 8 +- .../AutoGenReaders/MultiplicityRangeReader.cs | 8 +- .../AutoGenReaders/MultiplicityReader.cs | 8 +- .../AutoGenReaders/NamespaceExposeReader.cs | 16 +- .../AutoGenReaders/NamespaceImportReader.cs | 16 +- .../Readers/AutoGenReaders/NamespaceReader.cs | 8 +- .../AutoGenReaders/NullExpressionReader.cs | 8 +- .../ObjectiveMembershipReader.cs | 16 +- .../OccurrenceDefinitionReader.cs | 8 +- .../AutoGenReaders/OccurrenceUsageReader.cs | 8 +- .../OperatorExpressionReader.cs | 8 +- .../AutoGenReaders/OwningMembershipReader.cs | 16 +- .../Readers/AutoGenReaders/PackageReader.cs | 8 +- .../ParameterMembershipReader.cs | 16 +- .../AutoGenReaders/PartDefinitionReader.cs | 8 +- .../Readers/AutoGenReaders/PartUsageReader.cs | 8 +- .../AutoGenReaders/PayloadFeatureReader.cs | 8 +- .../PerformActionUsageReader.cs | 8 +- .../AutoGenReaders/PortConjugationReader.cs | 16 +- .../AutoGenReaders/PortDefinitionReader.cs | 8 +- .../Readers/AutoGenReaders/PortUsageReader.cs | 8 +- .../Readers/AutoGenReaders/PredicateReader.cs | 8 +- .../AutoGenReaders/RedefinitionReader.cs | 16 +- .../ReferenceSubsettingReader.cs | 16 +- .../AutoGenReaders/ReferenceUsageReader.cs | 8 +- .../RenderingDefinitionReader.cs | 8 +- .../AutoGenReaders/RenderingUsageReader.cs | 8 +- .../RequirementConstraintMembershipReader.cs | 16 +- .../RequirementDefinitionReader.cs | 8 +- .../AutoGenReaders/RequirementUsageReader.cs | 8 +- ...RequirementVerificationMembershipReader.cs | 16 +- .../ResultExpressionMembershipReader.cs | 16 +- .../ReturnParameterMembershipReader.cs | 16 +- .../SatisfyRequirementUsageReader.cs | 8 +- .../AutoGenReaders/SelectExpressionReader.cs | 8 +- .../AutoGenReaders/SendActionUsageReader.cs | 8 +- .../AutoGenReaders/SpecializationReader.cs | 16 +- .../StakeholderMembershipReader.cs | 16 +- .../AutoGenReaders/StateDefinitionReader.cs | 8 +- .../StateSubactionMembershipReader.cs | 16 +- .../AutoGenReaders/StateUsageReader.cs | 8 +- .../Readers/AutoGenReaders/StepReader.cs | 8 +- .../Readers/AutoGenReaders/StructureReader.cs | 8 +- .../AutoGenReaders/SubclassificationReader.cs | 16 +- .../AutoGenReaders/SubjectMembershipReader.cs | 16 +- .../AutoGenReaders/SubsettingReader.cs | 16 +- .../AutoGenReaders/SuccessionAsUsageReader.cs | 16 +- .../AutoGenReaders/SuccessionFlowReader.cs | 16 +- .../SuccessionFlowUsageReader.cs | 16 +- .../AutoGenReaders/SuccessionReader.cs | 16 +- .../TerminateActionUsageReader.cs | 8 +- .../TextualRepresentationReader.cs | 8 +- .../TransitionFeatureMembershipReader.cs | 16 +- .../AutoGenReaders/TransitionUsageReader.cs | 8 +- .../TriggerInvocationExpressionReader.cs | 8 +- .../AutoGenReaders/TypeFeaturingReader.cs | 16 +- .../Readers/AutoGenReaders/TypeReader.cs | 8 +- .../Readers/AutoGenReaders/UnioningReader.cs | 16 +- .../Readers/AutoGenReaders/UsageReader.cs | 8 +- .../AutoGenReaders/UseCaseDefinitionReader.cs | 8 +- .../AutoGenReaders/UseCaseUsageReader.cs | 8 +- .../AutoGenReaders/VariantMembershipReader.cs | 16 +- .../VerificationCaseDefinitionReader.cs | 8 +- .../VerificationCaseUsageReader.cs | 8 +- .../AutoGenReaders/ViewDefinitionReader.cs | 8 +- .../ViewRenderingMembershipReader.cs | 16 +- .../Readers/AutoGenReaders/ViewUsageReader.cs | 8 +- .../ViewpointDefinitionReader.cs | 8 +- .../AutoGenReaders/ViewpointUsageReader.cs | 8 +- .../WhileLoopActionUsageReader.cs | 8 +- SysML2.NET/Collections/ContainerList.cs | 102 ++++++++++++ .../Core/AutoGenPoco/AcceptActionUsage.cs | 24 ++- .../Core/AutoGenPoco/ActionDefinition.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/ActionUsage.cs | 24 ++- .../Core/AutoGenPoco/ActorMembership.cs | 38 ++++- .../Core/AutoGenPoco/AllocationDefinition.cs | 38 ++++- .../Core/AutoGenPoco/AllocationUsage.cs | 38 ++++- .../AutoGenPoco/AnalysisCaseDefinition.cs | 24 ++- .../Core/AutoGenPoco/AnalysisCaseUsage.cs | 24 ++- .../Core/AutoGenPoco/AnnotatingElement.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/Annotation.cs | 38 ++++- .../Core/AutoGenPoco/AssertConstraintUsage.cs | 24 ++- .../Core/AutoGenPoco/AssignmentActionUsage.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/Association.cs | 38 ++++- .../Core/AutoGenPoco/AssociationStructure.cs | 38 ++++- .../Core/AutoGenPoco/AttributeDefinition.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/AttributeUsage.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/Behavior.cs | 24 ++- .../Core/AutoGenPoco/BindingConnector.cs | 38 ++++- .../AutoGenPoco/BindingConnectorAsUsage.cs | 38 ++++- .../Core/AutoGenPoco/BooleanExpression.cs | 24 ++- .../Core/AutoGenPoco/CalculationDefinition.cs | 24 ++- .../Core/AutoGenPoco/CalculationUsage.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/CaseDefinition.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/CaseUsage.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/Class.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/Classifier.cs | 24 ++- .../Core/AutoGenPoco/CollectExpression.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/Comment.cs | 24 ++- .../Core/AutoGenPoco/ConcernDefinition.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/ConcernUsage.cs | 24 ++- .../AutoGenPoco/ConjugatedPortDefinition.cs | 24 ++- .../Core/AutoGenPoco/ConjugatedPortTyping.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/Conjugation.cs | 38 ++++- .../Core/AutoGenPoco/ConnectionDefinition.cs | 38 ++++- .../Core/AutoGenPoco/ConnectionUsage.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/Connector.cs | 38 ++++- .../Core/AutoGenPoco/ConstraintDefinition.cs | 24 ++- .../Core/AutoGenPoco/ConstraintUsage.cs | 24 ++- .../Core/AutoGenPoco/ConstructorExpression.cs | 24 ++- .../Core/AutoGenPoco/CrossSubsetting.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/DataType.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/DecisionNode.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/Definition.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/Dependency.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/Differencing.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/Disjoining.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/Documentation.cs | 24 ++- .../AutoGenPoco/ElementFilterMembership.cs | 38 ++++- .../Core/AutoGenPoco/EndFeatureMembership.cs | 38 ++++- .../Core/AutoGenPoco/EnumerationDefinition.cs | 24 ++- .../Core/AutoGenPoco/EnumerationUsage.cs | 24 ++- .../Core/AutoGenPoco/EventOccurrenceUsage.cs | 24 ++- .../Core/AutoGenPoco/ExhibitStateUsage.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/Expression.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/Feature.cs | 24 ++- .../AutoGenPoco/FeatureChainExpression.cs | 24 ++- .../Core/AutoGenPoco/FeatureChaining.cs | 38 ++++- .../Core/AutoGenPoco/FeatureInverting.cs | 38 ++++- .../Core/AutoGenPoco/FeatureMembership.cs | 38 ++++- .../AutoGenPoco/FeatureReferenceExpression.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/FeatureTyping.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/FeatureValue.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/Flow.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/FlowDefinition.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/FlowEnd.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/FlowUsage.cs | 38 ++++- .../Core/AutoGenPoco/ForLoopActionUsage.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/ForkNode.cs | 24 ++- .../AutoGenPoco/FramedConcernMembership.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/Function.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/IElement.cs | 4 +- SysML2.NET/Core/AutoGenPoco/IRelationship.cs | 4 +- SysML2.NET/Core/AutoGenPoco/IfActionUsage.cs | 24 ++- .../Core/AutoGenPoco/IncludeUseCaseUsage.cs | 24 ++- .../Core/AutoGenPoco/IndexExpression.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/Interaction.cs | 38 ++++- .../Core/AutoGenPoco/InterfaceDefinition.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/InterfaceUsage.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/Intersecting.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/Invariant.cs | 24 ++- .../Core/AutoGenPoco/InvocationExpression.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/ItemDefinition.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/ItemUsage.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/JoinNode.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/LibraryPackage.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/LiteralBoolean.cs | 24 ++- .../Core/AutoGenPoco/LiteralExpression.cs | 24 ++- .../Core/AutoGenPoco/LiteralInfinity.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/LiteralInteger.cs | 24 ++- .../Core/AutoGenPoco/LiteralRational.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/LiteralString.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/Membership.cs | 38 ++++- .../Core/AutoGenPoco/MembershipExpose.cs | 38 ++++- .../Core/AutoGenPoco/MembershipImport.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/MergeNode.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/Metaclass.cs | 24 ++- .../AutoGenPoco/MetadataAccessExpression.cs | 24 ++- .../Core/AutoGenPoco/MetadataDefinition.cs | 24 ++- .../Core/AutoGenPoco/MetadataFeature.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/MetadataUsage.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/Multiplicity.cs | 24 ++- .../Core/AutoGenPoco/MultiplicityRange.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/Namespace.cs | 24 ++- .../Core/AutoGenPoco/NamespaceExpose.cs | 38 ++++- .../Core/AutoGenPoco/NamespaceImport.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/NullExpression.cs | 24 ++- .../Core/AutoGenPoco/ObjectiveMembership.cs | 38 ++++- .../Core/AutoGenPoco/OccurrenceDefinition.cs | 24 ++- .../Core/AutoGenPoco/OccurrenceUsage.cs | 24 ++- .../Core/AutoGenPoco/OperatorExpression.cs | 24 ++- .../Core/AutoGenPoco/OwningMembership.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/Package.cs | 24 ++- .../Core/AutoGenPoco/ParameterMembership.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/PartDefinition.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/PartUsage.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/PayloadFeature.cs | 24 ++- .../Core/AutoGenPoco/PerformActionUsage.cs | 24 ++- .../Core/AutoGenPoco/PortConjugation.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/PortDefinition.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/PortUsage.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/Predicate.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/Redefinition.cs | 38 ++++- .../Core/AutoGenPoco/ReferenceSubsetting.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/ReferenceUsage.cs | 24 ++- .../Core/AutoGenPoco/RenderingDefinition.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/RenderingUsage.cs | 24 ++- .../RequirementConstraintMembership.cs | 38 ++++- .../Core/AutoGenPoco/RequirementDefinition.cs | 24 ++- .../Core/AutoGenPoco/RequirementUsage.cs | 24 ++- .../RequirementVerificationMembership.cs | 38 ++++- .../AutoGenPoco/ResultExpressionMembership.cs | 38 ++++- .../AutoGenPoco/ReturnParameterMembership.cs | 38 ++++- .../AutoGenPoco/SatisfyRequirementUsage.cs | 24 ++- .../Core/AutoGenPoco/SelectExpression.cs | 24 ++- .../Core/AutoGenPoco/SendActionUsage.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/Specialization.cs | 38 ++++- .../Core/AutoGenPoco/StakeholderMembership.cs | 38 ++++- .../Core/AutoGenPoco/StateDefinition.cs | 24 ++- .../AutoGenPoco/StateSubactionMembership.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/StateUsage.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/Step.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/Structure.cs | 24 ++- .../Core/AutoGenPoco/Subclassification.cs | 38 ++++- .../Core/AutoGenPoco/SubjectMembership.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/Subsetting.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/Succession.cs | 38 ++++- .../Core/AutoGenPoco/SuccessionAsUsage.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/SuccessionFlow.cs | 38 ++++- .../Core/AutoGenPoco/SuccessionFlowUsage.cs | 38 ++++- .../Core/AutoGenPoco/TerminateActionUsage.cs | 24 ++- .../Core/AutoGenPoco/TextualRepresentation.cs | 24 ++- .../TransitionFeatureMembership.cs | 38 ++++- .../Core/AutoGenPoco/TransitionUsage.cs | 24 ++- .../TriggerInvocationExpression.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/Type.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/TypeFeaturing.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/Unioning.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/Usage.cs | 24 ++- .../Core/AutoGenPoco/UseCaseDefinition.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/UseCaseUsage.cs | 24 ++- .../Core/AutoGenPoco/VariantMembership.cs | 38 ++++- .../AutoGenPoco/VerificationCaseDefinition.cs | 24 ++- .../Core/AutoGenPoco/VerificationCaseUsage.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/ViewDefinition.cs | 24 ++- .../AutoGenPoco/ViewRenderingMembership.cs | 38 ++++- SysML2.NET/Core/AutoGenPoco/ViewUsage.cs | 24 ++- .../Core/AutoGenPoco/ViewpointDefinition.cs | 24 ++- SysML2.NET/Core/AutoGenPoco/ViewpointUsage.cs | 24 ++- .../Core/AutoGenPoco/WhileLoopActionUsage.cs | 24 ++- SysML2.NET/Core/Poco/IContainedElement.cs | 40 +++++ .../Core/Poco/IContainedRelationship.cs | 40 +++++ SysML2.NET/Extensions/ElementExtensions.cs | 91 ++++++++++ SysML2.NET/SysML2.NET.csproj | 4 +- 764 files changed, 8325 insertions(+), 3401 deletions(-) create mode 100644 SysML2.NET/Collections/ContainerList.cs create mode 100644 SysML2.NET/Core/Poco/IContainedElement.cs create mode 100644 SysML2.NET/Core/Poco/IContainedRelationship.cs create mode 100644 SysML2.NET/Extensions/ElementExtensions.cs diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/AnnotatingElement.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/AnnotatingElement.cs index 8da41d1b5..b2a1aeae2 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/AnnotatingElement.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/AnnotatingElement.cs @@ -31,6 +31,7 @@ namespace SysML2.NET.Core.POCO.Root.Annotations using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -40,8 +41,19 @@ namespace SysML2.NET.Core.POCO.Root.Annotations /// [Class(xmiId: "_19_0_2_12e503d9_1594145576693_532940_27", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class AnnotatingElement : IAnnotatingElement + public partial class AnnotatingElement : IAnnotatingElement, IContainedElement { + /// + /// Initialize a new instance of + /// + public AnnotatingElement() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -170,7 +182,10 @@ public partial class AnnotatingElement : IAnnotatingElement [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -213,7 +228,10 @@ public partial class AnnotatingElement : IAnnotatingElement [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Association.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Association.cs index 8cb750bcd..07a5f3509 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Association.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Association.cs @@ -35,6 +35,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Associations using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -44,8 +45,23 @@ namespace SysML2.NET.Core.POCO.Kernel.Associations /// [Class(xmiId: "_18_5_3_12e503d9_1533160651716_116234_42240", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Association : IAssociation + public partial class Association : IAssociation, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public Association() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + } + /// /// Gets or sets the unique identifier /// @@ -413,7 +429,10 @@ public partial class Association : IAssociation [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -421,7 +440,10 @@ public partial class Association : IAssociation [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -483,7 +505,10 @@ public partial class Association : IAssociation [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -491,7 +516,10 @@ public partial class Association : IAssociation [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Dependency.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Dependency.cs index 6dd128047..8a3406055 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Dependency.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Dependency.cs @@ -32,6 +32,7 @@ namespace SysML2.NET.Core.POCO.Root.Dependencies using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -43,8 +44,23 @@ namespace SysML2.NET.Core.POCO.Root.Dependencies /// [Class(xmiId: "_19_0_2_12e503d9_1594006219028_628649_74", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Dependency : IDependency + public partial class Dependency : IDependency, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public Dependency() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -161,7 +177,10 @@ public partial class Dependency : IDependency [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -169,7 +188,10 @@ public partial class Dependency : IDependency [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -203,7 +225,10 @@ public partial class Dependency : IDependency [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -211,7 +236,10 @@ public partial class Dependency : IDependency [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/EnumerationDefinition.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/EnumerationDefinition.cs index 3182f8533..a6dae0497 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/EnumerationDefinition.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/EnumerationDefinition.cs @@ -56,6 +56,7 @@ namespace SysML2.NET.Core.POCO.Systems.Enumerations using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -65,8 +66,19 @@ namespace SysML2.NET.Core.POCO.Systems.Enumerations /// [Class(xmiId: "_19_0_4_12e503d9_1606946467364_179493_153", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class EnumerationDefinition : IEnumerationDefinition + public partial class EnumerationDefinition : IEnumerationDefinition, IContainedElement { + /// + /// Initialize a new instance of + /// + public EnumerationDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -603,7 +615,10 @@ bool Systems.DefinitionAndUsage.IDefinition.IsVariation [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -737,7 +752,10 @@ bool Systems.DefinitionAndUsage.IDefinition.IsVariation [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Feature.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Feature.cs index 19f0a5f63..6865c94fb 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Feature.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Feature.cs @@ -34,6 +34,7 @@ namespace SysML2.NET.Core.POCO.Core.Features using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -56,8 +57,19 @@ namespace SysML2.NET.Core.POCO.Core.Features /// [Class(xmiId: "_18_5_3_12e503d9_1533160651684_893483_42160", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Feature : IFeature + public partial class Feature : IFeature, IContainedElement { + /// + /// Initialize a new instance of + /// + public Feature() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -578,7 +590,10 @@ public partial class Feature : IFeature [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -669,7 +684,10 @@ public partial class Feature : IFeature [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/FeatureTyping.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/FeatureTyping.cs index 90b729d52..8b962c8b4 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/FeatureTyping.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/FeatureTyping.cs @@ -33,6 +33,7 @@ namespace SysML2.NET.Core.POCO.Core.Features using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -43,8 +44,23 @@ namespace SysML2.NET.Core.POCO.Core.Features /// [Class(xmiId: "_18_5_3_12e503d9_1543180339807_437641_20928", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class FeatureTyping : IFeatureTyping + public partial class FeatureTyping : IFeatureTyping, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public FeatureTyping() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -169,7 +185,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -177,7 +196,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -220,7 +242,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -228,7 +253,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the specific Type of this Specialization and owns it as its owningRelatedElement. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Flow.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Flow.cs index 339a691e3..a14f3624d 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Flow.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Flow.cs @@ -39,6 +39,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Interactions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -47,8 +48,23 @@ namespace SysML2.NET.Core.POCO.Kernel.Interactions /// [Class(xmiId: "_18_5_3_b9102da_1536869417406_861526_17744", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Flow : IFlow + public partial class Flow : IFlow, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public Flow() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + } + /// /// Gets or sets the unique identifier /// @@ -634,7 +650,10 @@ public partial class Flow : IFlow [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -642,7 +661,10 @@ public partial class Flow : IFlow [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -733,7 +755,10 @@ public partial class Flow : IFlow [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -741,7 +766,10 @@ public partial class Flow : IFlow [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/FramedConcernMembership.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/FramedConcernMembership.cs index c3bb9fd41..249adf1d8 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/FramedConcernMembership.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/FramedConcernMembership.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; using SysML2.NET.Core.POCO.Systems.Constraints; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,23 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements /// [Class(xmiId: "_19_0_4_12e503d9_1617120429499_126250_3667", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class FramedConcernMembership : IFramedConcernMembership + public partial class FramedConcernMembership : IFramedConcernMembership, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public FramedConcernMembership() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -296,7 +312,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -304,7 +323,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -338,7 +360,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -346,7 +371,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that owns this FeatureMembership. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IElement.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IElement.cs index 2756493d2..093b28379 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IElement.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IElement.cs @@ -124,7 +124,7 @@ public partial interface IElement /// [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] - List OwnedRelationship { get; set; } + IReadOnlyCollection OwnedRelationship { get; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -154,7 +154,7 @@ public partial interface IElement /// [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] - IRelationship OwningRelationship { get; set; } + IRelationship OwningRelationship { get; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IRelationship.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IRelationship.cs index 365bad428..e646d4b75 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IRelationship.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IRelationship.cs @@ -62,14 +62,14 @@ public partial interface IRelationship : IElement /// [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] - List OwnedRelatedElement { get; set; } + IReadOnlyCollection OwnedRelatedElement { get; } /// /// The relatedElement of this Relationship that owns the Relationship, if any. /// [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] - IElement OwningRelatedElement { get; set; } + IElement OwningRelatedElement { get; } /// /// The Elements that are related by this Relationship, derived as the union of the source and target diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/LiteralInteger.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/LiteralInteger.cs index 00222b7a0..0086854e5 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/LiteralInteger.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/LiteralInteger.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions /// [Class(xmiId: "_18_5_3_12e503d9_1533160651681_567347_42153", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class LiteralInteger : ILiteralInteger + public partial class LiteralInteger : ILiteralInteger, IContainedElement { + /// + /// Initialize a new instance of + /// + public LiteralInteger() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -593,7 +605,10 @@ public partial class LiteralInteger : ILiteralInteger [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -684,7 +699,10 @@ public partial class LiteralInteger : ILiteralInteger [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/LiteralRational.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/LiteralRational.cs index 41085923e..43b72d548 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/LiteralRational.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/LiteralRational.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions /// [Class(xmiId: "_18_5_3_12e503d9_1533160651706_235283_42203", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class LiteralRational : ILiteralRational + public partial class LiteralRational : ILiteralRational, IContainedElement { + /// + /// Initialize a new instance of + /// + public LiteralRational() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -593,7 +605,10 @@ public partial class LiteralRational : ILiteralRational [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -684,7 +699,10 @@ public partial class LiteralRational : ILiteralRational [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Membership.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Membership.cs index e6639c8a8..75f07285c 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Membership.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Membership.cs @@ -32,6 +32,7 @@ namespace SysML2.NET.Core.POCO.Root.Namespaces using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -46,8 +47,23 @@ namespace SysML2.NET.Core.POCO.Root.Namespaces /// [Class(xmiId: "_18_5_3_12e503d9_1533160651680_888716_42152", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Membership : IMembership + public partial class Membership : IMembership, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public Membership() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -195,7 +211,10 @@ public partial class Membership : IMembership [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -203,7 +222,10 @@ public partial class Membership : IMembership [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -237,7 +259,10 @@ public partial class Membership : IMembership [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -245,7 +270,10 @@ public partial class Membership : IMembership [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/MultiplicityRange.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/MultiplicityRange.cs index 2d7f32996..60ebbc4ca 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/MultiplicityRange.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/MultiplicityRange.cs @@ -36,6 +36,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Multiplicities using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -49,8 +50,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Multiplicities /// [Class(xmiId: "_19_0_2_12e503d9_1573086225407_540120_4572", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class MultiplicityRange : IMultiplicityRange + public partial class MultiplicityRange : IMultiplicityRange, IContainedElement { + /// + /// Initialize a new instance of + /// + public MultiplicityRange() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -590,7 +602,10 @@ public partial class MultiplicityRange : IMultiplicityRange [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -681,7 +696,10 @@ public partial class MultiplicityRange : IMultiplicityRange [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/OwningMembership.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/OwningMembership.cs index 5f12071d2..d6bed4181 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/OwningMembership.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/OwningMembership.cs @@ -32,6 +32,7 @@ namespace SysML2.NET.Core.POCO.Root.Namespaces using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -40,8 +41,23 @@ namespace SysML2.NET.Core.POCO.Root.Namespaces /// [Class(xmiId: "_19_0_4_12e503d9_1648180804650_933390_31", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class OwningMembership : IOwningMembership + public partial class OwningMembership : IOwningMembership, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public OwningMembership() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -239,7 +255,10 @@ string IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -247,7 +266,10 @@ string IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -281,7 +303,10 @@ string IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -289,7 +314,10 @@ string IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/ReferenceSubsetting.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/ReferenceSubsetting.cs index 66c45f598..847b9496a 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/ReferenceSubsetting.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/ReferenceSubsetting.cs @@ -33,6 +33,7 @@ namespace SysML2.NET.Core.POCO.Core.Features using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,23 @@ namespace SysML2.NET.Core.POCO.Core.Features /// [Class(xmiId: "_19_0_4_12e503d9_1661554793960_500657_60", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ReferenceSubsetting : IReferenceSubsetting + public partial class ReferenceSubsetting : IReferenceSubsetting, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public ReferenceSubsetting() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -174,7 +190,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -182,7 +201,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -226,7 +248,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -234,7 +259,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the specific Type of this Specialization and owns it as its owningRelatedElement. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/RequirementUsage.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/RequirementUsage.cs index 1ba1ac06b..e0566269d 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/RequirementUsage.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/RequirementUsage.cs @@ -61,6 +61,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -68,8 +69,19 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements /// [Class(xmiId: "_19_0_2_12e503d9_1582991078230_41497_1143", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class RequirementUsage : IRequirementUsage + public partial class RequirementUsage : IRequirementUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public RequirementUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -959,7 +971,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1058,7 +1073,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/SelectExpression.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/SelectExpression.cs index 76e170ce7..bc1af91d2 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/SelectExpression.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/SelectExpression.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions /// [Class(xmiId: "_18_5_3_12e503d9_1559596717567_82711_29088", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class SelectExpression : ISelectExpression + public partial class SelectExpression : ISelectExpression, IContainedElement { + /// + /// Initialize a new instance of + /// + public SelectExpression() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -634,7 +646,10 @@ string IOperatorExpression.Operator [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -725,7 +740,10 @@ string IOperatorExpression.Operator [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Subclassification.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Subclassification.cs index 9f9d4d44b..dde5e8f0b 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Subclassification.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Subclassification.cs @@ -33,6 +33,7 @@ namespace SysML2.NET.Core.POCO.Core.Classifiers using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -41,8 +42,23 @@ namespace SysML2.NET.Core.POCO.Core.Classifiers /// [Class(xmiId: "_18_5_3_12e503d9_1543188778639_872842_24973", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Subclassification : ISubclassification + public partial class Subclassification : ISubclassification, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public Subclassification() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -170,7 +186,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -178,7 +197,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -220,7 +242,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -228,7 +253,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the specific Type of this Specialization and owns it as its owningRelatedElement. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/TextualRepresentation.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/TextualRepresentation.cs index 6b41cac3b..732a887a2 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/TextualRepresentation.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/TextualRepresentation.cs @@ -31,6 +31,7 @@ namespace SysML2.NET.Core.POCO.Root.Annotations using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -65,8 +66,19 @@ namespace SysML2.NET.Core.POCO.Root.Annotations /// [Class(xmiId: "_19_0_2_12e503d9_1594152214531_455349_2448", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class TextualRepresentation : ITextualRepresentation + public partial class TextualRepresentation : ITextualRepresentation, IContainedElement { + /// + /// Initialize a new instance of + /// + public TextualRepresentation() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -210,7 +222,10 @@ public partial class TextualRepresentation : ITextualRepresentation [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -253,7 +268,10 @@ public partial class TextualRepresentation : ITextualRepresentation [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Usage.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Usage.cs index 98f93c39d..e07a842bb 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Usage.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Usage.cs @@ -57,6 +57,7 @@ namespace SysML2.NET.Core.POCO.Systems.DefinitionAndUsage using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -71,8 +72,19 @@ namespace SysML2.NET.Core.POCO.Systems.DefinitionAndUsage /// [Class(xmiId: "_18_5_3_12e503d9_1565469997820_598571_19982", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Usage : IUsage + public partial class Usage : IUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public Usage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -862,7 +874,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -961,7 +976,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/AnnotatingElementExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/AnnotatingElementExtensions.cs index 5e5b7f708..80b283d1f 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/AnnotatingElementExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/AnnotatingElementExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Root.Annotations; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -81,7 +82,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -130,17 +131,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Root.Annotations.Ann { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/AssociationExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/AssociationExtensions.cs index cecaaaf09..9f7cb5157 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/AssociationExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/AssociationExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Associations; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -87,7 +88,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -96,7 +97,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -145,7 +146,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Associations. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -155,26 +156,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Associations. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/DependencyExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/DependencyExtensions.cs index 5fe72f8e4..d3b2b7c08 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/DependencyExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/DependencyExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Root.Dependencies; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -91,7 +92,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -100,7 +101,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -167,7 +168,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Root.Dependencies.De { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -177,26 +178,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Root.Dependencies.De { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } var supplierToAdd = dto.Supplier.Except(poco.Supplier.Select(x => x.Id)); diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/EnumerationDefinitionExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/EnumerationDefinitionExtensions.cs index bdb5c4f6a..02f8ccf9f 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/EnumerationDefinitionExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/EnumerationDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Enumerations; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -87,7 +88,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -136,17 +137,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Enumerations { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/FeatureExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/FeatureExtensions.cs index f76ac9f25..26345175d 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/FeatureExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/FeatureExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Core.Features; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -152,17 +153,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Features.Featur { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/FeatureTypingExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/FeatureTypingExtensions.cs index 1d69a3329..9ea1913c3 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/FeatureTypingExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/FeatureTypingExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Core.Features; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -141,7 +142,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Features.Featur { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -151,26 +152,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Features.Featur { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } if (cache.TryGetValue(dto.Type, out lazyPoco)) diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/FlowExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/FlowExtensions.cs index a396d7687..22260590d 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/FlowExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/FlowExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Interactions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -114,7 +115,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -163,7 +164,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Interactions. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -173,26 +174,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Interactions. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/FramedConcernMembershipExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/FramedConcernMembershipExtensions.cs index 9074bcd3d..a2e34e7db 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/FramedConcernMembershipExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/FramedConcernMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Requirements; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -85,7 +86,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -94,7 +95,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -145,7 +146,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Requirements { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -155,26 +156,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Requirements { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/LiteralIntegerExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/LiteralIntegerExtensions.cs index 72963acdd..d44cb165f 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/LiteralIntegerExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/LiteralIntegerExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Expressions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -154,17 +155,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Expressions.L { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/LiteralRationalExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/LiteralRationalExtensions.cs index bb9c64ed7..a69010fb3 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/LiteralRationalExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/LiteralRationalExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Expressions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -154,17 +155,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Expressions.L { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/MembershipExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/MembershipExtensions.cs index cb24cbc8a..a60876c51 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/MembershipExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/MembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Root.Namespaces; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -87,7 +88,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -96,7 +97,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,7 +157,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Root.Namespaces.Memb { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -166,26 +167,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Root.Namespaces.Memb { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/MultiplicityRangeExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/MultiplicityRangeExtensions.cs index 08c9c86bb..cb20e2e24 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/MultiplicityRangeExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/MultiplicityRangeExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Multiplicities; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -152,17 +153,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Multiplicitie { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/OwningMembershipExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/OwningMembershipExtensions.cs index e853c884c..ccfdc3f56 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/OwningMembershipExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/OwningMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Root.Namespaces; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -143,7 +144,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Root.Namespaces.Owni { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -153,26 +154,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Root.Namespaces.Owni { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/ReferenceSubsettingExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/ReferenceSubsettingExtensions.cs index b082fc1ce..98fd68d5e 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/ReferenceSubsettingExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/ReferenceSubsettingExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Core.Features; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -141,7 +142,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Features.Refere { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -151,26 +152,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Features.Refere { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } if (cache.TryGetValue(dto.ReferencedFeature, out lazyPoco)) diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/RequirementUsageExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/RequirementUsageExtensions.cs index 48de9b49d..865a4ee0e 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/RequirementUsageExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/RequirementUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Requirements; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Requirements { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/SelectExpressionExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/SelectExpressionExtensions.cs index d143d866b..6d421bbc7 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/SelectExpressionExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/SelectExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Expressions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -154,17 +155,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Expressions.S { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/SubclassificationExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/SubclassificationExtensions.cs index f0c5181d1..b6ac60748 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/SubclassificationExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/SubclassificationExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Core.Classifiers; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -141,7 +142,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Classifiers.Sub { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -151,26 +152,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Classifiers.Sub { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } if (cache.TryGetValue(dto.Subclassifier, out lazyPoco)) diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/TextualRepresentationExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/TextualRepresentationExtensions.cs index 305c3b985..903aa3bad 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/TextualRepresentationExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/TextualRepresentationExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Root.Annotations; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -85,7 +86,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -134,17 +135,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Root.Annotations.Tex { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/UsageExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/UsageExtensions.cs index 0d0cd01f0..a9a1b12ef 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/UsageExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoExtension/UsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.DefinitionAndUsage; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -152,17 +153,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.DefinitionAn { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/AnnotatingElementExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/AnnotatingElementExtensions.cs index 0e8c8f5f7..b4de8c5c9 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/AnnotatingElementExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/AnnotatingElementExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/AssociationExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/AssociationExtensions.cs index ceb931a28..4037a1ff4 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/AssociationExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/AssociationExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/DependencyExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/DependencyExtensions.cs index b893a938d..2658ec4ee 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/DependencyExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/DependencyExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -201,7 +202,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/EnumerationDefinitionExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/EnumerationDefinitionExtensions.cs index c5036bfc0..a714bf647 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/EnumerationDefinitionExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/EnumerationDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/FeatureExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/FeatureExtensions.cs index 400f8e1a0..63a3c0479 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/FeatureExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/FeatureExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/FeatureTypingExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/FeatureTypingExtensions.cs index 88243ed4f..ea8f3bc2c 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/FeatureTypingExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/FeatureTypingExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -193,7 +194,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -216,7 +217,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/FlowExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/FlowExtensions.cs index 98184fda7..a8b7cb45c 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/FlowExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/FlowExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/FramedConcernMembershipExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/FramedConcernMembershipExtensions.cs index 73358929e..36539d249 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/FramedConcernMembershipExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/FramedConcernMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/LiteralIntegerExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/LiteralIntegerExtensions.cs index fe3b9fe77..082678cc2 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/LiteralIntegerExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/LiteralIntegerExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/LiteralRationalExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/LiteralRationalExtensions.cs index 9e90871dd..5c49509a5 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/LiteralRationalExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/LiteralRationalExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/MembershipExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/MembershipExtensions.cs index 2e53dbcfc..5d261a524 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/MembershipExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/MembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -116,7 +117,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -174,7 +175,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -197,7 +198,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/MultiplicityRangeExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/MultiplicityRangeExtensions.cs index 8f430a98a..753dc450f 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/MultiplicityRangeExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/MultiplicityRangeExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/OwningMembershipExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/OwningMembershipExtensions.cs index 96089e98c..22779a661 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/OwningMembershipExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/OwningMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/ReferenceSubsettingExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/ReferenceSubsettingExtensions.cs index 036748527..f6cd59748 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/ReferenceSubsettingExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/ReferenceSubsettingExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -174,7 +175,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -197,7 +198,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/RequirementUsageExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/RequirementUsageExtensions.cs index 0a8260ebe..cd0a2d1de 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/RequirementUsageExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/RequirementUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/SelectExpressionExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/SelectExpressionExtensions.cs index 72cd23d75..46008de2f 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/SelectExpressionExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/SelectExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/SubclassificationExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/SubclassificationExtensions.cs index 9b777f6c4..525ed19aa 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/SubclassificationExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/SubclassificationExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -193,7 +194,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -216,7 +217,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/TextualRepresentationExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/TextualRepresentationExtensions.cs index d25015f32..7062d68b9 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/TextualRepresentationExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/TextualRepresentationExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/UsageExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/UsageExtensions.cs index c197e3740..969b8f58c 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/UsageExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPocoReferenceResolveExtension/UsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/AnnotatingElementReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/AnnotatingElementReader.cs index d6273cd25..c61ad6030 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/AnnotatingElementReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/AnnotatingElementReader.cs @@ -36,6 +36,7 @@ namespace SysML2.NET.Serializer.Xmi.Readers using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; using SysML2.NET.Core.POCO.Root.Annotations; + using SysML2.NET.Core.POCO.Root.Elements; /// /// The purpose of the is to read an instance of @@ -258,7 +259,7 @@ public override IAnnotatingElement Read(XmlReader xmiReader, Uri currentLocation { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -279,7 +280,7 @@ public override IAnnotatingElement Read(XmlReader xmiReader, Uri currentLocation { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -486,7 +487,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -507,7 +508,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/AssociationReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/AssociationReader.cs index d992c5e92..8216d7169 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/AssociationReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/AssociationReader.cs @@ -40,6 +40,7 @@ namespace SysML2.NET.Serializer.Xmi.Readers using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; using SysML2.NET.Core.POCO.Kernel.Associations; + using SysML2.NET.Core.POCO.Root.Elements; /// /// The purpose of the is to read an instance of @@ -358,7 +359,7 @@ public override IAssociation Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -379,7 +380,7 @@ public override IAssociation Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -400,7 +401,7 @@ public override IAssociation Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -421,7 +422,7 @@ public override IAssociation Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -724,7 +725,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curr { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -745,7 +746,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curr { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -766,7 +767,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curr { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -787,7 +788,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curr { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/DependencyReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/DependencyReader.cs index c2b3ef003..1264907be 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/DependencyReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/DependencyReader.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Serializer.Xmi.Readers using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; using SysML2.NET.Core.POCO.Root.Dependencies; + using SysML2.NET.Core.POCO.Root.Elements; /// /// The purpose of the is to read an instance of @@ -372,7 +373,7 @@ public override IDependency Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -393,7 +394,7 @@ public override IDependency Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -414,7 +415,7 @@ public override IDependency Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -435,7 +436,7 @@ public override IDependency Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -776,7 +777,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -797,7 +798,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -818,7 +819,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -839,7 +840,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/EnumerationDefinitionReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/EnumerationDefinitionReader.cs index ec2a9e9f3..32b744c87 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/EnumerationDefinitionReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/EnumerationDefinitionReader.cs @@ -61,6 +61,7 @@ namespace SysML2.NET.Serializer.Xmi.Readers using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; using SysML2.NET.Core.POCO.Systems.Enumerations; + using SysML2.NET.Core.POCO.Root.Elements; /// /// The purpose of the is to read an instance of @@ -349,7 +350,7 @@ public override IEnumerationDefinition Read(XmlReader xmiReader, Uri currentLoca { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -370,7 +371,7 @@ public override IEnumerationDefinition Read(XmlReader xmiReader, Uri currentLoca { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -643,7 +644,7 @@ public override async Task ReadAsync(XmlReader xmiReader { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -664,7 +665,7 @@ public override async Task ReadAsync(XmlReader xmiReader { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/FeatureReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/FeatureReader.cs index 4007426e4..420b09617 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/FeatureReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/FeatureReader.cs @@ -39,6 +39,7 @@ namespace SysML2.NET.Serializer.Xmi.Readers using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; + using SysML2.NET.Core.POCO.Root.Elements; /// /// The purpose of the is to read an instance of @@ -503,7 +504,7 @@ public override IFeature Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -524,7 +525,7 @@ public override IFeature Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -973,7 +974,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentL { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -994,7 +995,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentL { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/FeatureTypingReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/FeatureTypingReader.cs index 80341aab1..98c1a7336 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/FeatureTypingReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/FeatureTypingReader.cs @@ -38,6 +38,7 @@ namespace SysML2.NET.Serializer.Xmi.Readers using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; + using SysML2.NET.Core.POCO.Root.Elements; /// /// The purpose of the is to read an instance of @@ -332,7 +333,7 @@ public override IFeatureTyping Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -353,7 +354,7 @@ public override IFeatureTyping Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -374,7 +375,7 @@ public override IFeatureTyping Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -395,7 +396,7 @@ public override IFeatureTyping Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -716,7 +717,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cu { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -737,7 +738,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cu { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -758,7 +759,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cu { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -779,7 +780,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cu { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/FlowReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/FlowReader.cs index 0298cbb59..f0c0083bc 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/FlowReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/FlowReader.cs @@ -44,6 +44,7 @@ namespace SysML2.NET.Serializer.Xmi.Readers using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; using SysML2.NET.Core.POCO.Kernel.Interactions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// The purpose of the is to read an instance of @@ -560,7 +561,7 @@ public override IFlow Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -581,7 +582,7 @@ public override IFlow Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -602,7 +603,7 @@ public override IFlow Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -623,7 +624,7 @@ public override IFlow Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1124,7 +1125,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentLoca { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -1145,7 +1146,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentLoca { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1166,7 +1167,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentLoca { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -1187,7 +1188,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentLoca { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/FramedConcernMembershipReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/FramedConcernMembershipReader.cs index acf56b30f..aec6ea208 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/FramedConcernMembershipReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/FramedConcernMembershipReader.cs @@ -42,6 +42,7 @@ namespace SysML2.NET.Serializer.Xmi.Readers using SysML2.NET.Core.POCO.Root.Namespaces; using SysML2.NET.Core.POCO.Systems.Constraints; using SysML2.NET.Core.POCO.Systems.Requirements; + using SysML2.NET.Core.POCO.Root.Elements; /// /// The purpose of the is to read an instance of @@ -348,7 +349,7 @@ public override IFramedConcernMembership Read(XmlReader xmiReader, Uri currentLo { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -369,7 +370,7 @@ public override IFramedConcernMembership Read(XmlReader xmiReader, Uri currentLo { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -390,7 +391,7 @@ public override IFramedConcernMembership Read(XmlReader xmiReader, Uri currentLo { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -411,7 +412,7 @@ public override IFramedConcernMembership Read(XmlReader xmiReader, Uri currentLo { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -714,7 +715,7 @@ public override async Task ReadAsync(XmlReader xmiRead { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -735,7 +736,7 @@ public override async Task ReadAsync(XmlReader xmiRead { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -756,7 +757,7 @@ public override async Task ReadAsync(XmlReader xmiRead { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -777,7 +778,7 @@ public override async Task ReadAsync(XmlReader xmiRead { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/LiteralIntegerReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/LiteralIntegerReader.cs index 5306317ab..ee51eea31 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/LiteralIntegerReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/LiteralIntegerReader.cs @@ -42,6 +42,7 @@ namespace SysML2.NET.Serializer.Xmi.Readers using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; using SysML2.NET.Core.POCO.Kernel.Expressions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// The purpose of the is to read an instance of @@ -516,7 +517,7 @@ public override ILiteralInteger Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -537,7 +538,7 @@ public override ILiteralInteger Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1008,7 +1009,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1029,7 +1030,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/LiteralRationalReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/LiteralRationalReader.cs index 80e4922c9..de420df3a 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/LiteralRationalReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/LiteralRationalReader.cs @@ -42,6 +42,7 @@ namespace SysML2.NET.Serializer.Xmi.Readers using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; using SysML2.NET.Core.POCO.Kernel.Expressions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// The purpose of the is to read an instance of @@ -516,7 +517,7 @@ public override ILiteralRational Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -537,7 +538,7 @@ public override ILiteralRational Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1008,7 +1009,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1029,7 +1030,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/MembershipReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/MembershipReader.cs index f9ae31f60..5a78c2a75 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/MembershipReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/MembershipReader.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Serializer.Xmi.Readers using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Core.POCO.Root.Elements; /// /// The purpose of the is to read an instance of @@ -390,7 +391,7 @@ public override IMembership Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -411,7 +412,7 @@ public override IMembership Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -432,7 +433,7 @@ public override IMembership Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -453,7 +454,7 @@ public override IMembership Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -803,7 +804,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -824,7 +825,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -845,7 +846,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -866,7 +867,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/MultiplicityRangeReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/MultiplicityRangeReader.cs index 404c4bce0..240d7cb9b 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/MultiplicityRangeReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/MultiplicityRangeReader.cs @@ -41,6 +41,7 @@ namespace SysML2.NET.Serializer.Xmi.Readers using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; using SysML2.NET.Core.POCO.Kernel.Multiplicities; + using SysML2.NET.Core.POCO.Root.Elements; /// /// The purpose of the is to read an instance of @@ -505,7 +506,7 @@ public override IMultiplicityRange Read(XmlReader xmiReader, Uri currentLocation { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -526,7 +527,7 @@ public override IMultiplicityRange Read(XmlReader xmiReader, Uri currentLocation { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -975,7 +976,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -996,7 +997,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/OwningMembershipReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/OwningMembershipReader.cs index 2588dd996..43aa08144 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/OwningMembershipReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/OwningMembershipReader.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Serializer.Xmi.Readers using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Core.POCO.Root.Elements; /// /// The purpose of the is to read an instance of @@ -321,7 +322,7 @@ public override IOwningMembership Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -342,7 +343,7 @@ public override IOwningMembership Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -363,7 +364,7 @@ public override IOwningMembership Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -384,7 +385,7 @@ public override IOwningMembership Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -665,7 +666,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -686,7 +687,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -707,7 +708,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -728,7 +729,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/ReferenceSubsettingReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/ReferenceSubsettingReader.cs index 16f941d2d..1dac13566 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/ReferenceSubsettingReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/ReferenceSubsettingReader.cs @@ -38,6 +38,7 @@ namespace SysML2.NET.Serializer.Xmi.Readers using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; + using SysML2.NET.Core.POCO.Root.Elements; /// /// The purpose of the is to read an instance of @@ -322,7 +323,7 @@ public override IReferenceSubsetting Read(XmlReader xmiReader, Uri currentLocati { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -343,7 +344,7 @@ public override IReferenceSubsetting Read(XmlReader xmiReader, Uri currentLocati { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -364,7 +365,7 @@ public override IReferenceSubsetting Read(XmlReader xmiReader, Uri currentLocati { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -385,7 +386,7 @@ public override IReferenceSubsetting Read(XmlReader xmiReader, Uri currentLocati { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -675,7 +676,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -696,7 +697,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -717,7 +718,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -738,7 +739,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/RequirementUsageReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/RequirementUsageReader.cs index 05825e473..c0014714f 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/RequirementUsageReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/RequirementUsageReader.cs @@ -66,6 +66,7 @@ namespace SysML2.NET.Serializer.Xmi.Readers using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; using SysML2.NET.Core.POCO.Systems.Requirements; + using SysML2.NET.Core.POCO.Root.Elements; /// /// The purpose of the is to read an instance of @@ -550,7 +551,7 @@ public override IRequirementUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -571,7 +572,7 @@ public override IRequirementUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1064,7 +1065,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1085,7 +1086,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/SelectExpressionReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/SelectExpressionReader.cs index 004656eb3..772f007e1 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/SelectExpressionReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/SelectExpressionReader.cs @@ -42,6 +42,7 @@ namespace SysML2.NET.Serializer.Xmi.Readers using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; using SysML2.NET.Core.POCO.Kernel.Expressions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// The purpose of the is to read an instance of @@ -525,7 +526,7 @@ public override ISelectExpression Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -546,7 +547,7 @@ public override ISelectExpression Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1014,7 +1015,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1035,7 +1036,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/SubclassificationReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/SubclassificationReader.cs index 1479e1b24..f33076269 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/SubclassificationReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/SubclassificationReader.cs @@ -38,6 +38,7 @@ namespace SysML2.NET.Serializer.Xmi.Readers using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; + using SysML2.NET.Core.POCO.Root.Elements; /// /// The purpose of the is to read an instance of @@ -332,7 +333,7 @@ public override ISubclassification Read(XmlReader xmiReader, Uri currentLocation { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -353,7 +354,7 @@ public override ISubclassification Read(XmlReader xmiReader, Uri currentLocation { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -374,7 +375,7 @@ public override ISubclassification Read(XmlReader xmiReader, Uri currentLocation { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -395,7 +396,7 @@ public override ISubclassification Read(XmlReader xmiReader, Uri currentLocation { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -716,7 +717,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -737,7 +738,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -758,7 +759,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -779,7 +780,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/TextualRepresentationReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/TextualRepresentationReader.cs index 8cb858e1b..c9a2ddab9 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/TextualRepresentationReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/TextualRepresentationReader.cs @@ -36,6 +36,7 @@ namespace SysML2.NET.Serializer.Xmi.Readers using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; using SysML2.NET.Core.POCO.Root.Annotations; + using SysML2.NET.Core.POCO.Root.Elements; /// /// The purpose of the is to read an instance of @@ -296,7 +297,7 @@ public override ITextualRepresentation Read(XmlReader xmiReader, Uri currentLoca { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -317,7 +318,7 @@ public override ITextualRepresentation Read(XmlReader xmiReader, Uri currentLoca { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -562,7 +563,7 @@ public override async Task ReadAsync(XmlReader xmiReader { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -583,7 +584,7 @@ public override async Task ReadAsync(XmlReader xmiReader { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/UsageReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/UsageReader.cs index 4dee57638..a91ef454f 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/UsageReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenReaders/UsageReader.cs @@ -62,6 +62,7 @@ namespace SysML2.NET.Serializer.Xmi.Readers using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; using SysML2.NET.Core.POCO.Systems.DefinitionAndUsage; + using SysML2.NET.Core.POCO.Root.Elements; /// /// The purpose of the is to read an instance of @@ -526,7 +527,7 @@ public override IUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -547,7 +548,7 @@ public override IUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -996,7 +997,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentLoc { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1017,7 +1018,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentLoc { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.CodeGenerator.Tests/SysML2.NET.CodeGenerator.Tests.csproj b/SysML2.NET.CodeGenerator.Tests/SysML2.NET.CodeGenerator.Tests.csproj index 3d68259ec..21fa94956 100644 --- a/SysML2.NET.CodeGenerator.Tests/SysML2.NET.CodeGenerator.Tests.csproj +++ b/SysML2.NET.CodeGenerator.Tests/SysML2.NET.CodeGenerator.Tests.csproj @@ -173,6 +173,82 @@ Always + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + @@ -743,87 +819,6 @@ Always - - - - - - - - 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/Extensions/ClassExtensions.cs b/SysML2.NET.CodeGenerator/Extensions/ClassExtensions.cs index a4bc8e458..a59fea305 100644 --- a/SysML2.NET.CodeGenerator/Extensions/ClassExtensions.cs +++ b/SysML2.NET.CodeGenerator/Extensions/ClassExtensions.cs @@ -101,5 +101,22 @@ public static int CountAllNonDerivedNonRedefinedProperties(this IClass @class) { return @class.QueryAllNonDerivedNonRedefinedProperties().Count; } + + /// + /// Query the name of the internal interface to implement for an + /// + /// The + /// The name of the internal interface to implement, if any + public static string QueryInternalInterfaceName(this IClass umlClass) + { + var classifiers = umlClass.QueryAllGeneralClassifiers(); + + if (classifiers.Any(x => x.Name == "Relationship")) + { + return "IContainedRelationship"; + } + + return classifiers.Any(x => x.Name == "Element") ? "IContainedElement" : string.Empty; + } } } diff --git a/SysML2.NET.CodeGenerator/Extensions/PropertyExtension.cs b/SysML2.NET.CodeGenerator/Extensions/PropertyExtension.cs index effa1db25..e90320150 100644 --- a/SysML2.NET.CodeGenerator/Extensions/PropertyExtension.cs +++ b/SysML2.NET.CodeGenerator/Extensions/PropertyExtension.cs @@ -74,5 +74,23 @@ public static string QueryPropertyNameBasedOnUmlProperties(this IProperty proper return property.IsDerived || property.IsDerivedUnion ? StringExtensions.LowerCaseFirstLetter(property.Name) : StringExtensions.CapitalizeFirstLetter(property.Name); } + + /// + /// Asserts that the property is one of the part of a Composite Aggregation that is not derived + /// + /// The property to check + /// If the provided is null + /// True if the property is composite and not derived or if the opposite property is Composite and not derived + public static bool QueryPropertyIsPartOfNonDerivedCompositeAggregation(this IProperty property) + { + ArgumentNullException.ThrowIfNull(property); + + if (property.IsComposite && !property.IsDerived) + { + return true; + } + + return property.Opposite is { IsComposite: true, IsDerived: false }; + } } } diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/ClassHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/ClassHelper.cs index 0323a4087..53140d8d3 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/ClassHelper.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/ClassHelper.cs @@ -160,8 +160,8 @@ public static void RegisterClassHelper(this IHandlebars handlebars) }); // writes the count of non-derived and non Redefined properties of the IClass - handlebars.RegisterHelper("Class.WriteCountAllNonDerivedNonRedefinedProperties", (writer, context, _) => { - + handlebars.RegisterHelper("Class.WriteCountAllNonDerivedNonRedefinedProperties", (writer, context, _) => + { if (context.Value is not IClass @class) { throw new ArgumentException("supposed to be IClass"); @@ -169,6 +169,32 @@ public static void RegisterClassHelper(this IHandlebars handlebars) writer.WriteSafeString(@class.CountAllNonDerivedNonRedefinedProperties()); }); + + handlebars.RegisterHelper("Class.WriteInternalInterface", (writer, context, _) => + { + if (context.Value is not IClass umlClass) + { + throw new ArgumentException("Class.WriteInternalInterface context supposed to be IClass"); + } + + var interfaceName = umlClass.QueryInternalInterfaceName(); + + if (!string.IsNullOrWhiteSpace(interfaceName)) + { + writer.WriteSafeString($", {interfaceName}"); + } + }); + + handlebars.RegisterHelper("Class.QueryNonDerivedCompositeAggregation", (context, _) => + { + if (context.Value is not IClass umlClass) + { + throw new ArgumentException("Class.QueryNonDerivedCompositeAggregation context supposed to be IClass"); + } + + var properties = umlClass.QueryAllProperties(); + return properties.Where(x => x.IsComposite && !x.IsDerived); + }); } } } diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/PropertyHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/PropertyHelper.cs index 97cda020d..85f8861ce 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/PropertyHelper.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/PropertyHelper.cs @@ -27,6 +27,8 @@ namespace SysML2.NET.CodeGenerator.HandleBarHelpers using HandlebarsDotNet; + using Microsoft.CodeAnalysis.CSharp.Syntax; + using SysML2.NET.CodeGenerator.Extensions; using uml4net.SimpleClassifiers; @@ -296,7 +298,14 @@ public static void RegisterPropertyHelper(this IHandlebars handlebars) if (property.QueryIsEnumerable()) { - sb.Append($"List<{typeName}> "); + if (property.QueryPropertyIsPartOfNonDerivedCompositeAggregation()) + { + sb.Append($"IReadOnlyCollection<{typeName}> "); + } + else + { + sb.Append($"List<{typeName}> "); + } } else { @@ -319,7 +328,7 @@ public static void RegisterPropertyHelper(this IHandlebars handlebars) sb.Append(propertyName); - if (property.IsReadOnly || property.IsDerived || property.IsDerivedUnion) + if (property.IsReadOnly || property.IsDerived || property.IsDerivedUnion || property.IsComposite || property.QueryPropertyIsPartOfNonDerivedCompositeAggregation()) { sb.Append(" { get; }"); } @@ -367,7 +376,14 @@ public static void RegisterPropertyHelper(this IHandlebars handlebars) if (property.QueryIsEnumerable()) { - sb.Append($"List<{typeName}> "); + if (property.QueryPropertyIsPartOfNonDerivedCompositeAggregation()) + { + sb.Append($"IReadOnlyCollection<{typeName}> "); + } + else + { + sb.Append($"List<{typeName}> "); + } } else { @@ -429,9 +445,9 @@ public static void RegisterPropertyHelper(this IHandlebars handlebars) { sb.AppendLine("{"); sb.AppendLine($"\tget => {GetRedefinedPropertyGetterImplementationForPoco(property, redefiningProperty, classContext)}"); - + var setterImplementation = GetRedefinedPropertySetterImplementationForPoco(property, redefiningProperty, classContext); - + if (string.IsNullOrWhiteSpace(setterImplementation)) { sb.AppendLine("\tset { }"); @@ -443,16 +459,25 @@ public static void RegisterPropertyHelper(this IHandlebars handlebars) sb.AppendLine($"\t{setterImplementation}"); sb.Append('}'); } - + sb.Append('}'); } else { - sb.Append(" { get; set; }"); - - if (property.QueryIsEnumerable()) + if (property.QueryPropertyIsPartOfNonDerivedCompositeAggregation()) { - sb.Append(" = [];"); + var propertyOwner = property.Owner as IClass; + var internalInterfaceName = $"IContained{propertyOwner?.Name}"; + sb.Append($" => (({internalInterfaceName})this).{propertyName};"); + } + else + { + sb.Append(" { get; set; }"); + + if (property.QueryIsEnumerable()) + { + sb.Append(" = [];"); + } } } } @@ -476,6 +501,28 @@ public static void RegisterPropertyHelper(this IHandlebars handlebars) } } + if (property.QueryPropertyIsPartOfNonDerivedCompositeAggregation()) + { + var propertyOwner = property.Owner as IClass; + var internalInterfaceName = $"IContained{propertyOwner?.Name}"; + sb.AppendLine(Environment.NewLine); + sb.AppendLine($"/// Backing field for I{propertyOwner?.Name}.{propertyName}"); + + if (property.QueryIsEnumerable()) + { + var oppositeTypeName = property.Opposite.Type.Name; + + sb.Append($"ContainerList "); + } + else + { + sb.Append($"{typeName} "); + } + + sb.Append($"{internalInterfaceName}.{propertyName}"); + sb.Append("{ get; set; }"); + } + writer.WriteSafeString(sb + Environment.NewLine); }); @@ -718,6 +765,7 @@ public static void RegisterPropertyHelper(this IHandlebars handlebars) sb.AppendLine($"dto.{StringExtensions.CapitalizeFirstLetter(property.Name)} = ReadGuidBin16(ref reader);"); } } + writer.WriteSafeString(sb); }); @@ -967,7 +1015,29 @@ public static void RegisterPropertyHelper(this IHandlebars handlebars) return property.Type.Name == "Element"; }); - } + + handlebars.RegisterHelper("Property.WriteForNonDerivedCompositeAggregation", (writer, context, _) => + { + if (context.Value is not IProperty property) + { + throw new ArgumentException("The #Property.WriteForNonDerivedCompositeAggregation context supposed to be IProperty"); + } + + var stringBuilder = new StringBuilder(); + var propertyOwner = (IClass)property.Owner; + + var interfaceName = propertyOwner.QueryInternalInterfaceName(); + var propertyName = property.Name.CapitalizeFirstLetter(); + var oppositePropertyName = property.Opposite.Name.CapitalizeFirstLetter(); + var childVariableName = property.Type.Name.LowerCaseFirstLetter(); + var parentVariableName = property.Opposite.Type.Name.LowerCaseFirstLetter(); + + stringBuilder.AppendLine($"(({interfaceName})this).{propertyName} = new ContainerList(this, "); + stringBuilder.AppendLine($"({childVariableName}, {parentVariableName}) => ((IContained{property.Type.Name}){childVariableName}).{oppositePropertyName} = {parentVariableName},"); + stringBuilder.AppendLine($"{childVariableName} => {childVariableName}.{oppositePropertyName});"); + writer.WriteSafeString(stringBuilder + Environment.NewLine); + }); + } /// /// Gets the getter implementation for an that has been redefined, for DTO generation @@ -1061,7 +1131,7 @@ private static string GetRedefinedPropertyGetterImplementationForPoco(IProperty /// The redefined property /// The property that redefines /// Gets the context - /// The setter imlementation + /// The setter implementation private static string GetRedefinedPropertySetterImplementationForDto(IProperty redefinedProperty, IProperty redefinition, IClass context) { if (redefinition.IsDerived || redefinition.IsDerivedUnion || redefinition.IsReadOnly) @@ -1100,7 +1170,7 @@ private static string GetRedefinedPropertySetterImplementationForDto(IProperty r /// The redefined property /// The property that redefines /// Gets the context - /// The setter imlementation + /// The setter implementation private static string GetRedefinedPropertySetterImplementationForPoco(IProperty redefinedProperty, IProperty redefinition, IClass context) { if (redefinition.IsDerived || redefinition.IsDerivedUnion || redefinition.IsReadOnly) diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/Partials/core-xmi-reader-partial-for-element-template.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/Partials/core-xmi-reader-partial-for-element-template.hbs index f5d32d198..96ad1f324 100644 --- a/SysML2.NET.CodeGenerator/Templates/Uml/Partials/core-xmi-reader-partial-for-element-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/Uml/Partials/core-xmi-reader-partial-for-element-template.hbs @@ -23,9 +23,17 @@ case"{{String.LowerCaseFirstLetter property.Name}}": {{/if}} {{#if (Property.QueryIsEnumerable property)}} - poco.{{Property.WritePropertyName property}}.Add({{String.LowerCaseFirstLetter property.Name}}Value); + {{#if property.IsComposite}} + ((IContained{{property.Owner.Name}})poco).{{Property.WritePropertyName property}}.Add({{String.LowerCaseFirstLetter property.Name}}Value); + {{else}} + poco.{{Property.WritePropertyName property}}.Add({{String.LowerCaseFirstLetter property.Name}}Value); + {{/if}} {{else}} - poco.{{Property.WritePropertyName property}} = {{String.LowerCaseFirstLetter property.Name}}Value; + {{#if property.Opposite.IsComposite}} + ((IContained{{property.Owner.Name}})poco).{{Property.WritePropertyName property}} = {{String.LowerCaseFirstLetter property.Name}}Value; + {{else}} + poco.{{Property.WritePropertyName property}} = {{String.LowerCaseFirstLetter property.Name}}Value; + {{/if}} {{/if}} } {{else}} diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/core-dal-poco-uml-extensions.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/core-dal-poco-uml-extensions.hbs index 9db2f1bb6..7941725d4 100644 --- a/SysML2.NET.CodeGenerator/Templates/Uml/core-dal-poco-uml-extensions.hbs +++ b/SysML2.NET.CodeGenerator/Templates/Uml/core-dal-poco-uml-extensions.hbs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace this }}; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -78,7 +79,11 @@ namespace SysML2.NET.Dal foreach (var identifier in {{ property.Name}}ToDelete) { - poco.{{ String.PascalCase property.Name}}.Remove(poco.{{ String.PascalCase property.Name}}.Single(x => x.Id == identifier)); + {{#if property.IsComposite }} + ((IContained{{property.Owner.Name}})poco).{{ String.PascalCase property.Name}}.Remove(poco.{{ String.PascalCase property.Name}}.Single(x => x.Id == identifier)); + {{else}} + poco.{{ String.PascalCase property.Name}}.Remove(poco.{{ String.PascalCase property.Name}}.Single(x => x.Id == identifier)); + {{/if}} } {{#if property.IsComposite }} @@ -146,12 +151,22 @@ namespace SysML2.NET.Dal { if (cache.TryGetValue(identifier, out lazyPoco)) { - {{#if (Property.IsOfTypeBaseElement property)}} - poco.{{ String.PascalCase property.Name}}.Add(lazyPoco.Value); - {{else if property.Type.IsAbstract }} - poco.{{ String.PascalCase property.Name}}.Add((Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace property.Type }}.I{{ property.Type.Name }})lazyPoco.Value); + {{#if property.IsComposite}} + {{#if (Property.IsOfTypeBaseElement property)}} + ((IContained{{property.Owner.Name}})poco).{{ String.PascalCase property.Name}}.Add(lazyPoco.Value); + {{else if property.Type.IsAbstract }} + ((IContained{{property.Owner.Name}})poco).{{ String.PascalCase property.Name}}.Add((Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace property.Type }}.I{{ property.Type.Name }})lazyPoco.Value); + {{else}} + ((IContained{{property.Owner.Name}})poco).{{ String.PascalCase property.Name}}.Add((Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace property.Type }}.{{ property.Type.Name }})lazyPoco.Value); + {{/if}} {{else}} - poco.{{ String.PascalCase property.Name}}.Add((Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace property.Type }}.{{ property.Type.Name }})lazyPoco.Value); + {{#if (Property.IsOfTypeBaseElement property)}} + poco.{{ String.PascalCase property.Name}}.Add(lazyPoco.Value); + {{else if property.Type.IsAbstract }} + poco.{{ String.PascalCase property.Name}}.Add((Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace property.Type }}.I{{ property.Type.Name }})lazyPoco.Value); + {{else}} + poco.{{ String.PascalCase property.Name}}.Add((Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace property.Type }}.{{ property.Type.Name }})lazyPoco.Value); + {{/if}} {{/if}} } } @@ -159,33 +174,61 @@ namespace SysML2.NET.Dal {{else if (Property.QueryIsNullable property) }} if (dto.{{ String.PascalCase property.Name}}.HasValue && cache.TryGetValue(dto.{{ String.PascalCase property.Name}}.Value, out lazyPoco)) { - {{#if (Property.IsOfTypeBaseElement property)}} - poco.{{ String.PascalCase property.Name}} = lazyPoco.Value; - {{else if property.Type.IsAbstract }} - poco.{{ String.PascalCase property.Name}} = (Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace property.Type }}.I{{ property.Type.Name }})lazyPoco.Value; + {{#if property.Opposite.IsComposite}} + {{#if (Property.IsOfTypeBaseElement property)}} + ((IContained{{property.Owner.Name}})poco).{{ String.PascalCase property.Name}} = lazyPoco.Value; + {{else if property.Type.IsAbstract }} + ((IContained{{property.Owner.Name}})poco).{{ String.PascalCase property.Name}} = (Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace property.Type }}.I{{ property.Type.Name }})lazyPoco.Value; + {{else}} + ((IContained{{property.Owner.Name}})poco).{{ String.PascalCase property.Name}} = (Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace property.Type }}.{{ property.Type.Name }})lazyPoco.Value; + {{/if}} {{else}} - poco.{{ String.PascalCase property.Name}} = (Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace property.Type }}.{{ property.Type.Name }})lazyPoco.Value; + {{#if (Property.IsOfTypeBaseElement property)}} + poco.{{ String.PascalCase property.Name}} = lazyPoco.Value; + {{else if property.Type.IsAbstract }} + poco.{{ String.PascalCase property.Name}} = (Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace property.Type }}.I{{ property.Type.Name }})lazyPoco.Value; + {{else}} + poco.{{ String.PascalCase property.Name}} = (Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace property.Type }}.{{ property.Type.Name }})lazyPoco.Value; + {{/if}} {{/if}} } else { - poco.{{ String.PascalCase property.Name}} = null; + {{#if property.Opposite.IsComposite}} + ((IContained{{property.Owner.Name}})poco).{{ String.PascalCase property.Name}} = null; + {{else}} + poco.{{ String.PascalCase property.Name}} = null; + {{/if}} } {{else}} if (cache.TryGetValue(dto.{{ String.PascalCase property.Name}}, out lazyPoco)) { - {{#if (Property.IsOfTypeBaseElement property)}} - poco.{{ String.PascalCase property.Name}} = lazyPoco.Value; - {{else if property.Type.IsAbstract }} - poco.{{ String.PascalCase property.Name}} = (Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace property.Type }}.I{{ property.Type.Name }})lazyPoco.Value; + {{#if property.Opposite.IsComposite}} + {{#if (Property.IsOfTypeBaseElement property)}} + ((IContained{{property.Owner.Name}})poco).{{ String.PascalCase property.Name}} = lazyPoco.Value; + {{else if property.Type.IsAbstract }} + ((IContained{{property.Owner.Name}})poco).{{ String.PascalCase property.Name}} = (Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace property.Type }}.I{{ property.Type.Name }})lazyPoco.Value; + {{else}} + ((IContained{{property.Owner.Name}})poco).{{ String.PascalCase property.Name}} = (Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace property.Type }}.{{ property.Type.Name }})lazyPoco.Value; + {{/if}} {{else}} - poco.{{ String.PascalCase property.Name}} = (Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace property.Type }}.{{ property.Type.Name }})lazyPoco.Value; + {{#if (Property.IsOfTypeBaseElement property)}} + poco.{{ String.PascalCase property.Name}} = lazyPoco.Value; + {{else if property.Type.IsAbstract }} + poco.{{ String.PascalCase property.Name}} = (Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace property.Type }}.I{{ property.Type.Name }})lazyPoco.Value; + {{else}} + poco.{{ String.PascalCase property.Name}} = (Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace property.Type }}.{{ property.Type.Name }})lazyPoco.Value; + {{/if}} {{/if}} } else { - poco.{{ String.PascalCase property.Name}} = null; + {{#if property.Opposite.IsComposite}} + ((IContained{{property.Owner.Name}})poco).{{ String.PascalCase property.Name}} = null; + {{else}} + poco.{{ String.PascalCase property.Name}} = null; + {{/if}} } {{/if}} diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/core-poco-class-uml-template.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/core-poco-class-uml-template.hbs index 5bbb8ad48..3c9cb3174 100644 --- a/SysML2.NET.CodeGenerator/Templates/Uml/core-poco-class-uml-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/Uml/core-poco-class-uml-template.hbs @@ -31,13 +31,24 @@ namespace SysML2.NET.Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace thi {{ #Class.WriteEnumerationNameSpaces this}} {{ #Class.WriteNameSpaces this POCO}} + using SysML2.NET.Collections; using SysML2.NET.Decorators; {{ #Documentation this }} {{ #Decorator.WriteClassAttribute this }} [GeneratedCode("SysML2.NET", "latest")] - {{ Enum.ToString this.Visibility }} partial class {{this.Name}} : I{{this.Name}} + {{ Enum.ToString this.Visibility }} partial class {{this.Name}} : I{{this.Name}}{{Class.WriteInternalInterface this}} { + /// + /// Initialize a new instance of + /// + public {{this.Name}}() + { + {{#each (Class.QueryNonDerivedCompositeAggregation this) as | property |}} + {{ #Property.WriteForNonDerivedCompositeAggregation property }} + {{/each}} + } + /// /// Gets or sets the unique identifier /// diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/core-poco-reference-resolve-extension-template.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/core-poco-reference-resolve-extension-template.hbs index f1de3029f..74f25f96a 100644 --- a/SysML2.NET.CodeGenerator/Templates/Uml/core-poco-reference-resolve-extension-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/Uml/core-poco-reference-resolve-extension-template.hbs @@ -30,7 +30,8 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; - + using SysML2.NET.Core.POCO.Root.Elements; + /// /// Provides extensions methods for the to help resolve reference for properties /// @@ -85,7 +86,11 @@ namespace SysML2.NET.Serializer.Xmi.Extensions throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an I{{property.Type.Name}}"); } - poco.{{String.CapitalizeFirstLetter property.Name }} = {{String.LowerCaseFirstLetter property.Name}}Reference; + {{#if property.Opposite.IsComposite}} + ((IContained{{property.Owner.Name}})poco).{{String.CapitalizeFirstLetter property.Name }} = {{String.LowerCaseFirstLetter property.Name}}Reference; + {{else}} + poco.{{String.CapitalizeFirstLetter property.Name }} = {{String.LowerCaseFirstLetter property.Name}}Reference; + {{/if}} return; } @@ -157,7 +162,11 @@ namespace SysML2.NET.Serializer.Xmi.Extensions throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an I{{property.Type.Name}}"); } + {{#if property.IsComposite}} + ((IContained{{property.Owner.Name}})poco).{{String.CapitalizeFirstLetter property.Name }}.Add({{String.LowerCaseFirstLetter property.Name}}Reference); + {{else}} poco.{{String.CapitalizeFirstLetter property.Name }}.Add({{String.LowerCaseFirstLetter property.Name}}Reference); + {{/if}} } return; diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/core-xmi-reader-template.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/core-xmi-reader-template.hbs index 3b6725018..6105b3556 100644 --- a/SysML2.NET.CodeGenerator/Templates/Uml/core-xmi-reader-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/Uml/core-xmi-reader-template.hbs @@ -36,6 +36,7 @@ namespace SysML2.NET.Serializer.Xmi.Readers {{ #Class.WriteEnumerationNameSpaces this}} {{ #Class.WriteNameSpaces this POCO}} using SysML2.NET.Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace this }}; + using SysML2.NET.Core.POCO.Root.Elements; /// /// The purpose of the is to read an instance of diff --git a/SysML2.NET.Dal.Tests/AnnotatingElementExtensionsTestFixture.cs b/SysML2.NET.Dal.Tests/AnnotatingElementExtensionsTestFixture.cs index 1735d3c78..cc2d420fd 100644 --- a/SysML2.NET.Dal.Tests/AnnotatingElementExtensionsTestFixture.cs +++ b/SysML2.NET.Dal.Tests/AnnotatingElementExtensionsTestFixture.cs @@ -31,6 +31,7 @@ namespace SysML2.NET.Dal.Tests using SysML2.NET.Core.POCO.Root.Namespaces; using SysML2.NET.Dal; + using SysML2.NET.Extensions; /// /// Suite of tests for the class @@ -63,11 +64,12 @@ public void Verify_that_ToDto_works_as_expected() DeclaredName = "declared name", DeclaredShortName = "declared shortname", ElementId = "element id", - IsImpliedIncluded = true, - OwnedRelationship = new List{ ownedMemberShip }, - OwningRelationship = owningMemberShip + IsImpliedIncluded = true }; + ((IContainedElement)poco).OwnedRelationship.Add(ownedMemberShip); + ((IContainedElement)poco).OwningRelationship = owningMemberShip; + var dto = poco.ToDto(); Assert.That(dto.Id, Is.EqualTo(poco.Id)); diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AcceptActionUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AcceptActionUsageExtensions.cs index aa097972c..067c1cc08 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AcceptActionUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AcceptActionUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Actions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Actions.Acce { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ActionDefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ActionDefinitionExtensions.cs index 57c981cff..252bdbb0b 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ActionDefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ActionDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Actions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -89,7 +90,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -138,17 +139,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Actions.Acti { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ActionUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ActionUsageExtensions.cs index 282d61304..4c8bfcb13 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ActionUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ActionUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Actions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Actions.Acti { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ActorMembershipExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ActorMembershipExtensions.cs index 8b1d16928..1cfec7d35 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ActorMembershipExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ActorMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Requirements; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -143,7 +144,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Requirements { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -153,26 +154,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Requirements { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AllocationDefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AllocationDefinitionExtensions.cs index 3fca40812..877381cee 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AllocationDefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AllocationDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Allocations; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -91,7 +92,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -100,7 +101,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -149,7 +150,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Allocations. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -159,26 +160,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Allocations. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AllocationUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AllocationUsageExtensions.cs index 0f18d8529..d663e8b24 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AllocationUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AllocationUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Allocations; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -107,7 +108,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -116,7 +117,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -167,7 +168,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Allocations. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -177,26 +178,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Allocations. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AnalysisCaseDefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AnalysisCaseDefinitionExtensions.cs index 094ea3064..21d4067eb 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AnalysisCaseDefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AnalysisCaseDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.AnalysisCases; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -89,7 +90,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -138,17 +139,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.AnalysisCase { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AnalysisCaseUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AnalysisCaseUsageExtensions.cs index 50dfa0afc..930a97af6 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AnalysisCaseUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AnalysisCaseUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.AnalysisCases; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.AnalysisCase { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AnnotatingElementExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AnnotatingElementExtensions.cs index 949d87ee0..63f208507 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AnnotatingElementExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AnnotatingElementExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Root.Annotations; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -81,7 +82,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -130,17 +131,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Root.Annotations.Ann { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AnnotationExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AnnotationExtensions.cs index 4509c0f60..2d51cbee0 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AnnotationExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AnnotationExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Root.Annotations; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -150,7 +151,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Root.Annotations.Ann { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -160,26 +161,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Root.Annotations.Ann { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AssertConstraintUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AssertConstraintUsageExtensions.cs index 6b1cc2c47..332da81a2 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AssertConstraintUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AssertConstraintUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Constraints; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -107,7 +108,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -158,17 +159,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Constraints. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AssignmentActionUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AssignmentActionUsageExtensions.cs index 7991b27b9..219dec21c 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AssignmentActionUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AssignmentActionUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Actions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Actions.Assi { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AssociationExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AssociationExtensions.cs index 3b0072e3a..95276a266 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AssociationExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AssociationExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Associations; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -87,7 +88,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -96,7 +97,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -145,7 +146,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Associations. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -155,26 +156,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Associations. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AssociationStructureExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AssociationStructureExtensions.cs index e2631338d..06dddd551 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AssociationStructureExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AssociationStructureExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Associations; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -87,7 +88,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -96,7 +97,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -145,7 +146,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Associations. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -155,26 +156,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Associations. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AttributeDefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AttributeDefinitionExtensions.cs index ce5dc995d..252644f55 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AttributeDefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AttributeDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Attributes; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -87,7 +88,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -136,17 +137,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Attributes.A { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AttributeUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AttributeUsageExtensions.cs index 84d58d5aa..9b472572e 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/AttributeUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/AttributeUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Attributes; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -152,17 +153,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Attributes.A { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/BehaviorExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/BehaviorExtensions.cs index a908a4dc3..45484197d 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/BehaviorExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/BehaviorExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Behaviors; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -85,7 +86,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -134,17 +135,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Behaviors.Beh { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/BindingConnectorAsUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/BindingConnectorAsUsageExtensions.cs index b32b8d5cd..7e7795487 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/BindingConnectorAsUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/BindingConnectorAsUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Connections; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -114,7 +115,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -163,7 +164,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Connections. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -173,26 +174,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Connections. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/BindingConnectorExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/BindingConnectorExtensions.cs index 110b2308b..065f9068d 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/BindingConnectorExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/BindingConnectorExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Connectors; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -114,7 +115,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -163,7 +164,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Connectors.Bi { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -173,26 +174,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Connectors.Bi { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/BooleanExpressionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/BooleanExpressionExtensions.cs index 71e48b70f..3b48fa81f 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/BooleanExpressionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/BooleanExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Functions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -152,17 +153,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Functions.Boo { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/CalculationDefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/CalculationDefinitionExtensions.cs index 426ddcf87..62480c5ec 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/CalculationDefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/CalculationDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Calculations; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -89,7 +90,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -138,17 +139,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Calculations { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/CalculationUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/CalculationUsageExtensions.cs index aebcd8a14..efdc36baf 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/CalculationUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/CalculationUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Calculations; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Calculations { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/CaseDefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/CaseDefinitionExtensions.cs index afe8b70fc..62c2fb6b5 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/CaseDefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/CaseDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Cases; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -89,7 +90,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -138,17 +139,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Cases.CaseDe { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/CaseUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/CaseUsageExtensions.cs index 3ae46e50b..c6508a7c1 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/CaseUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/CaseUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Cases; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Cases.CaseUs { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ClassExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ClassExtensions.cs index b0fbef0ad..358327ce5 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ClassExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ClassExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Classes; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -85,7 +86,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -134,17 +135,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Classes.Class { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ClassifierExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ClassifierExtensions.cs index c237abac3..c538ecb47 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ClassifierExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ClassifierExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Core.Classifiers; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -85,7 +86,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -134,17 +135,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Classifiers.Cla { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/CollectExpressionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/CollectExpressionExtensions.cs index 47129a0a0..ccba0346a 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/CollectExpressionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/CollectExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Expressions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -154,17 +155,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Expressions.C { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/CommentExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/CommentExtensions.cs index 1e6a2fa39..ffee01dde 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/CommentExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/CommentExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Root.Annotations; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -85,7 +86,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -134,17 +135,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Root.Annotations.Com { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConcernDefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConcernDefinitionExtensions.cs index bab53b87c..8f2751031 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConcernDefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConcernDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Requirements; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -87,7 +88,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -138,17 +139,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Requirements { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConcernUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConcernUsageExtensions.cs index 52e89ce9f..bc23461e6 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConcernUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConcernUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Requirements; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Requirements { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConjugatedPortDefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConjugatedPortDefinitionExtensions.cs index 62c883cb8..1274a25a6 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConjugatedPortDefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConjugatedPortDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Ports; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -89,7 +90,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -138,17 +139,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Ports.Conjug { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConjugatedPortTypingExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConjugatedPortTypingExtensions.cs index 4871f85ae..0e95f743b 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConjugatedPortTypingExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConjugatedPortTypingExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Ports; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -150,7 +151,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Ports.Conjug { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -160,26 +161,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Ports.Conjug { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } if (cache.TryGetValue(dto.TypedFeature, out lazyPoco)) diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConjugationExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConjugationExtensions.cs index b6a66b1bf..d4a5566ed 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConjugationExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConjugationExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Core.Types; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -159,7 +160,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Types.Conjugati { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -169,26 +170,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Types.Conjugati { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConnectionDefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConnectionDefinitionExtensions.cs index 009b5e3a7..f1c068a28 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConnectionDefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConnectionDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Connections; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -91,7 +92,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -100,7 +101,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -149,7 +150,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Connections. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -159,26 +160,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Connections. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConnectionUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConnectionUsageExtensions.cs index b653a40bf..9b812bb36 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConnectionUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConnectionUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Connections; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -107,7 +108,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -116,7 +117,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -167,7 +168,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Connections. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -177,26 +178,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Connections. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConnectorExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConnectorExtensions.cs index 16fb104d4..b86d117e8 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConnectorExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConnectorExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Connectors; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -114,7 +115,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -163,7 +164,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Connectors.Co { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -173,26 +174,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Connectors.Co { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConstraintDefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConstraintDefinitionExtensions.cs index f8d865373..025d0cfef 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConstraintDefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConstraintDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Constraints; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -89,7 +90,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -138,17 +139,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Constraints. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConstraintUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConstraintUsageExtensions.cs index 01199255e..a2b591b8a 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConstraintUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConstraintUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Constraints; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Constraints. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConstructorExpressionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConstructorExpressionExtensions.cs index c70998618..43fac7dd3 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConstructorExpressionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ConstructorExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Expressions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -152,17 +153,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Expressions.C { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/CrossSubsettingExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/CrossSubsettingExtensions.cs index 2895504b0..6c28e1693 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/CrossSubsettingExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/CrossSubsettingExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Core.Features; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -150,7 +151,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Features.CrossS { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -160,26 +161,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Features.CrossS { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/DataTypeExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/DataTypeExtensions.cs index 099e32d61..14919a7e2 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/DataTypeExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/DataTypeExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.DataTypes; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -85,7 +86,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -134,17 +135,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.DataTypes.Dat { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/DecisionNodeExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/DecisionNodeExtensions.cs index 6dde271ff..d0f6a60e5 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/DecisionNodeExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/DecisionNodeExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Actions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Actions.Deci { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/DefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/DefinitionExtensions.cs index 59f3a6749..c63686f1b 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/DefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/DefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.DefinitionAndUsage; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -87,7 +88,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -136,17 +137,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.DefinitionAn { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/DependencyExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/DependencyExtensions.cs index 0803eb55c..8b7841942 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/DependencyExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/DependencyExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Root.Dependencies; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -91,7 +92,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -100,7 +101,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -167,7 +168,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Root.Dependencies.De { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -177,26 +178,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Root.Dependencies.De { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } var supplierToAdd = dto.Supplier.Except(poco.Supplier.Select(x => x.Id)); diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/DifferencingExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/DifferencingExtensions.cs index 55261352b..90bb14f58 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/DifferencingExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/DifferencingExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Core.Types; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -150,7 +151,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Types.Differenc { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -160,26 +161,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Types.Differenc { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/DisjoiningExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/DisjoiningExtensions.cs index 78608c845..5aef47dd0 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/DisjoiningExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/DisjoiningExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Core.Types; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -150,7 +151,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Types.Disjoinin { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -160,26 +161,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Types.Disjoinin { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } if (cache.TryGetValue(dto.TypeDisjoined, out lazyPoco)) diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/DocumentationExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/DocumentationExtensions.cs index fa59b5912..857e21bd2 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/DocumentationExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/DocumentationExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Root.Annotations; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -85,7 +86,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -134,17 +135,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Root.Annotations.Doc { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ElementFilterMembershipExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ElementFilterMembershipExtensions.cs index ce69e832c..85ed61238 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ElementFilterMembershipExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ElementFilterMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Packages; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -143,7 +144,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Packages.Elem { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -153,26 +154,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Packages.Elem { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/EndFeatureMembershipExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/EndFeatureMembershipExtensions.cs index a6e245396..fe07ea4f5 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/EndFeatureMembershipExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/EndFeatureMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Core.Features; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -143,7 +144,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Features.EndFea { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -153,26 +154,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Features.EndFea { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/EnumerationDefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/EnumerationDefinitionExtensions.cs index 293a67bfe..0088bc7d9 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/EnumerationDefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/EnumerationDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Enumerations; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -87,7 +88,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -136,17 +137,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Enumerations { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/EnumerationUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/EnumerationUsageExtensions.cs index 6a6898e79..8be986a45 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/EnumerationUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/EnumerationUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Enumerations; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -152,17 +153,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Enumerations { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/EventOccurrenceUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/EventOccurrenceUsageExtensions.cs index 47166aa48..6ec601d9b 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/EventOccurrenceUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/EventOccurrenceUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Occurrences; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Occurrences. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ExhibitStateUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ExhibitStateUsageExtensions.cs index f295b9a97..bd48b7608 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ExhibitStateUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ExhibitStateUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.States; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -107,7 +108,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -158,17 +159,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.States.Exhib { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ExpressionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ExpressionExtensions.cs index 910345f2f..30647bc40 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ExpressionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Functions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -152,17 +153,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Functions.Exp { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureChainExpressionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureChainExpressionExtensions.cs index 55e2581a5..2028daaff 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureChainExpressionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureChainExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Expressions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -154,17 +155,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Expressions.F { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureChainingExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureChainingExtensions.cs index bb3681452..778697685 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureChainingExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureChainingExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Core.Features; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -150,7 +151,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Features.Featur { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -160,26 +161,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Features.Featur { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureExtensions.cs index fbaaff89e..bcd679b24 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Core.Features; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -152,17 +153,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Features.Featur { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureInvertingExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureInvertingExtensions.cs index 078325ba9..8e0f13d4d 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureInvertingExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureInvertingExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Core.Features; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -159,7 +160,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Features.Featur { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -169,26 +170,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Features.Featur { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureMembershipExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureMembershipExtensions.cs index 770e2e8c0..e49249730 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureMembershipExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Core.Types; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -143,7 +144,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Types.FeatureMe { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -153,26 +154,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Types.FeatureMe { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureReferenceExpressionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureReferenceExpressionExtensions.cs index 3f8e1617f..176b02d52 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureReferenceExpressionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureReferenceExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Expressions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -152,17 +153,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Expressions.F { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureTypingExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureTypingExtensions.cs index cfb7a7fdc..2929c6a29 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureTypingExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureTypingExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Core.Features; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -141,7 +142,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Features.Featur { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -151,26 +152,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Features.Featur { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } if (cache.TryGetValue(dto.Type, out lazyPoco)) diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureValueExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureValueExtensions.cs index 4ddbfa64b..2a6815c29 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureValueExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FeatureValueExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.FeatureValues; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -87,7 +88,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -96,7 +97,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -147,7 +148,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.FeatureValues { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -157,26 +158,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.FeatureValues { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FlowDefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FlowDefinitionExtensions.cs index 495243ffd..99c10415b 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FlowDefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FlowDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Flows; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -91,7 +92,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -100,7 +101,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -149,7 +150,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Flows.FlowDe { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -159,26 +160,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Flows.FlowDe { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FlowEndExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FlowEndExtensions.cs index 6041a3e28..ba8f9af54 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FlowEndExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FlowEndExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Interactions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -152,17 +153,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Interactions. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FlowExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FlowExtensions.cs index a396d7687..22260590d 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FlowExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FlowExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Interactions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -114,7 +115,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -163,7 +164,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Interactions. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -173,26 +174,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Interactions. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FlowUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FlowUsageExtensions.cs index e784be122..abed88dda 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FlowUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FlowUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Flows; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -107,7 +108,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -116,7 +117,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -167,7 +168,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Flows.FlowUs { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -177,26 +178,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Flows.FlowUs { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ForLoopActionUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ForLoopActionUsageExtensions.cs index 85b7658c9..bf849fa1b 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ForLoopActionUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ForLoopActionUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Actions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Actions.ForL { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ForkNodeExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ForkNodeExtensions.cs index e3114234d..11a92c00f 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ForkNodeExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ForkNodeExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Actions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Actions.Fork { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FramedConcernMembershipExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FramedConcernMembershipExtensions.cs index 69fbbb643..789597a73 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FramedConcernMembershipExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FramedConcernMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Requirements; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -85,7 +86,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -94,7 +95,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -145,7 +146,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Requirements { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -155,26 +156,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Requirements { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FunctionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FunctionExtensions.cs index 6ccbd2bba..4e19ef1df 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/FunctionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/FunctionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Functions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -85,7 +86,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -134,17 +135,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Functions.Fun { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/IfActionUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/IfActionUsageExtensions.cs index ecb78d680..b684f0f53 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/IfActionUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/IfActionUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Actions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Actions.IfAc { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/IncludeUseCaseUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/IncludeUseCaseUsageExtensions.cs index d4a4ca80f..38ab996c8 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/IncludeUseCaseUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/IncludeUseCaseUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.UseCases; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.UseCases.Inc { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/IndexExpressionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/IndexExpressionExtensions.cs index 723711e06..f85789150 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/IndexExpressionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/IndexExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Expressions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -154,17 +155,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Expressions.I { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/InteractionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/InteractionExtensions.cs index 6244443e6..1256c69a0 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/InteractionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/InteractionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Interactions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -87,7 +88,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -96,7 +97,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -145,7 +146,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Interactions. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -155,26 +156,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Interactions. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/InterfaceDefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/InterfaceDefinitionExtensions.cs index 601e2609e..acae85855 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/InterfaceDefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/InterfaceDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Interfaces; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -91,7 +92,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -100,7 +101,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -149,7 +150,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Interfaces.I { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -159,26 +160,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Interfaces.I { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/InterfaceUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/InterfaceUsageExtensions.cs index 5da860d82..cb0f19964 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/InterfaceUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/InterfaceUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Interfaces; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -107,7 +108,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -116,7 +117,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -167,7 +168,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Interfaces.I { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -177,26 +178,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Interfaces.I { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/IntersectingExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/IntersectingExtensions.cs index 8ddbe04e6..f4047c7ca 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/IntersectingExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/IntersectingExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Core.Types; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -150,7 +151,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Types.Intersect { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -160,26 +161,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Types.Intersect { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/InvariantExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/InvariantExtensions.cs index 05f6ac381..06961e91e 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/InvariantExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/InvariantExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Functions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -154,17 +155,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Functions.Inv { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/InvocationExpressionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/InvocationExpressionExtensions.cs index 357cab007..936877194 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/InvocationExpressionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/InvocationExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Expressions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -152,17 +153,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Expressions.I { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ItemDefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ItemDefinitionExtensions.cs index 5d7ebdd3a..3f14016f2 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ItemDefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ItemDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Items; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -89,7 +90,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -138,17 +139,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Items.ItemDe { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ItemUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ItemUsageExtensions.cs index 571b3e36b..77af4d128 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ItemUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ItemUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Items; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Items.ItemUs { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/JoinNodeExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/JoinNodeExtensions.cs index 39a9474ac..37144a7df 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/JoinNodeExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/JoinNodeExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Actions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Actions.Join { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/LibraryPackageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/LibraryPackageExtensions.cs index fb0cb7fdd..029344b08 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/LibraryPackageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/LibraryPackageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Packages; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -132,17 +133,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Packages.Libr { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/LiteralBooleanExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/LiteralBooleanExtensions.cs index 1120b6584..fd7658533 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/LiteralBooleanExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/LiteralBooleanExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Expressions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -154,17 +155,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Expressions.L { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/LiteralExpressionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/LiteralExpressionExtensions.cs index fe68c2f7e..f142cbeae 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/LiteralExpressionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/LiteralExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Expressions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -152,17 +153,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Expressions.L { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/LiteralInfinityExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/LiteralInfinityExtensions.cs index 6a5121814..b382be339 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/LiteralInfinityExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/LiteralInfinityExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Expressions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -152,17 +153,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Expressions.L { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/LiteralIntegerExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/LiteralIntegerExtensions.cs index c6df6f41d..b2699f121 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/LiteralIntegerExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/LiteralIntegerExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Expressions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -154,17 +155,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Expressions.L { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/LiteralRationalExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/LiteralRationalExtensions.cs index a09755d66..979eef02c 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/LiteralRationalExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/LiteralRationalExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Expressions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -154,17 +155,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Expressions.L { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/LiteralStringExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/LiteralStringExtensions.cs index 64f36c641..cd383ff62 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/LiteralStringExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/LiteralStringExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Expressions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -154,17 +155,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Expressions.L { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/MembershipExposeExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/MembershipExposeExtensions.cs index 9dece5720..009c2138f 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/MembershipExposeExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/MembershipExposeExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Views; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -87,7 +88,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -96,7 +97,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,7 +157,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Views.Member { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -166,26 +167,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Views.Member { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/MembershipExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/MembershipExtensions.cs index ca47673da..2d1cacd23 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/MembershipExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/MembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Root.Namespaces; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -87,7 +88,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -96,7 +97,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,7 +157,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Root.Namespaces.Memb { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -166,26 +167,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Root.Namespaces.Memb { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/MembershipImportExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/MembershipImportExtensions.cs index f6234d112..03e2cb15e 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/MembershipImportExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/MembershipImportExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Root.Namespaces; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -87,7 +88,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -96,7 +97,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,7 +157,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Root.Namespaces.Memb { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -166,26 +167,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Root.Namespaces.Memb { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/MergeNodeExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/MergeNodeExtensions.cs index f939efd45..f57eaeb4d 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/MergeNodeExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/MergeNodeExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Actions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Actions.Merg { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/MetaclassExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/MetaclassExtensions.cs index 5e7a75664..593744b71 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/MetaclassExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/MetaclassExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Metadata; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -85,7 +86,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -134,17 +135,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Metadata.Meta { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/MetadataAccessExpressionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/MetadataAccessExpressionExtensions.cs index 123aa216b..862c8ee6d 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/MetadataAccessExpressionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/MetadataAccessExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Expressions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -152,17 +153,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Expressions.M { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/MetadataDefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/MetadataDefinitionExtensions.cs index 951c8bc3c..fc9f317c9 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/MetadataDefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/MetadataDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Metadata; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -89,7 +90,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -138,17 +139,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Metadata.Met { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/MetadataFeatureExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/MetadataFeatureExtensions.cs index 2fffb68ee..7e4a5c449 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/MetadataFeatureExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/MetadataFeatureExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Metadata; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -152,17 +153,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Metadata.Meta { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/MetadataUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/MetadataUsageExtensions.cs index 6ee477d70..cb387f4c0 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/MetadataUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/MetadataUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Metadata; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Metadata.Met { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/MultiplicityExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/MultiplicityExtensions.cs index 7bf59fdc8..9efc5852c 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/MultiplicityExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/MultiplicityExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Core.Types; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -152,17 +153,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Types.Multiplic { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/MultiplicityRangeExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/MultiplicityRangeExtensions.cs index 9879a7490..74aff17ce 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/MultiplicityRangeExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/MultiplicityRangeExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Multiplicities; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -152,17 +153,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Multiplicitie { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/NamespaceExposeExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/NamespaceExposeExtensions.cs index ee72cc9ee..9b2d82376 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/NamespaceExposeExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/NamespaceExposeExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Views; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -87,7 +88,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -96,7 +97,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,7 +157,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Views.Namesp { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -166,26 +167,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Views.Namesp { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/NamespaceExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/NamespaceExtensions.cs index d65e0adba..8217f2f1d 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/NamespaceExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/NamespaceExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Root.Namespaces; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -81,7 +82,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -130,17 +131,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Root.Namespaces.Name { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/NamespaceImportExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/NamespaceImportExtensions.cs index 40032885f..5452d2814 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/NamespaceImportExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/NamespaceImportExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Root.Namespaces; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -87,7 +88,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -96,7 +97,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,7 +157,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Root.Namespaces.Name { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -166,26 +167,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Root.Namespaces.Name { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/NullExpressionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/NullExpressionExtensions.cs index 4c322ec02..f93869e2e 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/NullExpressionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/NullExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Expressions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -152,17 +153,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Expressions.N { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ObjectiveMembershipExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ObjectiveMembershipExtensions.cs index 529fd7380..c46d5455a 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ObjectiveMembershipExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ObjectiveMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Cases; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -143,7 +144,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Cases.Object { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -153,26 +154,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Cases.Object { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/OccurrenceDefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/OccurrenceDefinitionExtensions.cs index 48b7dcb35..72b17444e 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/OccurrenceDefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/OccurrenceDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Occurrences; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -89,7 +90,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -138,17 +139,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Occurrences. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/OccurrenceUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/OccurrenceUsageExtensions.cs index 12461e790..bf6a0773b 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/OccurrenceUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/OccurrenceUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Occurrences; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Occurrences. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/OperatorExpressionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/OperatorExpressionExtensions.cs index e07ea9e1f..ba9583df4 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/OperatorExpressionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/OperatorExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Expressions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -154,17 +155,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Expressions.O { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/OwningMembershipExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/OwningMembershipExtensions.cs index 38c5151c4..ba2d654e0 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/OwningMembershipExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/OwningMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Root.Namespaces; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -143,7 +144,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Root.Namespaces.Owni { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -153,26 +154,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Root.Namespaces.Owni { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/PackageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/PackageExtensions.cs index 638ac8da6..9d5c598d7 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/PackageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/PackageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Packages; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -81,7 +82,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -130,17 +131,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Packages.Pack { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ParameterMembershipExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ParameterMembershipExtensions.cs index da857db0e..d6313e8e2 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ParameterMembershipExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ParameterMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Behaviors; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -143,7 +144,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Behaviors.Par { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -153,26 +154,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Behaviors.Par { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/PartDefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/PartDefinitionExtensions.cs index 2f4588083..d84adf4e8 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/PartDefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/PartDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Parts; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -89,7 +90,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -138,17 +139,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Parts.PartDe { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/PartUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/PartUsageExtensions.cs index a7cf5861c..e9d6d9e94 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/PartUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/PartUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Parts; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Parts.PartUs { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/PayloadFeatureExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/PayloadFeatureExtensions.cs index 05fc51a20..1c69d3146 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/PayloadFeatureExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/PayloadFeatureExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Interactions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -152,17 +153,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Interactions. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/PerformActionUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/PerformActionUsageExtensions.cs index d8e957530..cfe92409f 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/PerformActionUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/PerformActionUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Actions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Actions.Perf { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/PortConjugationExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/PortConjugationExtensions.cs index ac5e674f7..e52b05a5c 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/PortConjugationExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/PortConjugationExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Ports; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -159,7 +160,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Ports.PortCo { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -169,26 +170,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Ports.PortCo { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/PortDefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/PortDefinitionExtensions.cs index 60a54fdba..8b1b3fcbc 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/PortDefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/PortDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Ports; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -89,7 +90,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -138,17 +139,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Ports.PortDe { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/PortUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/PortUsageExtensions.cs index 059974edd..65fd41eba 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/PortUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/PortUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Ports; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Ports.PortUs { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/PredicateExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/PredicateExtensions.cs index dc1dd5069..1d6000124 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/PredicateExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/PredicateExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Functions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -85,7 +86,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -134,17 +135,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Functions.Pre { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/RedefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/RedefinitionExtensions.cs index 097c77184..2ce2217e3 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/RedefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/RedefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Core.Features; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -141,7 +142,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Features.Redefi { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -151,26 +152,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Features.Redefi { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } if (cache.TryGetValue(dto.RedefinedFeature, out lazyPoco)) diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ReferenceSubsettingExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ReferenceSubsettingExtensions.cs index 568d6c788..b84c0a819 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ReferenceSubsettingExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ReferenceSubsettingExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Core.Features; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -141,7 +142,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Features.Refere { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -151,26 +152,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Features.Refere { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } if (cache.TryGetValue(dto.ReferencedFeature, out lazyPoco)) diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ReferenceUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ReferenceUsageExtensions.cs index 36286c621..a20378b02 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ReferenceUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ReferenceUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.DefinitionAndUsage; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -152,17 +153,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.DefinitionAn { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/RenderingDefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/RenderingDefinitionExtensions.cs index b931ad39e..5cbec86f6 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/RenderingDefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/RenderingDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Views; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -89,7 +90,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -138,17 +139,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Views.Render { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/RenderingUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/RenderingUsageExtensions.cs index db47639cc..207b0b044 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/RenderingUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/RenderingUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Views; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Views.Render { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/RequirementConstraintMembershipExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/RequirementConstraintMembershipExtensions.cs index 34847cc41..e514d465a 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/RequirementConstraintMembershipExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/RequirementConstraintMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Requirements; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -85,7 +86,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -94,7 +95,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -145,7 +146,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Requirements { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -155,26 +156,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Requirements { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/RequirementDefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/RequirementDefinitionExtensions.cs index 4c8f6efe7..642751a96 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/RequirementDefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/RequirementDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Requirements; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -87,7 +88,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -138,17 +139,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Requirements { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/RequirementUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/RequirementUsageExtensions.cs index b369646f5..d838fe95d 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/RequirementUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/RequirementUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Requirements; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Requirements { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/RequirementVerificationMembershipExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/RequirementVerificationMembershipExtensions.cs index adf86d143..1a82ece10 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/RequirementVerificationMembershipExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/RequirementVerificationMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.VerificationCases; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -85,7 +86,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -94,7 +95,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -145,7 +146,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Verification { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -155,26 +156,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Verification { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ResultExpressionMembershipExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ResultExpressionMembershipExtensions.cs index 7ccbad90d..1771aae4d 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ResultExpressionMembershipExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ResultExpressionMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Functions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -143,7 +144,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Functions.Res { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -153,26 +154,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Functions.Res { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ReturnParameterMembershipExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ReturnParameterMembershipExtensions.cs index e45fa1949..7ff54f907 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ReturnParameterMembershipExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ReturnParameterMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Functions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -143,7 +144,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Functions.Ret { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -153,26 +154,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Functions.Ret { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/SatisfyRequirementUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/SatisfyRequirementUsageExtensions.cs index 992c94f47..81e59ddc5 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/SatisfyRequirementUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/SatisfyRequirementUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Requirements; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -158,17 +159,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Requirements { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/SelectExpressionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/SelectExpressionExtensions.cs index 005d128b1..024b23041 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/SelectExpressionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/SelectExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Expressions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -154,17 +155,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Expressions.S { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/SendActionUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/SendActionUsageExtensions.cs index 717751ba6..f6554732e 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/SendActionUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/SendActionUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Actions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Actions.Send { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/SpecializationExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/SpecializationExtensions.cs index 9663a25aa..09b649270 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/SpecializationExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/SpecializationExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Core.Types; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -150,7 +151,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Types.Specializ { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -160,26 +161,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Types.Specializ { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } if (cache.TryGetValue(dto.Specific, out lazyPoco)) diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/StakeholderMembershipExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/StakeholderMembershipExtensions.cs index 2939ca856..0de7d72ed 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/StakeholderMembershipExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/StakeholderMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Requirements; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -143,7 +144,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Requirements { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -153,26 +154,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Requirements { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/StateDefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/StateDefinitionExtensions.cs index 45d22335f..b19963b3e 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/StateDefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/StateDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.States; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -91,7 +92,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -140,17 +141,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.States.State { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/StateSubactionMembershipExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/StateSubactionMembershipExtensions.cs index 7a0828a01..22e29a2a1 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/StateSubactionMembershipExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/StateSubactionMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.States; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -85,7 +86,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -94,7 +95,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -145,7 +146,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.States.State { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -155,26 +156,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.States.State { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/StateUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/StateUsageExtensions.cs index 798df856e..7843f13d6 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/StateUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/StateUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.States; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -107,7 +108,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -158,17 +159,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.States.State { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/StepExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/StepExtensions.cs index 852932e68..8a6fcc38d 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/StepExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/StepExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Behaviors; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -152,17 +153,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Behaviors.Ste { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/StructureExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/StructureExtensions.cs index 55f95694e..e01e3ad75 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/StructureExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/StructureExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Structures; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -85,7 +86,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -134,17 +135,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Structures.St { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/SubclassificationExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/SubclassificationExtensions.cs index b6b6dce8f..2673ce33f 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/SubclassificationExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/SubclassificationExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Core.Classifiers; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -141,7 +142,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Classifiers.Sub { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -151,26 +152,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Classifiers.Sub { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } if (cache.TryGetValue(dto.Subclassifier, out lazyPoco)) diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/SubjectMembershipExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/SubjectMembershipExtensions.cs index 404f19fd3..a626ee519 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/SubjectMembershipExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/SubjectMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Requirements; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -143,7 +144,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Requirements { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -153,26 +154,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Requirements { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/SubsettingExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/SubsettingExtensions.cs index 36acb26b5..0cc56ebb9 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/SubsettingExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/SubsettingExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Core.Features; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -141,7 +142,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Features.Subset { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -151,26 +152,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Features.Subset { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } if (cache.TryGetValue(dto.SubsettedFeature, out lazyPoco)) diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/SuccessionAsUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/SuccessionAsUsageExtensions.cs index 7db17da19..6f03eaeef 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/SuccessionAsUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/SuccessionAsUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Connections; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -114,7 +115,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -163,7 +164,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Connections. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -173,26 +174,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Connections. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/SuccessionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/SuccessionExtensions.cs index 11c843ef4..c76e6eed1 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/SuccessionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/SuccessionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Connectors; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -114,7 +115,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -163,7 +164,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Connectors.Su { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -173,26 +174,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Connectors.Su { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/SuccessionFlowExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/SuccessionFlowExtensions.cs index 91f6feb49..917cf10c3 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/SuccessionFlowExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/SuccessionFlowExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Kernel.Interactions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -114,7 +115,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -163,7 +164,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Interactions. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -173,26 +174,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Kernel.Interactions. { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/SuccessionFlowUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/SuccessionFlowUsageExtensions.cs index 32fcaee13..cb37a8c86 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/SuccessionFlowUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/SuccessionFlowUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Flows; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -107,7 +108,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -116,7 +117,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -167,7 +168,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Flows.Succes { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -177,26 +178,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Flows.Succes { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/TerminateActionUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/TerminateActionUsageExtensions.cs index d6542df31..5fd1806f1 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/TerminateActionUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/TerminateActionUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Actions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Actions.Term { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/TextualRepresentationExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/TextualRepresentationExtensions.cs index 8408473ba..df8665de5 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/TextualRepresentationExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/TextualRepresentationExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Root.Annotations; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -85,7 +86,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -134,17 +135,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Root.Annotations.Tex { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/TransitionFeatureMembershipExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/TransitionFeatureMembershipExtensions.cs index 7b2b0882b..844f84e07 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/TransitionFeatureMembershipExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/TransitionFeatureMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.States; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -85,7 +86,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -94,7 +95,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -145,7 +146,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.States.Trans { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -155,26 +156,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.States.Trans { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/TransitionUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/TransitionUsageExtensions.cs index 0f33bf2dc..a619577fd 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/TransitionUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/TransitionUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.States; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.States.Trans { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/TriggerInvocationExpressionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/TriggerInvocationExpressionExtensions.cs index 41041a92c..2b803e0ae 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/TriggerInvocationExpressionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/TriggerInvocationExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Actions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -154,17 +155,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Actions.Trig { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/TypeExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/TypeExtensions.cs index eaa04b30b..4312102a6 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/TypeExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/TypeExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Core.Types; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -85,7 +86,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -134,17 +135,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Types.Type poco { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/TypeFeaturingExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/TypeFeaturingExtensions.cs index 708a37775..c5f2d2b93 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/TypeFeaturingExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/TypeFeaturingExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Core.Features; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -159,7 +160,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Features.TypeFe { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -169,26 +170,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Features.TypeFe { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/UnioningExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/UnioningExtensions.cs index 8967099f1..0a38a7a0c 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/UnioningExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/UnioningExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Core.Types; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -141,7 +142,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Types.Unioning { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -151,26 +152,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Core.Types.Unioning { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } if (cache.TryGetValue(dto.UnioningType, out lazyPoco)) diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/UsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/UsageExtensions.cs index 55db52eef..b9b56e049 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/UsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/UsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.DefinitionAndUsage; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -152,17 +153,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.DefinitionAn { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/UseCaseDefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/UseCaseDefinitionExtensions.cs index 8bbdf1622..a8bd3da27 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/UseCaseDefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/UseCaseDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.UseCases; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -89,7 +90,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -138,17 +139,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.UseCases.Use { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/UseCaseUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/UseCaseUsageExtensions.cs index 0a765ba17..1e43b1bbb 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/UseCaseUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/UseCaseUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.UseCases; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.UseCases.Use { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/VariantMembershipExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/VariantMembershipExtensions.cs index bb3c193ca..94d67cbeb 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/VariantMembershipExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/VariantMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.DefinitionAndUsage; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -143,7 +144,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.DefinitionAn { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -153,26 +154,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.DefinitionAn { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/VerificationCaseDefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/VerificationCaseDefinitionExtensions.cs index 83b423a03..1397b4916 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/VerificationCaseDefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/VerificationCaseDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.VerificationCases; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -89,7 +90,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -138,17 +139,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Verification { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/VerificationCaseUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/VerificationCaseUsageExtensions.cs index 3165db79d..ef08957f4 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/VerificationCaseUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/VerificationCaseUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.VerificationCases; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Verification { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ViewDefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ViewDefinitionExtensions.cs index d9340f70e..052bc1284 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ViewDefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ViewDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Views; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -89,7 +90,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -138,17 +139,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Views.ViewDe { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ViewRenderingMembershipExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ViewRenderingMembershipExtensions.cs index 964e66491..b5fb27a2e 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ViewRenderingMembershipExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ViewRenderingMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Views; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -83,7 +84,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelatedElementToDelete) { - poco.OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); + ((IContainedRelationship)poco).OwnedRelatedElement.Remove(poco.OwnedRelatedElement.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelatedElementToDelete); @@ -92,7 +93,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -143,7 +144,7 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Views.ViewRe { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelatedElement.Add(lazyPoco.Value); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(lazyPoco.Value); } } @@ -153,26 +154,26 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Views.ViewRe { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelatedElement.HasValue && cache.TryGetValue(dto.OwningRelatedElement.Value, out lazyPoco)) { - poco.OwningRelatedElement = lazyPoco.Value; + ((IContainedRelationship)poco).OwningRelatedElement = lazyPoco.Value; } else { - poco.OwningRelatedElement = null; + ((IContainedRelationship)poco).OwningRelatedElement = null; } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ViewUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ViewUsageExtensions.cs index 97ca991bb..4ae66be69 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ViewUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ViewUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Views; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Views.ViewUs { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ViewpointDefinitionExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ViewpointDefinitionExtensions.cs index ce8f5b881..0b15ad0b4 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ViewpointDefinitionExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ViewpointDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Views; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -87,7 +88,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -138,17 +139,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Views.Viewpo { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ViewpointUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ViewpointUsageExtensions.cs index 6b5f81324..1e963c3fd 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/ViewpointUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/ViewpointUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Views; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -103,7 +104,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Views.Viewpo { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Dal/Core/AutoGenPocoExtension/WhileLoopActionUsageExtensions.cs b/SysML2.NET.Dal/Core/AutoGenPocoExtension/WhileLoopActionUsageExtensions.cs index 19981aa91..998801b68 100644 --- a/SysML2.NET.Dal/Core/AutoGenPocoExtension/WhileLoopActionUsageExtensions.cs +++ b/SysML2.NET.Dal/Core/AutoGenPocoExtension/WhileLoopActionUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Dal using System.Linq; using Core.POCO.Systems.Actions; + using SysML2.NET.Core.POCO.Root.Elements; /// /// A static class that provides extension methods for the class @@ -105,7 +106,7 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t foreach (var identifier in ownedRelationshipToDelete) { - poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + ((IContainedElement)poco).OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); } identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); @@ -156,17 +157,17 @@ public static void UpdateReferenceProperties(this Core.POCO.Systems.Actions.Whil { if (cache.TryGetValue(identifier, out lazyPoco)) { - poco.OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); + ((IContainedElement)poco).OwnedRelationship.Add((Core.POCO.Root.Elements.IRelationship)lazyPoco.Value); } } if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) { - poco.OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; + ((IContainedElement)poco).OwningRelationship = (Core.POCO.Root.Elements.IRelationship)lazyPoco.Value; } else { - poco.OwningRelationship = null; + ((IContainedElement)poco).OwningRelationship = null; } } diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AcceptActionUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AcceptActionUsageExtensions.cs index 3842ff4a0..041cda3f1 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AcceptActionUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AcceptActionUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ActionDefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ActionDefinitionExtensions.cs index a02ad3d72..28bfb6829 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ActionDefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ActionDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ActionUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ActionUsageExtensions.cs index d6117988c..f8acbcf34 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ActionUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ActionUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ActorMembershipExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ActorMembershipExtensions.cs index 11e1779c0..465efe005 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ActorMembershipExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ActorMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AllocationDefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AllocationDefinitionExtensions.cs index 1d0f506d0..978d3092f 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AllocationDefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AllocationDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AllocationUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AllocationUsageExtensions.cs index 5425c1258..57c076669 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AllocationUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AllocationUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AnalysisCaseDefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AnalysisCaseDefinitionExtensions.cs index 2e39fcabb..f599def18 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AnalysisCaseDefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AnalysisCaseDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AnalysisCaseUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AnalysisCaseUsageExtensions.cs index e5e4112bc..c89cdf090 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AnalysisCaseUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AnalysisCaseUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AnnotatingElementExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AnnotatingElementExtensions.cs index 0e8c8f5f7..b4de8c5c9 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AnnotatingElementExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AnnotatingElementExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AnnotationExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AnnotationExtensions.cs index 234bac582..9a41ed0e0 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AnnotationExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AnnotationExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -116,7 +117,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -174,7 +175,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -197,7 +198,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AssertConstraintUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AssertConstraintUsageExtensions.cs index a7b8c7245..98a679b87 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AssertConstraintUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AssertConstraintUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AssignmentActionUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AssignmentActionUsageExtensions.cs index 463dbf8e1..2febc85b9 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AssignmentActionUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AssignmentActionUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AssociationExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AssociationExtensions.cs index ceb931a28..4037a1ff4 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AssociationExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AssociationExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AssociationStructureExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AssociationStructureExtensions.cs index 4bc0b649d..b02a0d7da 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AssociationStructureExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AssociationStructureExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AttributeDefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AttributeDefinitionExtensions.cs index f49f3ca21..63ed9f25d 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AttributeDefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AttributeDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AttributeUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AttributeUsageExtensions.cs index caa815d12..5ab32962d 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AttributeUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/AttributeUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/BehaviorExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/BehaviorExtensions.cs index 2016ecdc7..4c539c34d 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/BehaviorExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/BehaviorExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/BindingConnectorAsUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/BindingConnectorAsUsageExtensions.cs index c51f05c03..63a3ef254 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/BindingConnectorAsUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/BindingConnectorAsUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/BindingConnectorExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/BindingConnectorExtensions.cs index 5ea8e1e1b..4ad512818 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/BindingConnectorExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/BindingConnectorExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/BooleanExpressionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/BooleanExpressionExtensions.cs index c56f20d02..a680e10b5 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/BooleanExpressionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/BooleanExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CalculationDefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CalculationDefinitionExtensions.cs index b9a86b62d..3590719bf 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CalculationDefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CalculationDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CalculationUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CalculationUsageExtensions.cs index 6e27ed26f..7ff63ba40 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CalculationUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CalculationUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CaseDefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CaseDefinitionExtensions.cs index 8f3e1cbf1..14423dd6f 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CaseDefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CaseDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CaseUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CaseUsageExtensions.cs index 8392ec326..0b3efd93a 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CaseUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CaseUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ClassExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ClassExtensions.cs index 6f541187c..ea5893626 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ClassExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ClassExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ClassifierExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ClassifierExtensions.cs index 87f08f274..f962ceb82 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ClassifierExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ClassifierExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CollectExpressionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CollectExpressionExtensions.cs index 640c8cf5f..0a427189f 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CollectExpressionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CollectExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CommentExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CommentExtensions.cs index 29e14bfb4..8bc35a9fd 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CommentExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CommentExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConcernDefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConcernDefinitionExtensions.cs index fe3a00fbe..1cfa77b05 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConcernDefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConcernDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConcernUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConcernUsageExtensions.cs index 3c828594d..f2ad08211 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConcernUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConcernUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConjugatedPortDefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConjugatedPortDefinitionExtensions.cs index 911a8ed1b..6794d8f9b 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConjugatedPortDefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConjugatedPortDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConjugatedPortTypingExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConjugatedPortTypingExtensions.cs index edcbda74a..f1c405216 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConjugatedPortTypingExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConjugatedPortTypingExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -116,7 +117,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -193,7 +194,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -216,7 +217,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConjugationExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConjugationExtensions.cs index 467264ea0..d95460cbb 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConjugationExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConjugationExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -116,7 +117,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -135,7 +136,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -193,7 +194,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -216,7 +217,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConnectionDefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConnectionDefinitionExtensions.cs index 4effb2cd9..e567514d3 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConnectionDefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConnectionDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConnectionUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConnectionUsageExtensions.cs index 7df67e8f6..f5f828f1d 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConnectionUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConnectionUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConnectorExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConnectorExtensions.cs index 6c81708b6..60b9961b9 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConnectorExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConnectorExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConstraintDefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConstraintDefinitionExtensions.cs index 7bb52c037..9a2ef9c74 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConstraintDefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConstraintDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConstraintUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConstraintUsageExtensions.cs index 47e2d9dcb..a3ee3f7f3 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConstraintUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConstraintUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConstructorExpressionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConstructorExpressionExtensions.cs index 9213b9a82..675d3400f 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConstructorExpressionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ConstructorExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CrossSubsettingExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CrossSubsettingExtensions.cs index f18bd0906..42b544f42 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CrossSubsettingExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/CrossSubsettingExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -116,7 +117,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -174,7 +175,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -197,7 +198,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DataTypeExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DataTypeExtensions.cs index 8507fb405..b4360c5ac 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DataTypeExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DataTypeExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DecisionNodeExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DecisionNodeExtensions.cs index 2ec2a701c..88c116326 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DecisionNodeExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DecisionNodeExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DefinitionExtensions.cs index 262c6aedd..08c905a12 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DependencyExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DependencyExtensions.cs index b893a938d..2658ec4ee 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DependencyExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DependencyExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -201,7 +202,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DifferencingExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DifferencingExtensions.cs index 1f6b0e732..2d2fe8efc 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DifferencingExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DifferencingExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -116,7 +117,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -174,7 +175,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -197,7 +198,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DisjoiningExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DisjoiningExtensions.cs index fea5ba312..19aa2906d 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DisjoiningExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DisjoiningExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -116,7 +117,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -193,7 +194,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -216,7 +217,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DocumentationExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DocumentationExtensions.cs index 5208cc45b..af7992f85 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DocumentationExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/DocumentationExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ElementFilterMembershipExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ElementFilterMembershipExtensions.cs index 723310412..c41931deb 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ElementFilterMembershipExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ElementFilterMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/EndFeatureMembershipExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/EndFeatureMembershipExtensions.cs index a8f5d7d78..210d7e14a 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/EndFeatureMembershipExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/EndFeatureMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/EnumerationDefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/EnumerationDefinitionExtensions.cs index c5036bfc0..a714bf647 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/EnumerationDefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/EnumerationDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/EnumerationUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/EnumerationUsageExtensions.cs index 95de22b10..491de729a 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/EnumerationUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/EnumerationUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/EventOccurrenceUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/EventOccurrenceUsageExtensions.cs index b166a8303..4da86c391 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/EventOccurrenceUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/EventOccurrenceUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ExhibitStateUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ExhibitStateUsageExtensions.cs index fa40bce43..bcf11d2f5 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ExhibitStateUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ExhibitStateUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ExpressionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ExpressionExtensions.cs index 361051fe6..23f2f5972 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ExpressionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureChainExpressionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureChainExpressionExtensions.cs index 3d79fcdfd..405302590 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureChainExpressionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureChainExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureChainingExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureChainingExtensions.cs index cece6afc2..e1d674ecc 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureChainingExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureChainingExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -116,7 +117,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -174,7 +175,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -197,7 +198,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureExtensions.cs index 400f8e1a0..63a3c0479 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureInvertingExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureInvertingExtensions.cs index d466227ef..712cf1363 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureInvertingExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureInvertingExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -116,7 +117,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -135,7 +136,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -193,7 +194,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -216,7 +217,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureMembershipExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureMembershipExtensions.cs index 9dc7eb9c5..9435b075e 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureMembershipExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureReferenceExpressionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureReferenceExpressionExtensions.cs index 0ce6c07ba..e0430e8bc 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureReferenceExpressionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureReferenceExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureTypingExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureTypingExtensions.cs index 88243ed4f..ea8f3bc2c 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureTypingExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureTypingExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -193,7 +194,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -216,7 +217,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureValueExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureValueExtensions.cs index 0c93d8f5e..0296d065e 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureValueExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FeatureValueExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FlowDefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FlowDefinitionExtensions.cs index e00d34140..c65c77f78 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FlowDefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FlowDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FlowEndExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FlowEndExtensions.cs index fafaaa8ca..0abe2a40a 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FlowEndExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FlowEndExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FlowExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FlowExtensions.cs index 98184fda7..a8b7cb45c 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FlowExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FlowExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FlowUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FlowUsageExtensions.cs index a9df59bec..a60e5c7ea 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FlowUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FlowUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ForLoopActionUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ForLoopActionUsageExtensions.cs index bb3e5380f..2cb9517b6 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ForLoopActionUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ForLoopActionUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ForkNodeExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ForkNodeExtensions.cs index 4bc44e60f..4974cc5fb 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ForkNodeExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ForkNodeExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FramedConcernMembershipExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FramedConcernMembershipExtensions.cs index 73358929e..36539d249 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FramedConcernMembershipExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FramedConcernMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FunctionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FunctionExtensions.cs index f5ed31b0f..70a6ccdb1 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FunctionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/FunctionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/IfActionUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/IfActionUsageExtensions.cs index 1cd338764..512631acf 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/IfActionUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/IfActionUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/IncludeUseCaseUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/IncludeUseCaseUsageExtensions.cs index e033e99c1..2e7752b40 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/IncludeUseCaseUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/IncludeUseCaseUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/IndexExpressionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/IndexExpressionExtensions.cs index 0e814aa9c..73b19e126 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/IndexExpressionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/IndexExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/InteractionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/InteractionExtensions.cs index 7e83c30e2..16d4f218a 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/InteractionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/InteractionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/InterfaceDefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/InterfaceDefinitionExtensions.cs index 917edab83..a7b6c047e 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/InterfaceDefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/InterfaceDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/InterfaceUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/InterfaceUsageExtensions.cs index 2e1a4080e..a4fdda54a 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/InterfaceUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/InterfaceUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/IntersectingExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/IntersectingExtensions.cs index 8c24b3395..e4bc95706 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/IntersectingExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/IntersectingExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -116,7 +117,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -174,7 +175,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -197,7 +198,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/InvariantExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/InvariantExtensions.cs index 5519afb01..8ecc6816c 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/InvariantExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/InvariantExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/InvocationExpressionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/InvocationExpressionExtensions.cs index 2fcaa72b1..266c2ea80 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/InvocationExpressionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/InvocationExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ItemDefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ItemDefinitionExtensions.cs index 8ee92781e..732792525 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ItemDefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ItemDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ItemUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ItemUsageExtensions.cs index f6f460f0d..ad94e20f9 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ItemUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ItemUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/JoinNodeExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/JoinNodeExtensions.cs index 8ba481073..7436dff58 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/JoinNodeExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/JoinNodeExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LibraryPackageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LibraryPackageExtensions.cs index f855965bc..05363e921 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LibraryPackageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LibraryPackageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LiteralBooleanExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LiteralBooleanExtensions.cs index d841e87b2..75b30f7e7 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LiteralBooleanExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LiteralBooleanExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LiteralExpressionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LiteralExpressionExtensions.cs index 9f59af902..eaca0a3c0 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LiteralExpressionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LiteralExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LiteralInfinityExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LiteralInfinityExtensions.cs index 07ab2f5be..e58a8b946 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LiteralInfinityExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LiteralInfinityExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LiteralIntegerExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LiteralIntegerExtensions.cs index fe3b9fe77..082678cc2 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LiteralIntegerExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LiteralIntegerExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LiteralRationalExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LiteralRationalExtensions.cs index 9e90871dd..5c49509a5 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LiteralRationalExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LiteralRationalExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LiteralStringExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LiteralStringExtensions.cs index b7c6088ea..4cb7f5ab8 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LiteralStringExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/LiteralStringExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MembershipExposeExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MembershipExposeExtensions.cs index e0811b4a5..27fc474b6 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MembershipExposeExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MembershipExposeExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -116,7 +117,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -174,7 +175,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -197,7 +198,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MembershipExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MembershipExtensions.cs index 2e53dbcfc..5d261a524 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MembershipExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -116,7 +117,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -174,7 +175,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -197,7 +198,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MembershipImportExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MembershipImportExtensions.cs index c20718d1b..38af3f442 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MembershipImportExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MembershipImportExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -116,7 +117,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -174,7 +175,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -197,7 +198,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MergeNodeExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MergeNodeExtensions.cs index 3cc189e36..f86efd7a2 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MergeNodeExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MergeNodeExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MetaclassExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MetaclassExtensions.cs index 60f3e5b25..44027016c 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MetaclassExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MetaclassExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MetadataAccessExpressionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MetadataAccessExpressionExtensions.cs index be1ccf664..eb802cd8b 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MetadataAccessExpressionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MetadataAccessExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MetadataDefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MetadataDefinitionExtensions.cs index bdc9f28df..c341a4007 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MetadataDefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MetadataDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MetadataFeatureExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MetadataFeatureExtensions.cs index 55eff63b7..cfdc4ad98 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MetadataFeatureExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MetadataFeatureExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MetadataUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MetadataUsageExtensions.cs index c55cb351b..047fea209 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MetadataUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MetadataUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MultiplicityExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MultiplicityExtensions.cs index b1ec19144..2449d4aa3 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MultiplicityExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MultiplicityExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MultiplicityRangeExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MultiplicityRangeExtensions.cs index 8f430a98a..753dc450f 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MultiplicityRangeExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/MultiplicityRangeExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/NamespaceExposeExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/NamespaceExposeExtensions.cs index 7b5f41d59..9f79fdf71 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/NamespaceExposeExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/NamespaceExposeExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -116,7 +117,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -174,7 +175,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -197,7 +198,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/NamespaceExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/NamespaceExtensions.cs index b35556c78..cd1094851 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/NamespaceExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/NamespaceExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/NamespaceImportExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/NamespaceImportExtensions.cs index 50fa868b2..51ab56b83 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/NamespaceImportExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/NamespaceImportExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -116,7 +117,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -174,7 +175,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -197,7 +198,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/NullExpressionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/NullExpressionExtensions.cs index d98882cac..873d13b60 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/NullExpressionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/NullExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ObjectiveMembershipExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ObjectiveMembershipExtensions.cs index 652535839..88b476ec4 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ObjectiveMembershipExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ObjectiveMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/OccurrenceDefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/OccurrenceDefinitionExtensions.cs index 6b6989fd5..0f3c0f7fa 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/OccurrenceDefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/OccurrenceDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/OccurrenceUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/OccurrenceUsageExtensions.cs index 1ca209aa8..aea20891e 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/OccurrenceUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/OccurrenceUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/OperatorExpressionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/OperatorExpressionExtensions.cs index 0978b6d52..93138085f 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/OperatorExpressionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/OperatorExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/OwningMembershipExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/OwningMembershipExtensions.cs index 96089e98c..22779a661 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/OwningMembershipExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/OwningMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PackageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PackageExtensions.cs index 6fd98277c..33fc8386d 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PackageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PackageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ParameterMembershipExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ParameterMembershipExtensions.cs index f4c1f2c00..2f0decb82 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ParameterMembershipExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ParameterMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PartDefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PartDefinitionExtensions.cs index 57bd0bbc9..b4806c4e1 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PartDefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PartDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PartUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PartUsageExtensions.cs index 3b1cc686d..f65cae993 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PartUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PartUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PayloadFeatureExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PayloadFeatureExtensions.cs index d1245a424..1ffda4657 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PayloadFeatureExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PayloadFeatureExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PerformActionUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PerformActionUsageExtensions.cs index 5f16ecf9e..e72ab29cb 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PerformActionUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PerformActionUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PortConjugationExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PortConjugationExtensions.cs index 138c1bee1..e8fb385a5 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PortConjugationExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PortConjugationExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -116,7 +117,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -135,7 +136,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -193,7 +194,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -216,7 +217,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PortDefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PortDefinitionExtensions.cs index 14e622d58..0f3b94471 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PortDefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PortDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PortUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PortUsageExtensions.cs index 2d493dfc9..52a13eefc 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PortUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PortUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PredicateExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PredicateExtensions.cs index ea54a5b49..a6bfe7a40 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PredicateExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/PredicateExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RedefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RedefinitionExtensions.cs index c86e7ae6e..3da67f5bb 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RedefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RedefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -193,7 +194,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -216,7 +217,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ReferenceSubsettingExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ReferenceSubsettingExtensions.cs index 036748527..f6cd59748 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ReferenceSubsettingExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ReferenceSubsettingExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -174,7 +175,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -197,7 +198,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ReferenceUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ReferenceUsageExtensions.cs index 4ca3f489d..a1d236628 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ReferenceUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ReferenceUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RenderingDefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RenderingDefinitionExtensions.cs index 9fa3e62af..3ef4b3ef0 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RenderingDefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RenderingDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RenderingUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RenderingUsageExtensions.cs index a127bd525..d43c3d1e6 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RenderingUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RenderingUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RequirementConstraintMembershipExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RequirementConstraintMembershipExtensions.cs index 169767cf4..2ef3217a9 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RequirementConstraintMembershipExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RequirementConstraintMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RequirementDefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RequirementDefinitionExtensions.cs index bb28ea005..7c84301a1 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RequirementDefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RequirementDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RequirementUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RequirementUsageExtensions.cs index 0a8260ebe..cd0a2d1de 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RequirementUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RequirementUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RequirementVerificationMembershipExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RequirementVerificationMembershipExtensions.cs index 867f71969..e36bfe5fe 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RequirementVerificationMembershipExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/RequirementVerificationMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ResultExpressionMembershipExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ResultExpressionMembershipExtensions.cs index 82f97458e..add26166c 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ResultExpressionMembershipExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ResultExpressionMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ReturnParameterMembershipExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ReturnParameterMembershipExtensions.cs index eb5317e16..28a981c90 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ReturnParameterMembershipExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ReturnParameterMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SatisfyRequirementUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SatisfyRequirementUsageExtensions.cs index 9e2e5e29e..ae4ad6903 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SatisfyRequirementUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SatisfyRequirementUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SelectExpressionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SelectExpressionExtensions.cs index 72cd23d75..46008de2f 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SelectExpressionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SelectExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SendActionUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SendActionUsageExtensions.cs index 13c0f4d50..4436b25f6 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SendActionUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SendActionUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SpecializationExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SpecializationExtensions.cs index 3b0d4ac8d..14e5f6b95 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SpecializationExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SpecializationExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -116,7 +117,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -193,7 +194,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -216,7 +217,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/StakeholderMembershipExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/StakeholderMembershipExtensions.cs index aaef90818..20a940bcd 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/StakeholderMembershipExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/StakeholderMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/StateDefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/StateDefinitionExtensions.cs index e677a6f3b..7eead679a 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/StateDefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/StateDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/StateSubactionMembershipExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/StateSubactionMembershipExtensions.cs index 82dc7e79f..a082e0752 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/StateSubactionMembershipExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/StateSubactionMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/StateUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/StateUsageExtensions.cs index 0ffeca910..1e66857d1 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/StateUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/StateUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/StepExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/StepExtensions.cs index 7feaf3e44..f30ac9bb9 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/StepExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/StepExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/StructureExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/StructureExtensions.cs index d308e00fd..c2e871e93 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/StructureExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/StructureExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SubclassificationExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SubclassificationExtensions.cs index 9b777f6c4..525ed19aa 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SubclassificationExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SubclassificationExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -193,7 +194,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -216,7 +217,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SubjectMembershipExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SubjectMembershipExtensions.cs index 6603d1d5a..0c94ca9f9 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SubjectMembershipExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SubjectMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SubsettingExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SubsettingExtensions.cs index 403709e52..e8af72241 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SubsettingExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SubsettingExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -193,7 +194,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -216,7 +217,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SuccessionAsUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SuccessionAsUsageExtensions.cs index 18ff55eee..f4668913b 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SuccessionAsUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SuccessionAsUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SuccessionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SuccessionExtensions.cs index 477872b95..0bb83d888 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SuccessionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SuccessionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SuccessionFlowExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SuccessionFlowExtensions.cs index 2b19fd1e1..0d95e646a 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SuccessionFlowExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SuccessionFlowExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SuccessionFlowUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SuccessionFlowUsageExtensions.cs index d2087a100..cc67000d6 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SuccessionFlowUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/SuccessionFlowUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TerminateActionUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TerminateActionUsageExtensions.cs index 73d2e11e6..ddda4e74f 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TerminateActionUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TerminateActionUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TextualRepresentationExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TextualRepresentationExtensions.cs index d25015f32..7062d68b9 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TextualRepresentationExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TextualRepresentationExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TransitionFeatureMembershipExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TransitionFeatureMembershipExtensions.cs index 5d4563297..bf1712fd0 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TransitionFeatureMembershipExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TransitionFeatureMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TransitionUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TransitionUsageExtensions.cs index 737b8dcf0..c2ec7cc9f 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TransitionUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TransitionUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TriggerInvocationExpressionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TriggerInvocationExpressionExtensions.cs index aae77a652..cc4ce31e7 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TriggerInvocationExpressionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TriggerInvocationExpressionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TypeExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TypeExtensions.cs index 216df0bed..25d2dca0f 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TypeExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TypeExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TypeFeaturingExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TypeFeaturingExtensions.cs index 4ba4fcfc8..fdd56787b 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TypeFeaturingExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/TypeFeaturingExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -116,7 +117,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -135,7 +136,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -193,7 +194,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -216,7 +217,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/UnioningExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/UnioningExtensions.cs index 6becd3d4c..fd10ebcf5 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/UnioningExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/UnioningExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -174,7 +175,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -197,7 +198,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/UsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/UsageExtensions.cs index c197e3740..969b8f58c 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/UsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/UsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/UseCaseDefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/UseCaseDefinitionExtensions.cs index b103f8795..74743ce4f 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/UseCaseDefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/UseCaseDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/UseCaseUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/UseCaseUsageExtensions.cs index 4b2cb3d4c..35e9bb505 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/UseCaseUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/UseCaseUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/VariantMembershipExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/VariantMembershipExtensions.cs index 48a668c4c..39df9b1ef 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/VariantMembershipExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/VariantMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/VerificationCaseDefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/VerificationCaseDefinitionExtensions.cs index 529d5ff48..9bd77aa10 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/VerificationCaseDefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/VerificationCaseDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/VerificationCaseUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/VerificationCaseUsageExtensions.cs index 35e0aa705..63244f351 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/VerificationCaseUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/VerificationCaseUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ViewDefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ViewDefinitionExtensions.cs index 4e974ac28..20135c863 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ViewDefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ViewDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ViewRenderingMembershipExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ViewRenderingMembershipExtensions.cs index 553e8e484..2c8edf034 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ViewRenderingMembershipExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ViewRenderingMembershipExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwningRelatedElement = owningRelatedElementReference; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementReference; return; } @@ -97,7 +98,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -155,7 +156,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IElement"); } - poco.OwnedRelatedElement.Add(ownedRelatedElementReference); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementReference); } return; @@ -178,7 +179,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ViewUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ViewUsageExtensions.cs index d6836c71e..e6020946e 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ViewUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ViewUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ViewpointDefinitionExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ViewpointDefinitionExtensions.cs index eb5a9509e..15a592608 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ViewpointDefinitionExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ViewpointDefinitionExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ViewpointUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ViewpointUsageExtensions.cs index 65b5c0542..f0f050ae0 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ViewpointUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/ViewpointUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/WhileLoopActionUsageExtensions.cs b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/WhileLoopActionUsageExtensions.cs index f1c9364e3..dcf987f01 100644 --- a/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/WhileLoopActionUsageExtensions.cs +++ b/SysML2.NET.Serializer.Xmi/Extensions/AutoGenPocoReferenceResolveExtension/WhileLoopActionUsageExtensions.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Serializer.Xmi.Extensions using Microsoft.Extensions.Logging; using SysML2.NET.Common; + using SysML2.NET.Core.POCO.Root.Elements; /// /// Provides extensions methods for the to help resolve reference for properties @@ -78,7 +79,7 @@ public static void ResolveAndAssignSingleValueReference(this SysML2.NET.Core.POC throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwningRelationship = owningRelationshipReference; + ((IContainedElement)poco).OwningRelationship = owningRelationshipReference; return; } @@ -136,7 +137,7 @@ public static void ResolveAndAssignMultipleValueReferences(this SysML2.NET.Core. throw new InvalidOperationException($"The referenced element with the id [{reference}] is a {referencedData.GetType().Name}, expected type: an IRelationship"); } - poco.OwnedRelationship.Add(ownedRelationshipReference); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipReference); } return; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AcceptActionUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AcceptActionUsageReader.cs index b7eacf46a..3511bd613 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AcceptActionUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AcceptActionUsageReader.cs @@ -562,7 +562,7 @@ public override IAcceptActionUsage Read(XmlReader xmiReader, Uri currentLocation { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -583,7 +583,7 @@ public override IAcceptActionUsage Read(XmlReader xmiReader, Uri currentLocation { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1076,7 +1076,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1097,7 +1097,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ActionDefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ActionDefinitionReader.cs index f55928cdb..75d1da08a 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ActionDefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ActionDefinitionReader.cs @@ -372,7 +372,7 @@ public override IActionDefinition Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -393,7 +393,7 @@ public override IActionDefinition Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -688,7 +688,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -709,7 +709,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ActionUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ActionUsageReader.cs index 9a8f273ec..53a7ddbdf 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ActionUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ActionUsageReader.cs @@ -561,7 +561,7 @@ public override IActionUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -582,7 +582,7 @@ public override IActionUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1075,7 +1075,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curr { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1096,7 +1096,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curr { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ActorMembershipReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ActorMembershipReader.cs index f8cfecc34..cf1a0377c 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ActorMembershipReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ActorMembershipReader.cs @@ -326,7 +326,7 @@ public override IActorMembership Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -347,7 +347,7 @@ public override IActorMembership Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -368,7 +368,7 @@ public override IActorMembership Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -389,7 +389,7 @@ public override IActorMembership Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -670,7 +670,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -691,7 +691,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -712,7 +712,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -733,7 +733,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AllocationDefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AllocationDefinitionReader.cs index dc9de58e7..62bbacb6e 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AllocationDefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AllocationDefinitionReader.cs @@ -424,7 +424,7 @@ public override IAllocationDefinition Read(XmlReader xmiReader, Uri currentLocat { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -445,7 +445,7 @@ public override IAllocationDefinition Read(XmlReader xmiReader, Uri currentLocat { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -466,7 +466,7 @@ public override IAllocationDefinition Read(XmlReader xmiReader, Uri currentLocat { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -487,7 +487,7 @@ public override IAllocationDefinition Read(XmlReader xmiReader, Uri currentLocat { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -834,7 +834,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -855,7 +855,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -876,7 +876,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -897,7 +897,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AllocationUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AllocationUsageReader.cs index d5aea4605..6f239134b 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AllocationUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AllocationUsageReader.cs @@ -615,7 +615,7 @@ public override IAllocationUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -636,7 +636,7 @@ public override IAllocationUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -657,7 +657,7 @@ public override IAllocationUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -678,7 +678,7 @@ public override IAllocationUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1223,7 +1223,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -1244,7 +1244,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1265,7 +1265,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -1286,7 +1286,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AnalysisCaseDefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AnalysisCaseDefinitionReader.cs index 40bf1b369..076ecad0f 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AnalysisCaseDefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AnalysisCaseDefinitionReader.cs @@ -373,7 +373,7 @@ public override IAnalysisCaseDefinition Read(XmlReader xmiReader, Uri currentLoc { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -394,7 +394,7 @@ public override IAnalysisCaseDefinition Read(XmlReader xmiReader, Uri currentLoc { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -689,7 +689,7 @@ public override async Task ReadAsync(XmlReader xmiReade { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -710,7 +710,7 @@ public override async Task ReadAsync(XmlReader xmiReade { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AnalysisCaseUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AnalysisCaseUsageReader.cs index 742ec439f..6711c1e9e 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AnalysisCaseUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AnalysisCaseUsageReader.cs @@ -562,7 +562,7 @@ public override IAnalysisCaseUsage Read(XmlReader xmiReader, Uri currentLocation { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -583,7 +583,7 @@ public override IAnalysisCaseUsage Read(XmlReader xmiReader, Uri currentLocation { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1076,7 +1076,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1097,7 +1097,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AnnotatingElementReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AnnotatingElementReader.cs index d6273cd25..8fc9178cb 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AnnotatingElementReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AnnotatingElementReader.cs @@ -258,7 +258,7 @@ public override IAnnotatingElement Read(XmlReader xmiReader, Uri currentLocation { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -279,7 +279,7 @@ public override IAnnotatingElement Read(XmlReader xmiReader, Uri currentLocation { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -486,7 +486,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -507,7 +507,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AnnotationReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AnnotationReader.cs index a7ea979de..954d5446e 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AnnotationReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AnnotationReader.cs @@ -341,7 +341,7 @@ public override IAnnotation Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -362,7 +362,7 @@ public override IAnnotation Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -383,7 +383,7 @@ public override IAnnotation Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -404,7 +404,7 @@ public override IAnnotation Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -694,7 +694,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -715,7 +715,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -736,7 +736,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -757,7 +757,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AssertConstraintUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AssertConstraintUsageReader.cs index 898350443..05a84fd1e 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AssertConstraintUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AssertConstraintUsageReader.cs @@ -584,7 +584,7 @@ public override IAssertConstraintUsage Read(XmlReader xmiReader, Uri currentLoca { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -605,7 +605,7 @@ public override IAssertConstraintUsage Read(XmlReader xmiReader, Uri currentLoca { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1120,7 +1120,7 @@ public override async Task ReadAsync(XmlReader xmiReader { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1141,7 +1141,7 @@ public override async Task ReadAsync(XmlReader xmiReader { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AssignmentActionUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AssignmentActionUsageReader.cs index 2effb6b8c..7311f46d3 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AssignmentActionUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AssignmentActionUsageReader.cs @@ -562,7 +562,7 @@ public override IAssignmentActionUsage Read(XmlReader xmiReader, Uri currentLoca { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -583,7 +583,7 @@ public override IAssignmentActionUsage Read(XmlReader xmiReader, Uri currentLoca { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1076,7 +1076,7 @@ public override async Task ReadAsync(XmlReader xmiReader { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1097,7 +1097,7 @@ public override async Task ReadAsync(XmlReader xmiReader { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AssociationReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AssociationReader.cs index d992c5e92..ccf7b99f2 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AssociationReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AssociationReader.cs @@ -358,7 +358,7 @@ public override IAssociation Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -379,7 +379,7 @@ public override IAssociation Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -400,7 +400,7 @@ public override IAssociation Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -421,7 +421,7 @@ public override IAssociation Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -724,7 +724,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curr { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -745,7 +745,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curr { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -766,7 +766,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curr { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -787,7 +787,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curr { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AssociationStructureReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AssociationStructureReader.cs index eea764e19..11e8b0f2a 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AssociationStructureReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AssociationStructureReader.cs @@ -359,7 +359,7 @@ public override IAssociationStructure Read(XmlReader xmiReader, Uri currentLocat { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -380,7 +380,7 @@ public override IAssociationStructure Read(XmlReader xmiReader, Uri currentLocat { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -401,7 +401,7 @@ public override IAssociationStructure Read(XmlReader xmiReader, Uri currentLocat { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -422,7 +422,7 @@ public override IAssociationStructure Read(XmlReader xmiReader, Uri currentLocat { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -725,7 +725,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -746,7 +746,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -767,7 +767,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -788,7 +788,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AttributeDefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AttributeDefinitionReader.cs index ff5f7988f..35f18d2c8 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AttributeDefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AttributeDefinitionReader.cs @@ -350,7 +350,7 @@ public override IAttributeDefinition Read(XmlReader xmiReader, Uri currentLocati { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -371,7 +371,7 @@ public override IAttributeDefinition Read(XmlReader xmiReader, Uri currentLocati { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -644,7 +644,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -665,7 +665,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AttributeUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AttributeUsageReader.cs index 1d0f5394d..b4572c527 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AttributeUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/AttributeUsageReader.cs @@ -527,7 +527,7 @@ public override IAttributeUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -548,7 +548,7 @@ public override IAttributeUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -997,7 +997,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1018,7 +1018,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/BehaviorReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/BehaviorReader.cs index a357960eb..998412e4f 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/BehaviorReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/BehaviorReader.cs @@ -307,7 +307,7 @@ public override IBehavior Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -328,7 +328,7 @@ public override IBehavior Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -579,7 +579,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri current { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -600,7 +600,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri current { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/BindingConnectorAsUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/BindingConnectorAsUsageReader.cs index 71b8dd21d..aa9b86f7a 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/BindingConnectorAsUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/BindingConnectorAsUsageReader.cs @@ -580,7 +580,7 @@ public override IBindingConnectorAsUsage Read(XmlReader xmiReader, Uri currentLo { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -601,7 +601,7 @@ public override IBindingConnectorAsUsage Read(XmlReader xmiReader, Uri currentLo { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -622,7 +622,7 @@ public override IBindingConnectorAsUsage Read(XmlReader xmiReader, Uri currentLo { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -643,7 +643,7 @@ public override IBindingConnectorAsUsage Read(XmlReader xmiReader, Uri currentLo { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1144,7 +1144,7 @@ public override async Task ReadAsync(XmlReader xmiRead { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -1165,7 +1165,7 @@ public override async Task ReadAsync(XmlReader xmiRead { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1186,7 +1186,7 @@ public override async Task ReadAsync(XmlReader xmiRead { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -1207,7 +1207,7 @@ public override async Task ReadAsync(XmlReader xmiRead { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/BindingConnectorReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/BindingConnectorReader.cs index 7af020f7e..9a40b7849 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/BindingConnectorReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/BindingConnectorReader.cs @@ -557,7 +557,7 @@ public override IBindingConnector Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -578,7 +578,7 @@ public override IBindingConnector Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -599,7 +599,7 @@ public override IBindingConnector Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -620,7 +620,7 @@ public override IBindingConnector Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1121,7 +1121,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -1142,7 +1142,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1163,7 +1163,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -1184,7 +1184,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/BooleanExpressionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/BooleanExpressionReader.cs index 44b67b358..0136c897b 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/BooleanExpressionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/BooleanExpressionReader.cs @@ -505,7 +505,7 @@ public override IBooleanExpression Read(XmlReader xmiReader, Uri currentLocation { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -526,7 +526,7 @@ public override IBooleanExpression Read(XmlReader xmiReader, Uri currentLocation { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -975,7 +975,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -996,7 +996,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CalculationDefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CalculationDefinitionReader.cs index 05a9c8f38..683e6af2b 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CalculationDefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CalculationDefinitionReader.cs @@ -373,7 +373,7 @@ public override ICalculationDefinition Read(XmlReader xmiReader, Uri currentLoca { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -394,7 +394,7 @@ public override ICalculationDefinition Read(XmlReader xmiReader, Uri currentLoca { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -689,7 +689,7 @@ public override async Task ReadAsync(XmlReader xmiReader { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -710,7 +710,7 @@ public override async Task ReadAsync(XmlReader xmiReader { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CalculationUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CalculationUsageReader.cs index 236299312..5d5a154c5 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CalculationUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CalculationUsageReader.cs @@ -562,7 +562,7 @@ public override ICalculationUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -583,7 +583,7 @@ public override ICalculationUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1076,7 +1076,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1097,7 +1097,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CaseDefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CaseDefinitionReader.cs index 9b18de1c2..fc614ccae 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CaseDefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CaseDefinitionReader.cs @@ -373,7 +373,7 @@ public override ICaseDefinition Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -394,7 +394,7 @@ public override ICaseDefinition Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -689,7 +689,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -710,7 +710,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CaseUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CaseUsageReader.cs index 5373aa6d9..bb080006c 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CaseUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CaseUsageReader.cs @@ -562,7 +562,7 @@ public override ICaseUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -583,7 +583,7 @@ public override ICaseUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1076,7 +1076,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1097,7 +1097,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ClassReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ClassReader.cs index 97f0c5e04..c1758bcd4 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ClassReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ClassReader.cs @@ -306,7 +306,7 @@ public override IClass Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -327,7 +327,7 @@ public override IClass Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -578,7 +578,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentLoc { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -599,7 +599,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentLoc { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ClassifierReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ClassifierReader.cs index 696c887b7..186383511 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ClassifierReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ClassifierReader.cs @@ -305,7 +305,7 @@ public override IClassifier Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -326,7 +326,7 @@ public override IClassifier Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -577,7 +577,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -598,7 +598,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CollectExpressionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CollectExpressionReader.cs index e566cb95d..a79f620d2 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CollectExpressionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CollectExpressionReader.cs @@ -525,7 +525,7 @@ public override ICollectExpression Read(XmlReader xmiReader, Uri currentLocation { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -546,7 +546,7 @@ public override ICollectExpression Read(XmlReader xmiReader, Uri currentLocation { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1014,7 +1014,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1035,7 +1035,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CommentReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CommentReader.cs index d2e460d07..170e4edf9 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CommentReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CommentReader.cs @@ -296,7 +296,7 @@ public override IComment Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -317,7 +317,7 @@ public override IComment Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -562,7 +562,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentL { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -583,7 +583,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentL { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConcernDefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConcernDefinitionReader.cs index a87293cb3..6c1d6c156 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConcernDefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConcernDefinitionReader.cs @@ -361,7 +361,7 @@ public override IConcernDefinition Read(XmlReader xmiReader, Uri currentLocation { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -382,7 +382,7 @@ public override IConcernDefinition Read(XmlReader xmiReader, Uri currentLocation { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -677,7 +677,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -698,7 +698,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConcernUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConcernUsageReader.cs index 19f9bb732..673877970 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConcernUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConcernUsageReader.cs @@ -550,7 +550,7 @@ public override IConcernUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -571,7 +571,7 @@ public override IConcernUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1064,7 +1064,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1085,7 +1085,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConjugatedPortDefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConjugatedPortDefinitionReader.cs index 9633307fc..d7788f8bf 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConjugatedPortDefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConjugatedPortDefinitionReader.cs @@ -371,7 +371,7 @@ public override IConjugatedPortDefinition Read(XmlReader xmiReader, Uri currentL { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -392,7 +392,7 @@ public override IConjugatedPortDefinition Read(XmlReader xmiReader, Uri currentL { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -687,7 +687,7 @@ public override async Task ReadAsync(XmlReader xmiRea { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -708,7 +708,7 @@ public override async Task ReadAsync(XmlReader xmiRea { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConjugatedPortTypingReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConjugatedPortTypingReader.cs index b29526f69..4b2c6b65c 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConjugatedPortTypingReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConjugatedPortTypingReader.cs @@ -354,7 +354,7 @@ public override IConjugatedPortTyping Read(XmlReader xmiReader, Uri currentLocat { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -375,7 +375,7 @@ public override IConjugatedPortTyping Read(XmlReader xmiReader, Uri currentLocat { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -396,7 +396,7 @@ public override IConjugatedPortTyping Read(XmlReader xmiReader, Uri currentLocat { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -417,7 +417,7 @@ public override IConjugatedPortTyping Read(XmlReader xmiReader, Uri currentLocat { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -738,7 +738,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -759,7 +759,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -780,7 +780,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -801,7 +801,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConjugationReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConjugationReader.cs index 7dd07e149..ab8533117 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConjugationReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConjugationReader.cs @@ -373,7 +373,7 @@ public override IConjugation Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -394,7 +394,7 @@ public override IConjugation Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -415,7 +415,7 @@ public override IConjugation Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -436,7 +436,7 @@ public override IConjugation Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -757,7 +757,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curr { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -778,7 +778,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curr { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -799,7 +799,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curr { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -820,7 +820,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curr { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConnectionDefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConnectionDefinitionReader.cs index 4cd06670d..75004ee56 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConnectionDefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConnectionDefinitionReader.cs @@ -424,7 +424,7 @@ public override IConnectionDefinition Read(XmlReader xmiReader, Uri currentLocat { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -445,7 +445,7 @@ public override IConnectionDefinition Read(XmlReader xmiReader, Uri currentLocat { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -466,7 +466,7 @@ public override IConnectionDefinition Read(XmlReader xmiReader, Uri currentLocat { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -487,7 +487,7 @@ public override IConnectionDefinition Read(XmlReader xmiReader, Uri currentLocat { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -834,7 +834,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -855,7 +855,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -876,7 +876,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -897,7 +897,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConnectionUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConnectionUsageReader.cs index 0472c4476..05efa2ac8 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConnectionUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConnectionUsageReader.cs @@ -615,7 +615,7 @@ public override IConnectionUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -636,7 +636,7 @@ public override IConnectionUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -657,7 +657,7 @@ public override IConnectionUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -678,7 +678,7 @@ public override IConnectionUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1223,7 +1223,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -1244,7 +1244,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1265,7 +1265,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -1286,7 +1286,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConnectorReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConnectorReader.cs index f3cbc3b94..85fd92756 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConnectorReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConnectorReader.cs @@ -557,7 +557,7 @@ public override IConnector Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -578,7 +578,7 @@ public override IConnector Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -599,7 +599,7 @@ public override IConnector Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -620,7 +620,7 @@ public override IConnector Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1121,7 +1121,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -1142,7 +1142,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1163,7 +1163,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -1184,7 +1184,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConstraintDefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConstraintDefinitionReader.cs index 6dfb11a85..af10e8709 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConstraintDefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConstraintDefinitionReader.cs @@ -373,7 +373,7 @@ public override IConstraintDefinition Read(XmlReader xmiReader, Uri currentLocat { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -394,7 +394,7 @@ public override IConstraintDefinition Read(XmlReader xmiReader, Uri currentLocat { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -689,7 +689,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -710,7 +710,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConstraintUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConstraintUsageReader.cs index d17c01ebe..1b568b5f1 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConstraintUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConstraintUsageReader.cs @@ -562,7 +562,7 @@ public override IConstraintUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -583,7 +583,7 @@ public override IConstraintUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1076,7 +1076,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1097,7 +1097,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConstructorExpressionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConstructorExpressionReader.cs index b77d7ec80..72ab75a45 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConstructorExpressionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ConstructorExpressionReader.cs @@ -506,7 +506,7 @@ public override IConstructorExpression Read(XmlReader xmiReader, Uri currentLoca { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -527,7 +527,7 @@ public override IConstructorExpression Read(XmlReader xmiReader, Uri currentLoca { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -976,7 +976,7 @@ public override async Task ReadAsync(XmlReader xmiReader { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -997,7 +997,7 @@ public override async Task ReadAsync(XmlReader xmiReader { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CrossSubsettingReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CrossSubsettingReader.cs index 1db5ff1d8..da7f31b6b 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CrossSubsettingReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/CrossSubsettingReader.cs @@ -343,7 +343,7 @@ public override ICrossSubsetting Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -364,7 +364,7 @@ public override ICrossSubsetting Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -385,7 +385,7 @@ public override ICrossSubsetting Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -406,7 +406,7 @@ public override ICrossSubsetting Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -696,7 +696,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -717,7 +717,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -738,7 +738,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -759,7 +759,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DataTypeReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DataTypeReader.cs index f23a97145..9c78352ac 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DataTypeReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DataTypeReader.cs @@ -306,7 +306,7 @@ public override IDataType Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -327,7 +327,7 @@ public override IDataType Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -578,7 +578,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri current { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -599,7 +599,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri current { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DecisionNodeReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DecisionNodeReader.cs index a5d6efc42..940e8818f 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DecisionNodeReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DecisionNodeReader.cs @@ -561,7 +561,7 @@ public override IDecisionNode Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -582,7 +582,7 @@ public override IDecisionNode Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1075,7 +1075,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1096,7 +1096,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DefinitionReader.cs index 12b7d720a..53c8c50e4 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DefinitionReader.cs @@ -349,7 +349,7 @@ public override IDefinition Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -370,7 +370,7 @@ public override IDefinition Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -643,7 +643,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -664,7 +664,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DependencyReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DependencyReader.cs index c2b3ef003..6de94ece1 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DependencyReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DependencyReader.cs @@ -372,7 +372,7 @@ public override IDependency Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -393,7 +393,7 @@ public override IDependency Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -414,7 +414,7 @@ public override IDependency Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -435,7 +435,7 @@ public override IDependency Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -776,7 +776,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -797,7 +797,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -818,7 +818,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -839,7 +839,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DifferencingReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DifferencingReader.cs index 4a6a7b535..dd2bd3efe 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DifferencingReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DifferencingReader.cs @@ -342,7 +342,7 @@ public override IDifferencing Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -363,7 +363,7 @@ public override IDifferencing Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -384,7 +384,7 @@ public override IDifferencing Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -405,7 +405,7 @@ public override IDifferencing Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -695,7 +695,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cur { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -716,7 +716,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -737,7 +737,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cur { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -758,7 +758,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DisjoiningReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DisjoiningReader.cs index 627a77e5b..1a242070d 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DisjoiningReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DisjoiningReader.cs @@ -352,7 +352,7 @@ public override IDisjoining Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -373,7 +373,7 @@ public override IDisjoining Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -394,7 +394,7 @@ public override IDisjoining Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -415,7 +415,7 @@ public override IDisjoining Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -736,7 +736,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -757,7 +757,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -778,7 +778,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -799,7 +799,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DocumentationReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DocumentationReader.cs index acec17d37..bc6543019 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DocumentationReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/DocumentationReader.cs @@ -296,7 +296,7 @@ public override IDocumentation Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -317,7 +317,7 @@ public override IDocumentation Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -562,7 +562,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cu { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -583,7 +583,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cu { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ElementFilterMembershipReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ElementFilterMembershipReader.cs index bf65da2b9..c3128110f 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ElementFilterMembershipReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ElementFilterMembershipReader.cs @@ -323,7 +323,7 @@ public override IElementFilterMembership Read(XmlReader xmiReader, Uri currentLo { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -344,7 +344,7 @@ public override IElementFilterMembership Read(XmlReader xmiReader, Uri currentLo { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -365,7 +365,7 @@ public override IElementFilterMembership Read(XmlReader xmiReader, Uri currentLo { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -386,7 +386,7 @@ public override IElementFilterMembership Read(XmlReader xmiReader, Uri currentLo { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -667,7 +667,7 @@ public override async Task ReadAsync(XmlReader xmiRead { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -688,7 +688,7 @@ public override async Task ReadAsync(XmlReader xmiRead { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -709,7 +709,7 @@ public override async Task ReadAsync(XmlReader xmiRead { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -730,7 +730,7 @@ public override async Task ReadAsync(XmlReader xmiRead { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/EndFeatureMembershipReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/EndFeatureMembershipReader.cs index 7e009f59d..9df6c142f 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/EndFeatureMembershipReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/EndFeatureMembershipReader.cs @@ -323,7 +323,7 @@ public override IEndFeatureMembership Read(XmlReader xmiReader, Uri currentLocat { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -344,7 +344,7 @@ public override IEndFeatureMembership Read(XmlReader xmiReader, Uri currentLocat { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -365,7 +365,7 @@ public override IEndFeatureMembership Read(XmlReader xmiReader, Uri currentLocat { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -386,7 +386,7 @@ public override IEndFeatureMembership Read(XmlReader xmiReader, Uri currentLocat { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -667,7 +667,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -688,7 +688,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -709,7 +709,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -730,7 +730,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/EnumerationDefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/EnumerationDefinitionReader.cs index ec2a9e9f3..1abcad16c 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/EnumerationDefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/EnumerationDefinitionReader.cs @@ -349,7 +349,7 @@ public override IEnumerationDefinition Read(XmlReader xmiReader, Uri currentLoca { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -370,7 +370,7 @@ public override IEnumerationDefinition Read(XmlReader xmiReader, Uri currentLoca { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -643,7 +643,7 @@ public override async Task ReadAsync(XmlReader xmiReader { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -664,7 +664,7 @@ public override async Task ReadAsync(XmlReader xmiReader { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/EnumerationUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/EnumerationUsageReader.cs index 7003998d1..745511aed 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/EnumerationUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/EnumerationUsageReader.cs @@ -527,7 +527,7 @@ public override IEnumerationUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -548,7 +548,7 @@ public override IEnumerationUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -997,7 +997,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1018,7 +1018,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/EventOccurrenceUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/EventOccurrenceUsageReader.cs index d36abb819..9f2a55a8e 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/EventOccurrenceUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/EventOccurrenceUsageReader.cs @@ -560,7 +560,7 @@ public override IEventOccurrenceUsage Read(XmlReader xmiReader, Uri currentLocat { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -581,7 +581,7 @@ public override IEventOccurrenceUsage Read(XmlReader xmiReader, Uri currentLocat { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1074,7 +1074,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1095,7 +1095,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ExhibitStateUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ExhibitStateUsageReader.cs index f80b4476f..4ce391bed 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ExhibitStateUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ExhibitStateUsageReader.cs @@ -583,7 +583,7 @@ public override IExhibitStateUsage Read(XmlReader xmiReader, Uri currentLocation { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -604,7 +604,7 @@ public override IExhibitStateUsage Read(XmlReader xmiReader, Uri currentLocation { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1119,7 +1119,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1140,7 +1140,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ExpressionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ExpressionReader.cs index 2a59d5b4a..853b894f7 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ExpressionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ExpressionReader.cs @@ -505,7 +505,7 @@ public override IExpression Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -526,7 +526,7 @@ public override IExpression Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -975,7 +975,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -996,7 +996,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureChainExpressionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureChainExpressionReader.cs index b91560050..647fd40b2 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureChainExpressionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureChainExpressionReader.cs @@ -525,7 +525,7 @@ public override IFeatureChainExpression Read(XmlReader xmiReader, Uri currentLoc { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -546,7 +546,7 @@ public override IFeatureChainExpression Read(XmlReader xmiReader, Uri currentLoc { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1014,7 +1014,7 @@ public override async Task ReadAsync(XmlReader xmiReade { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1035,7 +1035,7 @@ public override async Task ReadAsync(XmlReader xmiReade { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureChainingReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureChainingReader.cs index 27cc81449..90e8e7f9d 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureChainingReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureChainingReader.cs @@ -342,7 +342,7 @@ public override IFeatureChaining Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -363,7 +363,7 @@ public override IFeatureChaining Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -384,7 +384,7 @@ public override IFeatureChaining Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -405,7 +405,7 @@ public override IFeatureChaining Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -695,7 +695,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -716,7 +716,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -737,7 +737,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -758,7 +758,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureInvertingReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureInvertingReader.cs index f9cbabcf7..0309ab431 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureInvertingReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureInvertingReader.cs @@ -373,7 +373,7 @@ public override IFeatureInverting Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -394,7 +394,7 @@ public override IFeatureInverting Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -415,7 +415,7 @@ public override IFeatureInverting Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -436,7 +436,7 @@ public override IFeatureInverting Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -757,7 +757,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -778,7 +778,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -799,7 +799,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -820,7 +820,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureMembershipReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureMembershipReader.cs index 7c981b0bc..6aae31a9d 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureMembershipReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureMembershipReader.cs @@ -323,7 +323,7 @@ public override IFeatureMembership Read(XmlReader xmiReader, Uri currentLocation { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -344,7 +344,7 @@ public override IFeatureMembership Read(XmlReader xmiReader, Uri currentLocation { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -365,7 +365,7 @@ public override IFeatureMembership Read(XmlReader xmiReader, Uri currentLocation { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -386,7 +386,7 @@ public override IFeatureMembership Read(XmlReader xmiReader, Uri currentLocation { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -667,7 +667,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -688,7 +688,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -709,7 +709,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -730,7 +730,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureReader.cs index 4007426e4..dcf987af4 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureReader.cs @@ -503,7 +503,7 @@ public override IFeature Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -524,7 +524,7 @@ public override IFeature Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -973,7 +973,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentL { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -994,7 +994,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentL { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureReferenceExpressionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureReferenceExpressionReader.cs index dbe7effc4..1ee370c4e 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureReferenceExpressionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureReferenceExpressionReader.cs @@ -506,7 +506,7 @@ public override IFeatureReferenceExpression Read(XmlReader xmiReader, Uri curren { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -527,7 +527,7 @@ public override IFeatureReferenceExpression Read(XmlReader xmiReader, Uri curren { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -976,7 +976,7 @@ public override async Task ReadAsync(XmlReader xmiR { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -997,7 +997,7 @@ public override async Task ReadAsync(XmlReader xmiR { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureTypingReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureTypingReader.cs index 80341aab1..c0ef37ab4 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureTypingReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureTypingReader.cs @@ -332,7 +332,7 @@ public override IFeatureTyping Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -353,7 +353,7 @@ public override IFeatureTyping Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -374,7 +374,7 @@ public override IFeatureTyping Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -395,7 +395,7 @@ public override IFeatureTyping Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -716,7 +716,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cu { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -737,7 +737,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cu { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -758,7 +758,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cu { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -779,7 +779,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cu { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureValueReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureValueReader.cs index a047917b3..42662135e 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureValueReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FeatureValueReader.cs @@ -368,7 +368,7 @@ public override IFeatureValue Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -389,7 +389,7 @@ public override IFeatureValue Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -410,7 +410,7 @@ public override IFeatureValue Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -431,7 +431,7 @@ public override IFeatureValue Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -756,7 +756,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cur { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -777,7 +777,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -798,7 +798,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cur { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -819,7 +819,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FlowDefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FlowDefinitionReader.cs index 2deb2322a..40a98ffd2 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FlowDefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FlowDefinitionReader.cs @@ -426,7 +426,7 @@ public override IFlowDefinition Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -447,7 +447,7 @@ public override IFlowDefinition Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -468,7 +468,7 @@ public override IFlowDefinition Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -489,7 +489,7 @@ public override IFlowDefinition Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -836,7 +836,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -857,7 +857,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -878,7 +878,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -899,7 +899,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FlowEndReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FlowEndReader.cs index a6aab286c..43b446e32 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FlowEndReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FlowEndReader.cs @@ -504,7 +504,7 @@ public override IFlowEnd Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -525,7 +525,7 @@ public override IFlowEnd Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -974,7 +974,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentL { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -995,7 +995,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentL { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FlowReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FlowReader.cs index 0298cbb59..58d1dfaa5 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FlowReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FlowReader.cs @@ -560,7 +560,7 @@ public override IFlow Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -581,7 +581,7 @@ public override IFlow Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -602,7 +602,7 @@ public override IFlow Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -623,7 +623,7 @@ public override IFlow Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1124,7 +1124,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentLoca { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -1145,7 +1145,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentLoca { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1166,7 +1166,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentLoca { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -1187,7 +1187,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentLoca { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FlowUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FlowUsageReader.cs index b228ce31a..c4e4b70a1 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FlowUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FlowUsageReader.cs @@ -616,7 +616,7 @@ public override IFlowUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -637,7 +637,7 @@ public override IFlowUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -658,7 +658,7 @@ public override IFlowUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -679,7 +679,7 @@ public override IFlowUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1224,7 +1224,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -1245,7 +1245,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1266,7 +1266,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -1287,7 +1287,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ForLoopActionUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ForLoopActionUsageReader.cs index af60e6f6c..0d30f3117 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ForLoopActionUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ForLoopActionUsageReader.cs @@ -562,7 +562,7 @@ public override IForLoopActionUsage Read(XmlReader xmiReader, Uri currentLocatio { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -583,7 +583,7 @@ public override IForLoopActionUsage Read(XmlReader xmiReader, Uri currentLocatio { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1076,7 +1076,7 @@ public override async Task ReadAsync(XmlReader xmiReader, U { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1097,7 +1097,7 @@ public override async Task ReadAsync(XmlReader xmiReader, U { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ForkNodeReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ForkNodeReader.cs index 4883f3a1b..8b74189cc 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ForkNodeReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ForkNodeReader.cs @@ -561,7 +561,7 @@ public override IForkNode Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -582,7 +582,7 @@ public override IForkNode Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1075,7 +1075,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri current { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1096,7 +1096,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri current { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FramedConcernMembershipReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FramedConcernMembershipReader.cs index acf56b30f..1241d8d31 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FramedConcernMembershipReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FramedConcernMembershipReader.cs @@ -348,7 +348,7 @@ public override IFramedConcernMembership Read(XmlReader xmiReader, Uri currentLo { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -369,7 +369,7 @@ public override IFramedConcernMembership Read(XmlReader xmiReader, Uri currentLo { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -390,7 +390,7 @@ public override IFramedConcernMembership Read(XmlReader xmiReader, Uri currentLo { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -411,7 +411,7 @@ public override IFramedConcernMembership Read(XmlReader xmiReader, Uri currentLo { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -714,7 +714,7 @@ public override async Task ReadAsync(XmlReader xmiRead { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -735,7 +735,7 @@ public override async Task ReadAsync(XmlReader xmiRead { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -756,7 +756,7 @@ public override async Task ReadAsync(XmlReader xmiRead { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -777,7 +777,7 @@ public override async Task ReadAsync(XmlReader xmiRead { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FunctionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FunctionReader.cs index 183cacbc6..46fbcf7d3 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FunctionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/FunctionReader.cs @@ -307,7 +307,7 @@ public override IFunction Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -328,7 +328,7 @@ public override IFunction Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -579,7 +579,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri current { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -600,7 +600,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri current { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/IfActionUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/IfActionUsageReader.cs index cde81ca2f..5a2e6ecf3 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/IfActionUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/IfActionUsageReader.cs @@ -562,7 +562,7 @@ public override IIfActionUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -583,7 +583,7 @@ public override IIfActionUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1076,7 +1076,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cu { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1097,7 +1097,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cu { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/IncludeUseCaseUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/IncludeUseCaseUsageReader.cs index 000e5edbf..584468bd6 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/IncludeUseCaseUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/IncludeUseCaseUsageReader.cs @@ -562,7 +562,7 @@ public override IIncludeUseCaseUsage Read(XmlReader xmiReader, Uri currentLocati { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -583,7 +583,7 @@ public override IIncludeUseCaseUsage Read(XmlReader xmiReader, Uri currentLocati { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1076,7 +1076,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1097,7 +1097,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/IndexExpressionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/IndexExpressionReader.cs index 335b486f7..b5a68f3bd 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/IndexExpressionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/IndexExpressionReader.cs @@ -525,7 +525,7 @@ public override IIndexExpression Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -546,7 +546,7 @@ public override IIndexExpression Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1014,7 +1014,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1035,7 +1035,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/InteractionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/InteractionReader.cs index a93fca2db..7e3040d98 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/InteractionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/InteractionReader.cs @@ -360,7 +360,7 @@ public override IInteraction Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -381,7 +381,7 @@ public override IInteraction Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -402,7 +402,7 @@ public override IInteraction Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -423,7 +423,7 @@ public override IInteraction Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -726,7 +726,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curr { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -747,7 +747,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curr { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -768,7 +768,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curr { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -789,7 +789,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curr { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/InterfaceDefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/InterfaceDefinitionReader.cs index 4cb379fc7..05f047fcf 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/InterfaceDefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/InterfaceDefinitionReader.cs @@ -424,7 +424,7 @@ public override IInterfaceDefinition Read(XmlReader xmiReader, Uri currentLocati { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -445,7 +445,7 @@ public override IInterfaceDefinition Read(XmlReader xmiReader, Uri currentLocati { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -466,7 +466,7 @@ public override IInterfaceDefinition Read(XmlReader xmiReader, Uri currentLocati { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -487,7 +487,7 @@ public override IInterfaceDefinition Read(XmlReader xmiReader, Uri currentLocati { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -834,7 +834,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -855,7 +855,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -876,7 +876,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -897,7 +897,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/InterfaceUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/InterfaceUsageReader.cs index 1e33c3969..f01d8e912 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/InterfaceUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/InterfaceUsageReader.cs @@ -615,7 +615,7 @@ public override IInterfaceUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -636,7 +636,7 @@ public override IInterfaceUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -657,7 +657,7 @@ public override IInterfaceUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -678,7 +678,7 @@ public override IInterfaceUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1223,7 +1223,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -1244,7 +1244,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1265,7 +1265,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -1286,7 +1286,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/IntersectingReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/IntersectingReader.cs index f4b0dc78f..553fed90d 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/IntersectingReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/IntersectingReader.cs @@ -342,7 +342,7 @@ public override IIntersecting Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -363,7 +363,7 @@ public override IIntersecting Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -384,7 +384,7 @@ public override IIntersecting Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -405,7 +405,7 @@ public override IIntersecting Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -695,7 +695,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cur { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -716,7 +716,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -737,7 +737,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cur { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -758,7 +758,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/InvariantReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/InvariantReader.cs index 52879d26d..8419fff0e 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/InvariantReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/InvariantReader.cs @@ -527,7 +527,7 @@ public override IInvariant Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -548,7 +548,7 @@ public override IInvariant Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1019,7 +1019,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1040,7 +1040,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/InvocationExpressionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/InvocationExpressionReader.cs index 3c368b7a1..c75147ba5 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/InvocationExpressionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/InvocationExpressionReader.cs @@ -506,7 +506,7 @@ public override IInvocationExpression Read(XmlReader xmiReader, Uri currentLocat { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -527,7 +527,7 @@ public override IInvocationExpression Read(XmlReader xmiReader, Uri currentLocat { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -976,7 +976,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -997,7 +997,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ItemDefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ItemDefinitionReader.cs index ef1e57389..371551f65 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ItemDefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ItemDefinitionReader.cs @@ -372,7 +372,7 @@ public override IItemDefinition Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -393,7 +393,7 @@ public override IItemDefinition Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -688,7 +688,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -709,7 +709,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ItemUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ItemUsageReader.cs index 65d7fb09f..a80dfd58b 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ItemUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ItemUsageReader.cs @@ -561,7 +561,7 @@ public override IItemUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -582,7 +582,7 @@ public override IItemUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1075,7 +1075,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1096,7 +1096,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/JoinNodeReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/JoinNodeReader.cs index 5d45054d3..7dfcafad7 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/JoinNodeReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/JoinNodeReader.cs @@ -561,7 +561,7 @@ public override IJoinNode Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -582,7 +582,7 @@ public override IJoinNode Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1075,7 +1075,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri current { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1096,7 +1096,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri current { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LibraryPackageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LibraryPackageReader.cs index 81de0cdd3..e5412779c 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LibraryPackageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LibraryPackageReader.cs @@ -282,7 +282,7 @@ public override ILibraryPackage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -303,7 +303,7 @@ public override ILibraryPackage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -532,7 +532,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -553,7 +553,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LiteralBooleanReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LiteralBooleanReader.cs index 3aa0a1776..a7a13c142 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LiteralBooleanReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LiteralBooleanReader.cs @@ -516,7 +516,7 @@ public override ILiteralBoolean Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -537,7 +537,7 @@ public override ILiteralBoolean Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1008,7 +1008,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1029,7 +1029,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LiteralExpressionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LiteralExpressionReader.cs index c4e5a057b..5c9a513ce 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LiteralExpressionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LiteralExpressionReader.cs @@ -506,7 +506,7 @@ public override ILiteralExpression Read(XmlReader xmiReader, Uri currentLocation { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -527,7 +527,7 @@ public override ILiteralExpression Read(XmlReader xmiReader, Uri currentLocation { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -976,7 +976,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -997,7 +997,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LiteralInfinityReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LiteralInfinityReader.cs index 288b27c78..b7064d4c4 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LiteralInfinityReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LiteralInfinityReader.cs @@ -506,7 +506,7 @@ public override ILiteralInfinity Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -527,7 +527,7 @@ public override ILiteralInfinity Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -976,7 +976,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -997,7 +997,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LiteralIntegerReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LiteralIntegerReader.cs index 5306317ab..dfaf84eb0 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LiteralIntegerReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LiteralIntegerReader.cs @@ -516,7 +516,7 @@ public override ILiteralInteger Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -537,7 +537,7 @@ public override ILiteralInteger Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1008,7 +1008,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1029,7 +1029,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LiteralRationalReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LiteralRationalReader.cs index 80e4922c9..23c2276b3 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LiteralRationalReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LiteralRationalReader.cs @@ -516,7 +516,7 @@ public override ILiteralRational Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -537,7 +537,7 @@ public override ILiteralRational Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1008,7 +1008,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1029,7 +1029,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LiteralStringReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LiteralStringReader.cs index f64f0e11a..9a5348467 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LiteralStringReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/LiteralStringReader.cs @@ -513,7 +513,7 @@ public override ILiteralString Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -534,7 +534,7 @@ public override ILiteralString Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1002,7 +1002,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cu { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1023,7 +1023,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cu { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MembershipExposeReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MembershipExposeReader.cs index fa3875717..190e51c5b 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MembershipExposeReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MembershipExposeReader.cs @@ -397,7 +397,7 @@ public override IMembershipExpose Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -418,7 +418,7 @@ public override IMembershipExpose Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -439,7 +439,7 @@ public override IMembershipExpose Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -460,7 +460,7 @@ public override IMembershipExpose Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -816,7 +816,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -837,7 +837,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -858,7 +858,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -879,7 +879,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MembershipImportReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MembershipImportReader.cs index 66c947705..aa620872c 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MembershipImportReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MembershipImportReader.cs @@ -396,7 +396,7 @@ public override IMembershipImport Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -417,7 +417,7 @@ public override IMembershipImport Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -438,7 +438,7 @@ public override IMembershipImport Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -459,7 +459,7 @@ public override IMembershipImport Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -815,7 +815,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -836,7 +836,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -857,7 +857,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -878,7 +878,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MembershipReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MembershipReader.cs index f9ae31f60..7bfacadba 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MembershipReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MembershipReader.cs @@ -390,7 +390,7 @@ public override IMembership Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -411,7 +411,7 @@ public override IMembership Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -432,7 +432,7 @@ public override IMembership Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -453,7 +453,7 @@ public override IMembership Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -803,7 +803,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -824,7 +824,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -845,7 +845,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -866,7 +866,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MergeNodeReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MergeNodeReader.cs index 57d835849..a6861a7e5 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MergeNodeReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MergeNodeReader.cs @@ -561,7 +561,7 @@ public override IMergeNode Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -582,7 +582,7 @@ public override IMergeNode Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1075,7 +1075,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1096,7 +1096,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MetaclassReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MetaclassReader.cs index 4da256b98..de6ddfe7f 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MetaclassReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MetaclassReader.cs @@ -307,7 +307,7 @@ public override IMetaclass Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -328,7 +328,7 @@ public override IMetaclass Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -579,7 +579,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -600,7 +600,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MetadataAccessExpressionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MetadataAccessExpressionReader.cs index 27ee85735..45f863ba8 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MetadataAccessExpressionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MetadataAccessExpressionReader.cs @@ -506,7 +506,7 @@ public override IMetadataAccessExpression Read(XmlReader xmiReader, Uri currentL { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -527,7 +527,7 @@ public override IMetadataAccessExpression Read(XmlReader xmiReader, Uri currentL { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -976,7 +976,7 @@ public override async Task ReadAsync(XmlReader xmiRea { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -997,7 +997,7 @@ public override async Task ReadAsync(XmlReader xmiRea { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MetadataDefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MetadataDefinitionReader.cs index 34131facc..56f92a2f3 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MetadataDefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MetadataDefinitionReader.cs @@ -372,7 +372,7 @@ public override IMetadataDefinition Read(XmlReader xmiReader, Uri currentLocatio { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -393,7 +393,7 @@ public override IMetadataDefinition Read(XmlReader xmiReader, Uri currentLocatio { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -688,7 +688,7 @@ public override async Task ReadAsync(XmlReader xmiReader, U { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -709,7 +709,7 @@ public override async Task ReadAsync(XmlReader xmiReader, U { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MetadataFeatureReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MetadataFeatureReader.cs index 8d78f516d..7f870e8dd 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MetadataFeatureReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MetadataFeatureReader.cs @@ -504,7 +504,7 @@ public override IMetadataFeature Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -525,7 +525,7 @@ public override IMetadataFeature Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -974,7 +974,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -995,7 +995,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MetadataUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MetadataUsageReader.cs index f4c5c7628..26282f0b3 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MetadataUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MetadataUsageReader.cs @@ -562,7 +562,7 @@ public override IMetadataUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -583,7 +583,7 @@ public override IMetadataUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1076,7 +1076,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cu { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1097,7 +1097,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cu { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MultiplicityRangeReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MultiplicityRangeReader.cs index 404c4bce0..85f674c48 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MultiplicityRangeReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MultiplicityRangeReader.cs @@ -505,7 +505,7 @@ public override IMultiplicityRange Read(XmlReader xmiReader, Uri currentLocation { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -526,7 +526,7 @@ public override IMultiplicityRange Read(XmlReader xmiReader, Uri currentLocation { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -975,7 +975,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -996,7 +996,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MultiplicityReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MultiplicityReader.cs index 7e58752a7..935058c00 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MultiplicityReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/MultiplicityReader.cs @@ -503,7 +503,7 @@ public override IMultiplicity Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -524,7 +524,7 @@ public override IMultiplicity Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -973,7 +973,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -994,7 +994,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/NamespaceExposeReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/NamespaceExposeReader.cs index 851ced41f..3c9bec70b 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/NamespaceExposeReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/NamespaceExposeReader.cs @@ -397,7 +397,7 @@ public override INamespaceExpose Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -418,7 +418,7 @@ public override INamespaceExpose Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -439,7 +439,7 @@ public override INamespaceExpose Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -460,7 +460,7 @@ public override INamespaceExpose Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -816,7 +816,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -837,7 +837,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -858,7 +858,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -879,7 +879,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/NamespaceImportReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/NamespaceImportReader.cs index fb8fb0452..351693382 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/NamespaceImportReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/NamespaceImportReader.cs @@ -396,7 +396,7 @@ public override INamespaceImport Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -417,7 +417,7 @@ public override INamespaceImport Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -438,7 +438,7 @@ public override INamespaceImport Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -459,7 +459,7 @@ public override INamespaceImport Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -815,7 +815,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -836,7 +836,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -857,7 +857,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -878,7 +878,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/NamespaceReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/NamespaceReader.cs index cbe6446fb..c3f99b707 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/NamespaceReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/NamespaceReader.cs @@ -258,7 +258,7 @@ public override INamespace Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -279,7 +279,7 @@ public override INamespace Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -486,7 +486,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -507,7 +507,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/NullExpressionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/NullExpressionReader.cs index 90389c3da..4e9cf84f6 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/NullExpressionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/NullExpressionReader.cs @@ -506,7 +506,7 @@ public override INullExpression Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -527,7 +527,7 @@ public override INullExpression Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -976,7 +976,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -997,7 +997,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ObjectiveMembershipReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ObjectiveMembershipReader.cs index 53d6866a4..96d216cf0 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ObjectiveMembershipReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ObjectiveMembershipReader.cs @@ -325,7 +325,7 @@ public override IObjectiveMembership Read(XmlReader xmiReader, Uri currentLocati { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -346,7 +346,7 @@ public override IObjectiveMembership Read(XmlReader xmiReader, Uri currentLocati { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -367,7 +367,7 @@ public override IObjectiveMembership Read(XmlReader xmiReader, Uri currentLocati { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -388,7 +388,7 @@ public override IObjectiveMembership Read(XmlReader xmiReader, Uri currentLocati { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -669,7 +669,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -690,7 +690,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -711,7 +711,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -732,7 +732,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/OccurrenceDefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/OccurrenceDefinitionReader.cs index 1ee7b1c9d..003c2b789 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/OccurrenceDefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/OccurrenceDefinitionReader.cs @@ -372,7 +372,7 @@ public override IOccurrenceDefinition Read(XmlReader xmiReader, Uri currentLocat { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -393,7 +393,7 @@ public override IOccurrenceDefinition Read(XmlReader xmiReader, Uri currentLocat { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -688,7 +688,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -709,7 +709,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/OccurrenceUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/OccurrenceUsageReader.cs index 0a997fddd..0bfff368b 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/OccurrenceUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/OccurrenceUsageReader.cs @@ -560,7 +560,7 @@ public override IOccurrenceUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -581,7 +581,7 @@ public override IOccurrenceUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1074,7 +1074,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1095,7 +1095,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/OperatorExpressionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/OperatorExpressionReader.cs index ef6aad0a1..3220900c9 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/OperatorExpressionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/OperatorExpressionReader.cs @@ -525,7 +525,7 @@ public override IOperatorExpression Read(XmlReader xmiReader, Uri currentLocatio { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -546,7 +546,7 @@ public override IOperatorExpression Read(XmlReader xmiReader, Uri currentLocatio { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1014,7 +1014,7 @@ public override async Task ReadAsync(XmlReader xmiReader, U { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1035,7 +1035,7 @@ public override async Task ReadAsync(XmlReader xmiReader, U { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/OwningMembershipReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/OwningMembershipReader.cs index 2588dd996..f0bc91898 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/OwningMembershipReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/OwningMembershipReader.cs @@ -321,7 +321,7 @@ public override IOwningMembership Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -342,7 +342,7 @@ public override IOwningMembership Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -363,7 +363,7 @@ public override IOwningMembership Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -384,7 +384,7 @@ public override IOwningMembership Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -665,7 +665,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -686,7 +686,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -707,7 +707,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -728,7 +728,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PackageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PackageReader.cs index 46a0ea797..0bfa3e5dc 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PackageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PackageReader.cs @@ -260,7 +260,7 @@ public override IPackage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -281,7 +281,7 @@ public override IPackage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -488,7 +488,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentL { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -509,7 +509,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentL { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ParameterMembershipReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ParameterMembershipReader.cs index 3f7bb8586..272a25a82 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ParameterMembershipReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ParameterMembershipReader.cs @@ -324,7 +324,7 @@ public override IParameterMembership Read(XmlReader xmiReader, Uri currentLocati { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -345,7 +345,7 @@ public override IParameterMembership Read(XmlReader xmiReader, Uri currentLocati { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -366,7 +366,7 @@ public override IParameterMembership Read(XmlReader xmiReader, Uri currentLocati { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -387,7 +387,7 @@ public override IParameterMembership Read(XmlReader xmiReader, Uri currentLocati { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -668,7 +668,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -689,7 +689,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -710,7 +710,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -731,7 +731,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PartDefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PartDefinitionReader.cs index 21f06c508..8fd555ef6 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PartDefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PartDefinitionReader.cs @@ -371,7 +371,7 @@ public override IPartDefinition Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -392,7 +392,7 @@ public override IPartDefinition Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -687,7 +687,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -708,7 +708,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PartUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PartUsageReader.cs index 90c35e9a7..cb3b8c47a 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PartUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PartUsageReader.cs @@ -561,7 +561,7 @@ public override IPartUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -582,7 +582,7 @@ public override IPartUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1075,7 +1075,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1096,7 +1096,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PayloadFeatureReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PayloadFeatureReader.cs index bba68ce5a..bcecdd87f 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PayloadFeatureReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PayloadFeatureReader.cs @@ -504,7 +504,7 @@ public override IPayloadFeature Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -525,7 +525,7 @@ public override IPayloadFeature Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -974,7 +974,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -995,7 +995,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PerformActionUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PerformActionUsageReader.cs index 61c434905..a90f7e585 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PerformActionUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PerformActionUsageReader.cs @@ -561,7 +561,7 @@ public override IPerformActionUsage Read(XmlReader xmiReader, Uri currentLocatio { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -582,7 +582,7 @@ public override IPerformActionUsage Read(XmlReader xmiReader, Uri currentLocatio { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1075,7 +1075,7 @@ public override async Task ReadAsync(XmlReader xmiReader, U { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1096,7 +1096,7 @@ public override async Task ReadAsync(XmlReader xmiReader, U { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PortConjugationReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PortConjugationReader.cs index fca41ca4f..da6cf3bbb 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PortConjugationReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PortConjugationReader.cs @@ -374,7 +374,7 @@ public override IPortConjugation Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -395,7 +395,7 @@ public override IPortConjugation Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -416,7 +416,7 @@ public override IPortConjugation Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -437,7 +437,7 @@ public override IPortConjugation Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -758,7 +758,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -779,7 +779,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -800,7 +800,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -821,7 +821,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PortDefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PortDefinitionReader.cs index 1507e729b..139542364 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PortDefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PortDefinitionReader.cs @@ -372,7 +372,7 @@ public override IPortDefinition Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -393,7 +393,7 @@ public override IPortDefinition Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -688,7 +688,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -709,7 +709,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PortUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PortUsageReader.cs index 6b6cc559a..2b06f7d45 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PortUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PortUsageReader.cs @@ -560,7 +560,7 @@ public override IPortUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -581,7 +581,7 @@ public override IPortUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1074,7 +1074,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1095,7 +1095,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PredicateReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PredicateReader.cs index 9a35d59ad..2c792dda1 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PredicateReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/PredicateReader.cs @@ -307,7 +307,7 @@ public override IPredicate Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -328,7 +328,7 @@ public override IPredicate Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -579,7 +579,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -600,7 +600,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RedefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RedefinitionReader.cs index 70584880e..c4214289e 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RedefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RedefinitionReader.cs @@ -332,7 +332,7 @@ public override IRedefinition Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -353,7 +353,7 @@ public override IRedefinition Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -374,7 +374,7 @@ public override IRedefinition Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -395,7 +395,7 @@ public override IRedefinition Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -716,7 +716,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cur { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -737,7 +737,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -758,7 +758,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cur { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -779,7 +779,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ReferenceSubsettingReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ReferenceSubsettingReader.cs index 16f941d2d..76d4b283b 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ReferenceSubsettingReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ReferenceSubsettingReader.cs @@ -322,7 +322,7 @@ public override IReferenceSubsetting Read(XmlReader xmiReader, Uri currentLocati { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -343,7 +343,7 @@ public override IReferenceSubsetting Read(XmlReader xmiReader, Uri currentLocati { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -364,7 +364,7 @@ public override IReferenceSubsetting Read(XmlReader xmiReader, Uri currentLocati { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -385,7 +385,7 @@ public override IReferenceSubsetting Read(XmlReader xmiReader, Uri currentLocati { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -675,7 +675,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -696,7 +696,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -717,7 +717,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -738,7 +738,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ReferenceUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ReferenceUsageReader.cs index 04833af33..baa9bd486 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ReferenceUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ReferenceUsageReader.cs @@ -526,7 +526,7 @@ public override IReferenceUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -547,7 +547,7 @@ public override IReferenceUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -996,7 +996,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1017,7 +1017,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RenderingDefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RenderingDefinitionReader.cs index fa5352a9a..82678661d 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RenderingDefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RenderingDefinitionReader.cs @@ -371,7 +371,7 @@ public override IRenderingDefinition Read(XmlReader xmiReader, Uri currentLocati { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -392,7 +392,7 @@ public override IRenderingDefinition Read(XmlReader xmiReader, Uri currentLocati { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -687,7 +687,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -708,7 +708,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RenderingUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RenderingUsageReader.cs index b7807adec..ba26737ee 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RenderingUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RenderingUsageReader.cs @@ -561,7 +561,7 @@ public override IRenderingUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -582,7 +582,7 @@ public override IRenderingUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1075,7 +1075,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1096,7 +1096,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RequirementConstraintMembershipReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RequirementConstraintMembershipReader.cs index dc5355d95..4e2faca30 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RequirementConstraintMembershipReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RequirementConstraintMembershipReader.cs @@ -348,7 +348,7 @@ public override IRequirementConstraintMembership Read(XmlReader xmiReader, Uri c { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -369,7 +369,7 @@ public override IRequirementConstraintMembership Read(XmlReader xmiReader, Uri c { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -390,7 +390,7 @@ public override IRequirementConstraintMembership Read(XmlReader xmiReader, Uri c { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -411,7 +411,7 @@ public override IRequirementConstraintMembership Read(XmlReader xmiReader, Uri c { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -714,7 +714,7 @@ public override async Task ReadAsync(XmlReader { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -735,7 +735,7 @@ public override async Task ReadAsync(XmlReader { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -756,7 +756,7 @@ public override async Task ReadAsync(XmlReader { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -777,7 +777,7 @@ public override async Task ReadAsync(XmlReader { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RequirementDefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RequirementDefinitionReader.cs index 570f6025e..50062fe29 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RequirementDefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RequirementDefinitionReader.cs @@ -361,7 +361,7 @@ public override IRequirementDefinition Read(XmlReader xmiReader, Uri currentLoca { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -382,7 +382,7 @@ public override IRequirementDefinition Read(XmlReader xmiReader, Uri currentLoca { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -677,7 +677,7 @@ public override async Task ReadAsync(XmlReader xmiReader { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -698,7 +698,7 @@ public override async Task ReadAsync(XmlReader xmiReader { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RequirementUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RequirementUsageReader.cs index 05825e473..1d7fbe4d0 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RequirementUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RequirementUsageReader.cs @@ -550,7 +550,7 @@ public override IRequirementUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -571,7 +571,7 @@ public override IRequirementUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1064,7 +1064,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1085,7 +1085,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RequirementVerificationMembershipReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RequirementVerificationMembershipReader.cs index d2a1bb24a..508ec542c 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RequirementVerificationMembershipReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/RequirementVerificationMembershipReader.cs @@ -349,7 +349,7 @@ public override IRequirementVerificationMembership Read(XmlReader xmiReader, Uri { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -370,7 +370,7 @@ public override IRequirementVerificationMembership Read(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -391,7 +391,7 @@ public override IRequirementVerificationMembership Read(XmlReader xmiReader, Uri { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -412,7 +412,7 @@ public override IRequirementVerificationMembership Read(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -715,7 +715,7 @@ public override async Task ReadAsync(XmlRead { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -736,7 +736,7 @@ public override async Task ReadAsync(XmlRead { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -757,7 +757,7 @@ public override async Task ReadAsync(XmlRead { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -778,7 +778,7 @@ public override async Task ReadAsync(XmlRead { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ResultExpressionMembershipReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ResultExpressionMembershipReader.cs index 5895ce220..58df252ca 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ResultExpressionMembershipReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ResultExpressionMembershipReader.cs @@ -324,7 +324,7 @@ public override IResultExpressionMembership Read(XmlReader xmiReader, Uri curren { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -345,7 +345,7 @@ public override IResultExpressionMembership Read(XmlReader xmiReader, Uri curren { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -366,7 +366,7 @@ public override IResultExpressionMembership Read(XmlReader xmiReader, Uri curren { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -387,7 +387,7 @@ public override IResultExpressionMembership Read(XmlReader xmiReader, Uri curren { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -668,7 +668,7 @@ public override async Task ReadAsync(XmlReader xmiR { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -689,7 +689,7 @@ public override async Task ReadAsync(XmlReader xmiR { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -710,7 +710,7 @@ public override async Task ReadAsync(XmlReader xmiR { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -731,7 +731,7 @@ public override async Task ReadAsync(XmlReader xmiR { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ReturnParameterMembershipReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ReturnParameterMembershipReader.cs index b0a6e44f3..fef0ea8b6 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ReturnParameterMembershipReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ReturnParameterMembershipReader.cs @@ -325,7 +325,7 @@ public override IReturnParameterMembership Read(XmlReader xmiReader, Uri current { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -346,7 +346,7 @@ public override IReturnParameterMembership Read(XmlReader xmiReader, Uri current { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -367,7 +367,7 @@ public override IReturnParameterMembership Read(XmlReader xmiReader, Uri current { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -388,7 +388,7 @@ public override IReturnParameterMembership Read(XmlReader xmiReader, Uri current { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -669,7 +669,7 @@ public override async Task ReadAsync(XmlReader xmiRe { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -690,7 +690,7 @@ public override async Task ReadAsync(XmlReader xmiRe { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -711,7 +711,7 @@ public override async Task ReadAsync(XmlReader xmiRe { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -732,7 +732,7 @@ public override async Task ReadAsync(XmlReader xmiRe { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SatisfyRequirementUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SatisfyRequirementUsageReader.cs index 17388d508..ccfc054bf 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SatisfyRequirementUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SatisfyRequirementUsageReader.cs @@ -572,7 +572,7 @@ public override ISatisfyRequirementUsage Read(XmlReader xmiReader, Uri currentLo { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -593,7 +593,7 @@ public override ISatisfyRequirementUsage Read(XmlReader xmiReader, Uri currentLo { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1108,7 +1108,7 @@ public override async Task ReadAsync(XmlReader xmiRead { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1129,7 +1129,7 @@ public override async Task ReadAsync(XmlReader xmiRead { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SelectExpressionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SelectExpressionReader.cs index 004656eb3..b8859ceea 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SelectExpressionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SelectExpressionReader.cs @@ -525,7 +525,7 @@ public override ISelectExpression Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -546,7 +546,7 @@ public override ISelectExpression Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1014,7 +1014,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1035,7 +1035,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SendActionUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SendActionUsageReader.cs index 9602dedad..2abb0b9a2 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SendActionUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SendActionUsageReader.cs @@ -562,7 +562,7 @@ public override ISendActionUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -583,7 +583,7 @@ public override ISendActionUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1076,7 +1076,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1097,7 +1097,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SpecializationReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SpecializationReader.cs index dd5263e41..174b5f84b 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SpecializationReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SpecializationReader.cs @@ -352,7 +352,7 @@ public override ISpecialization Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -373,7 +373,7 @@ public override ISpecialization Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -394,7 +394,7 @@ public override ISpecialization Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -415,7 +415,7 @@ public override ISpecialization Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -736,7 +736,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -757,7 +757,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -778,7 +778,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -799,7 +799,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/StakeholderMembershipReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/StakeholderMembershipReader.cs index c850f45f1..4d02154db 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/StakeholderMembershipReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/StakeholderMembershipReader.cs @@ -326,7 +326,7 @@ public override IStakeholderMembership Read(XmlReader xmiReader, Uri currentLoca { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -347,7 +347,7 @@ public override IStakeholderMembership Read(XmlReader xmiReader, Uri currentLoca { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -368,7 +368,7 @@ public override IStakeholderMembership Read(XmlReader xmiReader, Uri currentLoca { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -389,7 +389,7 @@ public override IStakeholderMembership Read(XmlReader xmiReader, Uri currentLoca { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -670,7 +670,7 @@ public override async Task ReadAsync(XmlReader xmiReader { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -691,7 +691,7 @@ public override async Task ReadAsync(XmlReader xmiReader { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -712,7 +712,7 @@ public override async Task ReadAsync(XmlReader xmiReader { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -733,7 +733,7 @@ public override async Task ReadAsync(XmlReader xmiReader { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/StateDefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/StateDefinitionReader.cs index 45c37c66c..a225dd9a3 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/StateDefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/StateDefinitionReader.cs @@ -394,7 +394,7 @@ public override IStateDefinition Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -415,7 +415,7 @@ public override IStateDefinition Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -732,7 +732,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -753,7 +753,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/StateSubactionMembershipReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/StateSubactionMembershipReader.cs index 5d257da5e..32412b6ce 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/StateSubactionMembershipReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/StateSubactionMembershipReader.cs @@ -348,7 +348,7 @@ public override IStateSubactionMembership Read(XmlReader xmiReader, Uri currentL { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -369,7 +369,7 @@ public override IStateSubactionMembership Read(XmlReader xmiReader, Uri currentL { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -390,7 +390,7 @@ public override IStateSubactionMembership Read(XmlReader xmiReader, Uri currentL { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -411,7 +411,7 @@ public override IStateSubactionMembership Read(XmlReader xmiReader, Uri currentL { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -714,7 +714,7 @@ public override async Task ReadAsync(XmlReader xmiRea { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -735,7 +735,7 @@ public override async Task ReadAsync(XmlReader xmiRea { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -756,7 +756,7 @@ public override async Task ReadAsync(XmlReader xmiRea { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -777,7 +777,7 @@ public override async Task ReadAsync(XmlReader xmiRea { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/StateUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/StateUsageReader.cs index d632689d2..97c2fdddf 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/StateUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/StateUsageReader.cs @@ -583,7 +583,7 @@ public override IStateUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -604,7 +604,7 @@ public override IStateUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1119,7 +1119,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1140,7 +1140,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/StepReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/StepReader.cs index e7f520920..dc74613c9 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/StepReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/StepReader.cs @@ -504,7 +504,7 @@ public override IStep Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -525,7 +525,7 @@ public override IStep Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -974,7 +974,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentLoca { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -995,7 +995,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentLoca { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/StructureReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/StructureReader.cs index ca3ef9d05..fd2bf85e6 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/StructureReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/StructureReader.cs @@ -307,7 +307,7 @@ public override IStructure Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -328,7 +328,7 @@ public override IStructure Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -579,7 +579,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -600,7 +600,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SubclassificationReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SubclassificationReader.cs index 1479e1b24..5b4418ba0 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SubclassificationReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SubclassificationReader.cs @@ -332,7 +332,7 @@ public override ISubclassification Read(XmlReader xmiReader, Uri currentLocation { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -353,7 +353,7 @@ public override ISubclassification Read(XmlReader xmiReader, Uri currentLocation { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -374,7 +374,7 @@ public override ISubclassification Read(XmlReader xmiReader, Uri currentLocation { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -395,7 +395,7 @@ public override ISubclassification Read(XmlReader xmiReader, Uri currentLocation { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -716,7 +716,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -737,7 +737,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -758,7 +758,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -779,7 +779,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SubjectMembershipReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SubjectMembershipReader.cs index 75c6ca2a1..18008a8af 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SubjectMembershipReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SubjectMembershipReader.cs @@ -326,7 +326,7 @@ public override ISubjectMembership Read(XmlReader xmiReader, Uri currentLocation { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -347,7 +347,7 @@ public override ISubjectMembership Read(XmlReader xmiReader, Uri currentLocation { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -368,7 +368,7 @@ public override ISubjectMembership Read(XmlReader xmiReader, Uri currentLocation { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -389,7 +389,7 @@ public override ISubjectMembership Read(XmlReader xmiReader, Uri currentLocation { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -670,7 +670,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -691,7 +691,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -712,7 +712,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -733,7 +733,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SubsettingReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SubsettingReader.cs index 20edb3565..e792edb14 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SubsettingReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SubsettingReader.cs @@ -332,7 +332,7 @@ public override ISubsetting Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -353,7 +353,7 @@ public override ISubsetting Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -374,7 +374,7 @@ public override ISubsetting Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -395,7 +395,7 @@ public override ISubsetting Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -716,7 +716,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -737,7 +737,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -758,7 +758,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -779,7 +779,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SuccessionAsUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SuccessionAsUsageReader.cs index 62fe11319..5cba6cda6 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SuccessionAsUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SuccessionAsUsageReader.cs @@ -580,7 +580,7 @@ public override ISuccessionAsUsage Read(XmlReader xmiReader, Uri currentLocation { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -601,7 +601,7 @@ public override ISuccessionAsUsage Read(XmlReader xmiReader, Uri currentLocation { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -622,7 +622,7 @@ public override ISuccessionAsUsage Read(XmlReader xmiReader, Uri currentLocation { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -643,7 +643,7 @@ public override ISuccessionAsUsage Read(XmlReader xmiReader, Uri currentLocation { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1144,7 +1144,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -1165,7 +1165,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1186,7 +1186,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -1207,7 +1207,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SuccessionFlowReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SuccessionFlowReader.cs index 9bfed1637..2bec6f31e 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SuccessionFlowReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SuccessionFlowReader.cs @@ -560,7 +560,7 @@ public override ISuccessionFlow Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -581,7 +581,7 @@ public override ISuccessionFlow Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -602,7 +602,7 @@ public override ISuccessionFlow Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -623,7 +623,7 @@ public override ISuccessionFlow Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1124,7 +1124,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -1145,7 +1145,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1166,7 +1166,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -1187,7 +1187,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SuccessionFlowUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SuccessionFlowUsageReader.cs index a53ffb9e6..e6afa8660 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SuccessionFlowUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SuccessionFlowUsageReader.cs @@ -616,7 +616,7 @@ public override ISuccessionFlowUsage Read(XmlReader xmiReader, Uri currentLocati { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -637,7 +637,7 @@ public override ISuccessionFlowUsage Read(XmlReader xmiReader, Uri currentLocati { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -658,7 +658,7 @@ public override ISuccessionFlowUsage Read(XmlReader xmiReader, Uri currentLocati { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -679,7 +679,7 @@ public override ISuccessionFlowUsage Read(XmlReader xmiReader, Uri currentLocati { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1224,7 +1224,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -1245,7 +1245,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1266,7 +1266,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -1287,7 +1287,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SuccessionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SuccessionReader.cs index 07c7843b4..1e55cf9e8 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SuccessionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/SuccessionReader.cs @@ -557,7 +557,7 @@ public override ISuccession Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -578,7 +578,7 @@ public override ISuccession Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -599,7 +599,7 @@ public override ISuccession Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -620,7 +620,7 @@ public override ISuccession Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1121,7 +1121,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -1142,7 +1142,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1163,7 +1163,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -1184,7 +1184,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curre { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TerminateActionUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TerminateActionUsageReader.cs index 37cd33d07..bcd5f20d6 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TerminateActionUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TerminateActionUsageReader.cs @@ -562,7 +562,7 @@ public override ITerminateActionUsage Read(XmlReader xmiReader, Uri currentLocat { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -583,7 +583,7 @@ public override ITerminateActionUsage Read(XmlReader xmiReader, Uri currentLocat { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1076,7 +1076,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1097,7 +1097,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TextualRepresentationReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TextualRepresentationReader.cs index 8cb858e1b..6916876ad 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TextualRepresentationReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TextualRepresentationReader.cs @@ -296,7 +296,7 @@ public override ITextualRepresentation Read(XmlReader xmiReader, Uri currentLoca { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -317,7 +317,7 @@ public override ITextualRepresentation Read(XmlReader xmiReader, Uri currentLoca { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -562,7 +562,7 @@ public override async Task ReadAsync(XmlReader xmiReader { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -583,7 +583,7 @@ public override async Task ReadAsync(XmlReader xmiReader { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TransitionFeatureMembershipReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TransitionFeatureMembershipReader.cs index 8921299b2..56496b3f9 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TransitionFeatureMembershipReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TransitionFeatureMembershipReader.cs @@ -348,7 +348,7 @@ public override ITransitionFeatureMembership Read(XmlReader xmiReader, Uri curre { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -369,7 +369,7 @@ public override ITransitionFeatureMembership Read(XmlReader xmiReader, Uri curre { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -390,7 +390,7 @@ public override ITransitionFeatureMembership Read(XmlReader xmiReader, Uri curre { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -411,7 +411,7 @@ public override ITransitionFeatureMembership Read(XmlReader xmiReader, Uri curre { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -714,7 +714,7 @@ public override async Task ReadAsync(XmlReader xmi { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -735,7 +735,7 @@ public override async Task ReadAsync(XmlReader xmi { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -756,7 +756,7 @@ public override async Task ReadAsync(XmlReader xmi { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -777,7 +777,7 @@ public override async Task ReadAsync(XmlReader xmi { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TransitionUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TransitionUsageReader.cs index 6bd92916d..1ae1e0dcb 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TransitionUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TransitionUsageReader.cs @@ -563,7 +563,7 @@ public override ITransitionUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -584,7 +584,7 @@ public override ITransitionUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1077,7 +1077,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1098,7 +1098,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TriggerInvocationExpressionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TriggerInvocationExpressionReader.cs index deb4a2966..3f347c4a2 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TriggerInvocationExpressionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TriggerInvocationExpressionReader.cs @@ -530,7 +530,7 @@ public override ITriggerInvocationExpression Read(XmlReader xmiReader, Uri curre { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -551,7 +551,7 @@ public override ITriggerInvocationExpression Read(XmlReader xmiReader, Uri curre { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1022,7 +1022,7 @@ public override async Task ReadAsync(XmlReader xmi { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1043,7 +1043,7 @@ public override async Task ReadAsync(XmlReader xmi { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TypeFeaturingReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TypeFeaturingReader.cs index a4170476d..01cfae493 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TypeFeaturingReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TypeFeaturingReader.cs @@ -374,7 +374,7 @@ public override ITypeFeaturing Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -395,7 +395,7 @@ public override ITypeFeaturing Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -416,7 +416,7 @@ public override ITypeFeaturing Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -437,7 +437,7 @@ public override ITypeFeaturing Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -758,7 +758,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cu { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -779,7 +779,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cu { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -800,7 +800,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cu { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -821,7 +821,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cu { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TypeReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TypeReader.cs index 13ae40550..db0fd0dbb 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TypeReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/TypeReader.cs @@ -304,7 +304,7 @@ public override IType Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -325,7 +325,7 @@ public override IType Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -576,7 +576,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentLoca { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -597,7 +597,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentLoca { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/UnioningReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/UnioningReader.cs index ae83e3f80..c7e4f894e 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/UnioningReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/UnioningReader.cs @@ -321,7 +321,7 @@ public override IUnioning Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -342,7 +342,7 @@ public override IUnioning Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -363,7 +363,7 @@ public override IUnioning Read(XmlReader xmiReader, Uri currentLocation) { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -384,7 +384,7 @@ public override IUnioning Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -674,7 +674,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri current { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -695,7 +695,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri current { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -716,7 +716,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri current { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -737,7 +737,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri current { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/UsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/UsageReader.cs index 4dee57638..865b63a25 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/UsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/UsageReader.cs @@ -526,7 +526,7 @@ public override IUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -547,7 +547,7 @@ public override IUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -996,7 +996,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentLoc { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1017,7 +1017,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri currentLoc { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/UseCaseDefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/UseCaseDefinitionReader.cs index bfa1b8ff0..1798abe05 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/UseCaseDefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/UseCaseDefinitionReader.cs @@ -373,7 +373,7 @@ public override IUseCaseDefinition Read(XmlReader xmiReader, Uri currentLocation { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -394,7 +394,7 @@ public override IUseCaseDefinition Read(XmlReader xmiReader, Uri currentLocation { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -689,7 +689,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -710,7 +710,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/UseCaseUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/UseCaseUsageReader.cs index a5832ee27..a3c5ccf7d 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/UseCaseUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/UseCaseUsageReader.cs @@ -562,7 +562,7 @@ public override IUseCaseUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -583,7 +583,7 @@ public override IUseCaseUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1076,7 +1076,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1097,7 +1097,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri cur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/VariantMembershipReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/VariantMembershipReader.cs index 33c7c0f09..e11f62813 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/VariantMembershipReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/VariantMembershipReader.cs @@ -322,7 +322,7 @@ public override IVariantMembership Read(XmlReader xmiReader, Uri currentLocation { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -343,7 +343,7 @@ public override IVariantMembership Read(XmlReader xmiReader, Uri currentLocation { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -364,7 +364,7 @@ public override IVariantMembership Read(XmlReader xmiReader, Uri currentLocation { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -385,7 +385,7 @@ public override IVariantMembership Read(XmlReader xmiReader, Uri currentLocation { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -666,7 +666,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -687,7 +687,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -708,7 +708,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -729,7 +729,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Ur { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/VerificationCaseDefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/VerificationCaseDefinitionReader.cs index ee7e69c2e..d66274707 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/VerificationCaseDefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/VerificationCaseDefinitionReader.cs @@ -373,7 +373,7 @@ public override IVerificationCaseDefinition Read(XmlReader xmiReader, Uri curren { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -394,7 +394,7 @@ public override IVerificationCaseDefinition Read(XmlReader xmiReader, Uri curren { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -689,7 +689,7 @@ public override async Task ReadAsync(XmlReader xmiR { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -710,7 +710,7 @@ public override async Task ReadAsync(XmlReader xmiR { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/VerificationCaseUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/VerificationCaseUsageReader.cs index 231935bd8..4530f24c2 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/VerificationCaseUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/VerificationCaseUsageReader.cs @@ -562,7 +562,7 @@ public override IVerificationCaseUsage Read(XmlReader xmiReader, Uri currentLoca { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -583,7 +583,7 @@ public override IVerificationCaseUsage Read(XmlReader xmiReader, Uri currentLoca { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1076,7 +1076,7 @@ public override async Task ReadAsync(XmlReader xmiReader { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1097,7 +1097,7 @@ public override async Task ReadAsync(XmlReader xmiReader { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ViewDefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ViewDefinitionReader.cs index 6c9f9c371..3e601b92c 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ViewDefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ViewDefinitionReader.cs @@ -372,7 +372,7 @@ public override IViewDefinition Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -393,7 +393,7 @@ public override IViewDefinition Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -688,7 +688,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -709,7 +709,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ViewRenderingMembershipReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ViewRenderingMembershipReader.cs index 3672dc0a2..4dcdbf570 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ViewRenderingMembershipReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ViewRenderingMembershipReader.cs @@ -324,7 +324,7 @@ public override IViewRenderingMembership Read(XmlReader xmiReader, Uri currentLo { var ownedRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -345,7 +345,7 @@ public override IViewRenderingMembership Read(XmlReader xmiReader, Uri currentLo { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -366,7 +366,7 @@ public override IViewRenderingMembership Read(XmlReader xmiReader, Uri currentLo { var owningRelatedElementValue = (IElement)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -387,7 +387,7 @@ public override IViewRenderingMembership Read(XmlReader xmiReader, Uri currentLo { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -668,7 +668,7 @@ public override async Task ReadAsync(XmlReader xmiRead { var ownedRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelatedElement.Add(ownedRelatedElementValue); + ((IContainedRelationship)poco).OwnedRelatedElement.Add(ownedRelatedElementValue); } break; @@ -689,7 +689,7 @@ public override async Task ReadAsync(XmlReader xmiRead { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -710,7 +710,7 @@ public override async Task ReadAsync(XmlReader xmiRead { var owningRelatedElementValue = (IElement)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelatedElement = owningRelatedElementValue; + ((IContainedRelationship)poco).OwningRelatedElement = owningRelatedElementValue; } break; @@ -731,7 +731,7 @@ public override async Task ReadAsync(XmlReader xmiRead { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ViewUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ViewUsageReader.cs index 340a4512c..b1455282f 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ViewUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ViewUsageReader.cs @@ -562,7 +562,7 @@ public override IViewUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -583,7 +583,7 @@ public override IViewUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1076,7 +1076,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1097,7 +1097,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri curren { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ViewpointDefinitionReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ViewpointDefinitionReader.cs index 89d477a30..3ae0c84df 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ViewpointDefinitionReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ViewpointDefinitionReader.cs @@ -361,7 +361,7 @@ public override IViewpointDefinition Read(XmlReader xmiReader, Uri currentLocati { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -382,7 +382,7 @@ public override IViewpointDefinition Read(XmlReader xmiReader, Uri currentLocati { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -677,7 +677,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -698,7 +698,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ViewpointUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ViewpointUsageReader.cs index 06ae1b1b6..f963fc233 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ViewpointUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/ViewpointUsageReader.cs @@ -550,7 +550,7 @@ public override IViewpointUsage Read(XmlReader xmiReader, Uri currentLocation) { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -571,7 +571,7 @@ public override IViewpointUsage Read(XmlReader xmiReader, Uri currentLocation) { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1064,7 +1064,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1085,7 +1085,7 @@ public override async Task ReadAsync(XmlReader xmiReader, Uri c { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/WhileLoopActionUsageReader.cs b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/WhileLoopActionUsageReader.cs index bf978fa85..3c74d4f4c 100644 --- a/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/WhileLoopActionUsageReader.cs +++ b/SysML2.NET.Serializer.Xmi/Readers/AutoGenReaders/WhileLoopActionUsageReader.cs @@ -562,7 +562,7 @@ public override IWhileLoopActionUsage Read(XmlReader xmiReader, Uri currentLocat { var ownedRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -583,7 +583,7 @@ public override IWhileLoopActionUsage Read(XmlReader xmiReader, Uri currentLocat { var owningRelationshipValue = (IRelationship)this.XmiDataReaderFacade.QueryXmiData(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; @@ -1076,7 +1076,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var ownedRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwnedRelationship.Add(ownedRelationshipValue); + ((IContainedElement)poco).OwnedRelationship.Add(ownedRelationshipValue); } break; @@ -1097,7 +1097,7 @@ public override async Task ReadAsync(XmlReader xmiReader, { var owningRelationshipValue = (IRelationship)await this.XmiDataReaderFacade.QueryXmiDataAsync(xmiReader, this.Cache, currentLocation, this.ExternalReferenceService, this.LoggerFactory); - poco.OwningRelationship = owningRelationshipValue; + ((IContainedElement)poco).OwningRelationship = owningRelationshipValue; } break; diff --git a/SysML2.NET/Collections/ContainerList.cs b/SysML2.NET/Collections/ContainerList.cs new file mode 100644 index 000000000..cd9c9f34e --- /dev/null +++ b/SysML2.NET/Collections/ContainerList.cs @@ -0,0 +1,102 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.Collections +{ + using System; + using System.Collections.ObjectModel; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides containment support to automatically update the parent property when a + /// is added + /// + /// Any parent class + /// Any child class + internal class ContainerList: Collection where TParent : IElement where TChild : IElement + { + /// + /// The instance that will hold + /// + private readonly TParent owner; + + /// + /// Provides access, from a , to his parent property setter + /// + private readonly Action parentSetter; + + /// + /// Provides access, from a , to his parent property getter + /// + private readonly Func parentGetter; + + /// + /// Initializes a new instance of the + /// + /// The instance that will hold + /// Provides access, from a , to his parent property setter + /// Provides access, from a , to his parent property getter + public ContainerList(TParent owner, Action parentSetter, Func parentGetter) + { + this.owner = owner; + this.parentSetter = parentSetter; + this.parentGetter = parentGetter; + } + + /// Inserts an element into the at the specified index. + /// The zero-based index at which should be inserted. + /// The object to insert. The value can be for reference types. + /// + /// is less than zero. + /// -or- + /// is greater than . + protected override void InsertItem(int index, TChild item) + { + if (object.Equals(item, default(TChild))) + { + throw new ArgumentNullException(nameof(item)); + } + + var currentParent = this.parentGetter(item); + + if (!object.Equals(currentParent, default(TParent)) && currentParent.Id != this.owner.Id) + { + throw new InvalidOperationException($"The current element with Id {item.Id} is already owned"); + } + + base.InsertItem(index, item); + this.parentSetter(item, this.owner); + } + + /// Removes the element at the specified index of the . + /// The zero-based index of the element to remove. + /// + /// is less than zero. + /// -or- + /// is equal to or greater than . + protected override void RemoveItem(int index) + { + var currentItem = this[index]; + this.parentSetter(currentItem, default); + base.RemoveItem(index); + } + } +} diff --git a/SysML2.NET/Core/AutoGenPoco/AcceptActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/AcceptActionUsage.cs index b227dac9a..54103f3a7 100644 --- a/SysML2.NET/Core/AutoGenPoco/AcceptActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/AcceptActionUsage.cs @@ -61,6 +61,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -72,8 +73,19 @@ namespace SysML2.NET.Core.POCO.Systems.Actions /// [Class(xmiId: "_18_5_3_12e503d9_1565503089035_106795_33475", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class AcceptActionUsage : IAcceptActionUsage + public partial class AcceptActionUsage : IAcceptActionUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public AcceptActionUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -910,7 +922,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1009,7 +1024,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/ActionDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ActionDefinition.cs index 0bd3c3b95..d18d2faf0 100644 --- a/SysML2.NET/Core/AutoGenPoco/ActionDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ActionDefinition.cs @@ -57,6 +57,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -65,8 +66,19 @@ namespace SysML2.NET.Core.POCO.Systems.Actions /// [Class(xmiId: "_18_5_3_12e503d9_1565500542970_17430_30342", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ActionDefinition : IActionDefinition + public partial class ActionDefinition : IActionDefinition, IContainedElement { + /// + /// Initialize a new instance of + /// + public ActionDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -594,7 +606,10 @@ public partial class ActionDefinition : IActionDefinition [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -728,7 +743,10 @@ public partial class ActionDefinition : IActionDefinition [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The parameters of this Behavior, which are defined as its directedFeatures, whose values are passed diff --git a/SysML2.NET/Core/AutoGenPoco/ActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/ActionUsage.cs index f1adb12e4..05a4c5c7d 100644 --- a/SysML2.NET/Core/AutoGenPoco/ActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ActionUsage.cs @@ -60,6 +60,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -70,8 +71,19 @@ namespace SysML2.NET.Core.POCO.Systems.Actions /// [Class(xmiId: "_18_5_3_12e503d9_1565500580749_954926_30405", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ActionUsage : IActionUsage + public partial class ActionUsage : IActionUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public ActionUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -908,7 +920,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1007,7 +1022,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/ActorMembership.cs b/SysML2.NET/Core/AutoGenPoco/ActorMembership.cs index 3a300a870..b18d6949c 100644 --- a/SysML2.NET/Core/AutoGenPoco/ActorMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/ActorMembership.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; using SysML2.NET.Core.POCO.Systems.Parts; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -46,8 +47,23 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements /// [Class(xmiId: "_19_0_4_12e503d9_1621464240681_650455_1312", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ActorMembership : IActorMembership + public partial class ActorMembership : IActorMembership, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public ActorMembership() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -274,7 +290,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -282,7 +301,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -316,7 +338,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -324,7 +349,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that owns this FeatureMembership. diff --git a/SysML2.NET/Core/AutoGenPoco/AllocationDefinition.cs b/SysML2.NET/Core/AutoGenPoco/AllocationDefinition.cs index 42010ba00..b56818339 100644 --- a/SysML2.NET/Core/AutoGenPoco/AllocationDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/AllocationDefinition.cs @@ -57,6 +57,7 @@ namespace SysML2.NET.Core.POCO.Systems.Allocations using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -69,8 +70,23 @@ namespace SysML2.NET.Core.POCO.Systems.Allocations /// [Class(xmiId: "_19_0_4_12e503d9_1611430566467_608282_906", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class AllocationDefinition : IAllocationDefinition + public partial class AllocationDefinition : IAllocationDefinition, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public AllocationDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + } + /// /// Gets or sets the unique identifier /// @@ -640,7 +656,10 @@ bool Core.Types.IType.IsSufficient [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -648,7 +667,10 @@ bool Core.Types.IType.IsSufficient [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -782,7 +804,10 @@ bool Core.Types.IType.IsSufficient [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -790,7 +815,10 @@ bool Core.Types.IType.IsSufficient [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/AllocationUsage.cs b/SysML2.NET/Core/AutoGenPoco/AllocationUsage.cs index b5012fd28..aa2d52b6f 100644 --- a/SysML2.NET/Core/AutoGenPoco/AllocationUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/AllocationUsage.cs @@ -62,6 +62,7 @@ namespace SysML2.NET.Core.POCO.Systems.Allocations using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -70,8 +71,23 @@ namespace SysML2.NET.Core.POCO.Systems.Allocations /// [Class(xmiId: "_19_0_4_12e503d9_1611430595314_523036_933", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class AllocationUsage : IAllocationUsage + public partial class AllocationUsage : IAllocationUsage, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public AllocationUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + } + /// /// Gets or sets the unique identifier /// @@ -955,7 +971,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -963,7 +982,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1062,7 +1084,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -1070,7 +1095,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/AnalysisCaseDefinition.cs b/SysML2.NET/Core/AutoGenPoco/AnalysisCaseDefinition.cs index 79bde19db..a149ba17c 100644 --- a/SysML2.NET/Core/AutoGenPoco/AnalysisCaseDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/AnalysisCaseDefinition.cs @@ -58,6 +58,7 @@ namespace SysML2.NET.Core.POCO.Systems.AnalysisCases using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -65,8 +66,19 @@ namespace SysML2.NET.Core.POCO.Systems.AnalysisCases /// [Class(xmiId: "_19_0_2_59601fc_1590260221442_937295_1064", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class AnalysisCaseDefinition : IAnalysisCaseDefinition + public partial class AnalysisCaseDefinition : IAnalysisCaseDefinition, IContainedElement { + /// + /// Initialize a new instance of + /// + public AnalysisCaseDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -637,7 +649,10 @@ public partial class AnalysisCaseDefinition : IAnalysisCaseDefinition [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -771,7 +786,10 @@ public partial class AnalysisCaseDefinition : IAnalysisCaseDefinition [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The parameters of this Behavior, which are defined as its directedFeatures, whose values are passed diff --git a/SysML2.NET/Core/AutoGenPoco/AnalysisCaseUsage.cs b/SysML2.NET/Core/AutoGenPoco/AnalysisCaseUsage.cs index f3aed76fc..fb3a99392 100644 --- a/SysML2.NET/Core/AutoGenPoco/AnalysisCaseUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/AnalysisCaseUsage.cs @@ -61,6 +61,7 @@ namespace SysML2.NET.Core.POCO.Systems.AnalysisCases using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -68,8 +69,19 @@ namespace SysML2.NET.Core.POCO.Systems.AnalysisCases /// [Class(xmiId: "_19_0_2_59601fc_1590260225615_617039_1090", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class AnalysisCaseUsage : IAnalysisCaseUsage + public partial class AnalysisCaseUsage : IAnalysisCaseUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public AnalysisCaseUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -967,7 +979,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1066,7 +1081,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/AnnotatingElement.cs b/SysML2.NET/Core/AutoGenPoco/AnnotatingElement.cs index 54c761f8f..a126d2b2e 100644 --- a/SysML2.NET/Core/AutoGenPoco/AnnotatingElement.cs +++ b/SysML2.NET/Core/AutoGenPoco/AnnotatingElement.cs @@ -31,6 +31,7 @@ namespace SysML2.NET.Core.POCO.Root.Annotations using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -40,8 +41,19 @@ namespace SysML2.NET.Core.POCO.Root.Annotations /// [Class(xmiId: "_19_0_2_12e503d9_1594145576693_532940_27", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class AnnotatingElement : IAnnotatingElement + public partial class AnnotatingElement : IAnnotatingElement, IContainedElement { + /// + /// Initialize a new instance of + /// + public AnnotatingElement() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -170,7 +182,10 @@ public partial class AnnotatingElement : IAnnotatingElement [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -213,7 +228,10 @@ public partial class AnnotatingElement : IAnnotatingElement [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/Annotation.cs b/SysML2.NET/Core/AutoGenPoco/Annotation.cs index 8d3fecb07..f3537257f 100644 --- a/SysML2.NET/Core/AutoGenPoco/Annotation.cs +++ b/SysML2.NET/Core/AutoGenPoco/Annotation.cs @@ -31,6 +31,7 @@ namespace SysML2.NET.Core.POCO.Root.Annotations using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -39,8 +40,23 @@ namespace SysML2.NET.Core.POCO.Root.Annotations /// [Class(xmiId: "_18_5_3_12e503d9_1543093613150_792705_18263", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Annotation : IAnnotation + public partial class Annotation : IAnnotation, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public Annotation() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -175,7 +191,10 @@ public partial class Annotation : IAnnotation [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -183,7 +202,10 @@ public partial class Annotation : IAnnotation [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -235,7 +257,10 @@ public partial class Annotation : IAnnotation [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -243,7 +268,10 @@ public partial class Annotation : IAnnotation [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/AssertConstraintUsage.cs b/SysML2.NET/Core/AutoGenPoco/AssertConstraintUsage.cs index f40d06f4c..c02f425ef 100644 --- a/SysML2.NET/Core/AutoGenPoco/AssertConstraintUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/AssertConstraintUsage.cs @@ -61,6 +61,7 @@ namespace SysML2.NET.Core.POCO.Systems.Constraints using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -70,8 +71,19 @@ namespace SysML2.NET.Core.POCO.Systems.Constraints /// [Class(xmiId: "_19_0_2_12e503d9_1581045078368_47459_9326", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class AssertConstraintUsage : IAssertConstraintUsage + public partial class AssertConstraintUsage : IAssertConstraintUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public AssertConstraintUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -941,7 +953,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1040,7 +1055,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/AssignmentActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/AssignmentActionUsage.cs index e2ca50394..f8df89a27 100644 --- a/SysML2.NET/Core/AutoGenPoco/AssignmentActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/AssignmentActionUsage.cs @@ -61,6 +61,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -71,8 +72,19 @@ namespace SysML2.NET.Core.POCO.Systems.Actions /// [Class(xmiId: "_19_0_4_12e503d9_1624201606942_142574_2658", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class AssignmentActionUsage : IAssignmentActionUsage + public partial class AssignmentActionUsage : IAssignmentActionUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public AssignmentActionUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -909,7 +921,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1008,7 +1023,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/Association.cs b/SysML2.NET/Core/AutoGenPoco/Association.cs index e8af5ece1..0e661aa72 100644 --- a/SysML2.NET/Core/AutoGenPoco/Association.cs +++ b/SysML2.NET/Core/AutoGenPoco/Association.cs @@ -35,6 +35,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Associations using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -44,8 +45,23 @@ namespace SysML2.NET.Core.POCO.Kernel.Associations /// [Class(xmiId: "_18_5_3_12e503d9_1533160651716_116234_42240", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Association : IAssociation + public partial class Association : IAssociation, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public Association() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + } + /// /// Gets or sets the unique identifier /// @@ -413,7 +429,10 @@ public partial class Association : IAssociation [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -421,7 +440,10 @@ public partial class Association : IAssociation [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -483,7 +505,10 @@ public partial class Association : IAssociation [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -491,7 +516,10 @@ public partial class Association : IAssociation [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/AssociationStructure.cs b/SysML2.NET/Core/AutoGenPoco/AssociationStructure.cs index 9f85bf345..32b269e07 100644 --- a/SysML2.NET/Core/AutoGenPoco/AssociationStructure.cs +++ b/SysML2.NET/Core/AutoGenPoco/AssociationStructure.cs @@ -36,6 +36,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Associations using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -46,8 +47,23 @@ namespace SysML2.NET.Core.POCO.Kernel.Associations /// [Class(xmiId: "_19_0_4_b9102da_1609608726569_644338_601", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class AssociationStructure : IAssociationStructure + public partial class AssociationStructure : IAssociationStructure, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public AssociationStructure() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + } + /// /// Gets or sets the unique identifier /// @@ -415,7 +431,10 @@ public partial class AssociationStructure : IAssociationStructure [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -423,7 +442,10 @@ public partial class AssociationStructure : IAssociationStructure [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -485,7 +507,10 @@ public partial class AssociationStructure : IAssociationStructure [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -493,7 +518,10 @@ public partial class AssociationStructure : IAssociationStructure [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/AttributeDefinition.cs b/SysML2.NET/Core/AutoGenPoco/AttributeDefinition.cs index d078f6f2e..b902e3f53 100644 --- a/SysML2.NET/Core/AutoGenPoco/AttributeDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/AttributeDefinition.cs @@ -57,6 +57,7 @@ namespace SysML2.NET.Core.POCO.Systems.Attributes using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -68,8 +69,19 @@ namespace SysML2.NET.Core.POCO.Systems.Attributes /// [Class(xmiId: "_18_5_3_12e503d9_1565471213468_167708_20650", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class AttributeDefinition : IAttributeDefinition + public partial class AttributeDefinition : IAttributeDefinition, IContainedElement { + /// + /// Initialize a new instance of + /// + public AttributeDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -580,7 +592,10 @@ public partial class AttributeDefinition : IAttributeDefinition [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -714,7 +729,10 @@ public partial class AttributeDefinition : IAttributeDefinition [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/AttributeUsage.cs b/SysML2.NET/Core/AutoGenPoco/AttributeUsage.cs index 210755b34..66c520e38 100644 --- a/SysML2.NET/Core/AutoGenPoco/AttributeUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/AttributeUsage.cs @@ -58,6 +58,7 @@ namespace SysML2.NET.Core.POCO.Systems.Attributes using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -71,8 +72,19 @@ namespace SysML2.NET.Core.POCO.Systems.Attributes /// [Class(xmiId: "_18_5_3_12e503d9_1565471291545_950196_20762", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class AttributeUsage : IAttributeUsage + public partial class AttributeUsage : IAttributeUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public AttributeUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -882,7 +894,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -981,7 +996,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/Behavior.cs b/SysML2.NET/Core/AutoGenPoco/Behavior.cs index a06ccfe09..1246e9b1b 100644 --- a/SysML2.NET/Core/AutoGenPoco/Behavior.cs +++ b/SysML2.NET/Core/AutoGenPoco/Behavior.cs @@ -36,6 +36,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Behaviors using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -44,8 +45,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Behaviors /// [Class(xmiId: "_18_5_3_12e503d9_1533160651709_376789_42207", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Behavior : IBehavior + public partial class Behavior : IBehavior, IContainedElement { + /// + /// Initialize a new instance of + /// + public Behavior() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -395,7 +407,10 @@ public partial class Behavior : IBehavior [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -457,7 +472,10 @@ public partial class Behavior : IBehavior [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The parameters of this Behavior, which are defined as its directedFeatures, whose values are passed diff --git a/SysML2.NET/Core/AutoGenPoco/BindingConnector.cs b/SysML2.NET/Core/AutoGenPoco/BindingConnector.cs index f1431b81b..42fdd1558 100644 --- a/SysML2.NET/Core/AutoGenPoco/BindingConnector.cs +++ b/SysML2.NET/Core/AutoGenPoco/BindingConnector.cs @@ -36,6 +36,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Connectors using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -44,8 +45,23 @@ namespace SysML2.NET.Core.POCO.Kernel.Connectors /// [Class(xmiId: "_18_5_3_b9102da_1543591219823_238592_17680", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class BindingConnector : IBindingConnector + public partial class BindingConnector : IBindingConnector, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public BindingConnector() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + } + /// /// Gets or sets the unique identifier /// @@ -602,7 +618,10 @@ public partial class BindingConnector : IBindingConnector [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -610,7 +629,10 @@ public partial class BindingConnector : IBindingConnector [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -701,7 +723,10 @@ public partial class BindingConnector : IBindingConnector [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -709,7 +734,10 @@ public partial class BindingConnector : IBindingConnector [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/BindingConnectorAsUsage.cs b/SysML2.NET/Core/AutoGenPoco/BindingConnectorAsUsage.cs index cc5ba4516..d3ba72453 100644 --- a/SysML2.NET/Core/AutoGenPoco/BindingConnectorAsUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/BindingConnectorAsUsage.cs @@ -59,6 +59,7 @@ namespace SysML2.NET.Core.POCO.Systems.Connections using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -66,8 +67,23 @@ namespace SysML2.NET.Core.POCO.Systems.Connections /// [Class(xmiId: "_19_0_4_12e503d9_1624053366342_865295_501", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class BindingConnectorAsUsage : IBindingConnectorAsUsage + public partial class BindingConnectorAsUsage : IBindingConnectorAsUsage, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public BindingConnectorAsUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + } + /// /// Gets or sets the unique identifier /// @@ -893,7 +909,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -901,7 +920,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1000,7 +1022,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -1008,7 +1033,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/BooleanExpression.cs b/SysML2.NET/Core/AutoGenPoco/BooleanExpression.cs index baddd3f4c..3a6012d5d 100644 --- a/SysML2.NET/Core/AutoGenPoco/BooleanExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/BooleanExpression.cs @@ -36,6 +36,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Functions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -44,8 +45,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Functions /// [Class(xmiId: "_19_0_2_12e503d9_1578511256733_336334_354", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class BooleanExpression : IBooleanExpression + public partial class BooleanExpression : IBooleanExpression, IContainedElement { + /// + /// Initialize a new instance of + /// + public BooleanExpression() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -593,7 +605,10 @@ public partial class BooleanExpression : IBooleanExpression [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -684,7 +699,10 @@ public partial class BooleanExpression : IBooleanExpression [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/CalculationDefinition.cs b/SysML2.NET/Core/AutoGenPoco/CalculationDefinition.cs index a4ac0cf93..17f8c2ea8 100644 --- a/SysML2.NET/Core/AutoGenPoco/CalculationDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/CalculationDefinition.cs @@ -58,6 +58,7 @@ namespace SysML2.NET.Core.POCO.Systems.Calculations using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -66,8 +67,19 @@ namespace SysML2.NET.Core.POCO.Systems.Calculations /// [Class(xmiId: "_19_0_2_12e503d9_1588213234752_326869_117", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class CalculationDefinition : ICalculationDefinition + public partial class CalculationDefinition : ICalculationDefinition, IContainedElement { + /// + /// Initialize a new instance of + /// + public CalculationDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -622,7 +634,10 @@ public partial class CalculationDefinition : ICalculationDefinition [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -756,7 +771,10 @@ public partial class CalculationDefinition : ICalculationDefinition [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The parameters of this Behavior, which are defined as its directedFeatures, whose values are passed diff --git a/SysML2.NET/Core/AutoGenPoco/CalculationUsage.cs b/SysML2.NET/Core/AutoGenPoco/CalculationUsage.cs index 5f8e7021a..c6f27188c 100644 --- a/SysML2.NET/Core/AutoGenPoco/CalculationUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/CalculationUsage.cs @@ -61,6 +61,7 @@ namespace SysML2.NET.Core.POCO.Systems.Calculations using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -71,8 +72,19 @@ namespace SysML2.NET.Core.POCO.Systems.Calculations /// [Class(xmiId: "_19_0_2_12e503d9_1588213258220_731107_146", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class CalculationUsage : ICalculationUsage + public partial class CalculationUsage : ICalculationUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public CalculationUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -936,7 +948,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1035,7 +1050,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/CaseDefinition.cs b/SysML2.NET/Core/AutoGenPoco/CaseDefinition.cs index 5c17c9cfa..151a0fc4a 100644 --- a/SysML2.NET/Core/AutoGenPoco/CaseDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/CaseDefinition.cs @@ -58,6 +58,7 @@ namespace SysML2.NET.Core.POCO.Systems.Cases using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -67,8 +68,19 @@ namespace SysML2.NET.Core.POCO.Systems.Cases /// [Class(xmiId: "_19_0_2_59601fc_1590256070522_658678_81", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class CaseDefinition : ICaseDefinition + public partial class CaseDefinition : ICaseDefinition, IContainedElement { + /// + /// Initialize a new instance of + /// + public CaseDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -639,7 +651,10 @@ public partial class CaseDefinition : ICaseDefinition [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -773,7 +788,10 @@ public partial class CaseDefinition : ICaseDefinition [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The parameters of this Behavior, which are defined as its directedFeatures, whose values are passed diff --git a/SysML2.NET/Core/AutoGenPoco/CaseUsage.cs b/SysML2.NET/Core/AutoGenPoco/CaseUsage.cs index 1d8104d19..289c1fd7a 100644 --- a/SysML2.NET/Core/AutoGenPoco/CaseUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/CaseUsage.cs @@ -61,6 +61,7 @@ namespace SysML2.NET.Core.POCO.Systems.Cases using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -68,8 +69,19 @@ namespace SysML2.NET.Core.POCO.Systems.Cases /// [Class(xmiId: "_19_0_2_59601fc_1590256077623_424527_107", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class CaseUsage : ICaseUsage + public partial class CaseUsage : ICaseUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public CaseUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -958,7 +970,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1057,7 +1072,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/Class.cs b/SysML2.NET/Core/AutoGenPoco/Class.cs index 3b41bc192..4ddac7708 100644 --- a/SysML2.NET/Core/AutoGenPoco/Class.cs +++ b/SysML2.NET/Core/AutoGenPoco/Class.cs @@ -35,6 +35,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Classes using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -44,8 +45,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Classes /// [Class(xmiId: "_18_5_3_12e503d9_1557527582956_258352_110280", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Class : IClass + public partial class Class : IClass, IContainedElement { + /// + /// Initialize a new instance of + /// + public Class() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -394,7 +406,10 @@ public partial class Class : IClass [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -456,7 +471,10 @@ public partial class Class : IClass [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/Classifier.cs b/SysML2.NET/Core/AutoGenPoco/Classifier.cs index 1dbdb57aa..a2366a607 100644 --- a/SysML2.NET/Core/AutoGenPoco/Classifier.cs +++ b/SysML2.NET/Core/AutoGenPoco/Classifier.cs @@ -34,6 +34,7 @@ namespace SysML2.NET.Core.POCO.Core.Classifiers using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -47,8 +48,19 @@ namespace SysML2.NET.Core.POCO.Core.Classifiers /// [Class(xmiId: "_18_5_3_12e503d9_1533160651676_375105_42143", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Classifier : IClassifier + public partial class Classifier : IClassifier, IContainedElement { + /// + /// Initialize a new instance of + /// + public Classifier() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -397,7 +409,10 @@ public partial class Classifier : IClassifier [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -459,7 +474,10 @@ public partial class Classifier : IClassifier [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/CollectExpression.cs b/SysML2.NET/Core/AutoGenPoco/CollectExpression.cs index dc03deb11..ec539d5fb 100644 --- a/SysML2.NET/Core/AutoGenPoco/CollectExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/CollectExpression.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions /// [Class(xmiId: "_18_5_3_12e503d9_1559596612705_364896_29003", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class CollectExpression : ICollectExpression + public partial class CollectExpression : ICollectExpression, IContainedElement { + /// + /// Initialize a new instance of + /// + public CollectExpression() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -634,7 +646,10 @@ string IOperatorExpression.Operator [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -725,7 +740,10 @@ string IOperatorExpression.Operator [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/Comment.cs b/SysML2.NET/Core/AutoGenPoco/Comment.cs index 940db1dee..fbb7d6dd1 100644 --- a/SysML2.NET/Core/AutoGenPoco/Comment.cs +++ b/SysML2.NET/Core/AutoGenPoco/Comment.cs @@ -31,6 +31,7 @@ namespace SysML2.NET.Core.POCO.Root.Annotations using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -38,8 +39,19 @@ namespace SysML2.NET.Core.POCO.Root.Annotations /// [Class(xmiId: "_18_5_3_12e503d9_1533160651696_959404_42181", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Comment : IComment + public partial class Comment : IComment, IContainedElement { + /// + /// Initialize a new instance of + /// + public Comment() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -184,7 +196,10 @@ public partial class Comment : IComment [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -227,7 +242,10 @@ public partial class Comment : IComment [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/ConcernDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ConcernDefinition.cs index 15db04821..d17294686 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConcernDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConcernDefinition.cs @@ -58,6 +58,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -67,8 +68,19 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements /// [Class(xmiId: "_19_0_4_12e503d9_1617051538049_980762_1225", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ConcernDefinition : IConcernDefinition + public partial class ConcernDefinition : IConcernDefinition, IContainedElement { + /// + /// Initialize a new instance of + /// + public ConcernDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -641,7 +653,10 @@ string Root.Elements.IElement.DeclaredShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -775,7 +790,10 @@ string Root.Elements.IElement.DeclaredShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The parameters of this Behavior, which are defined as its directedFeatures, whose values are passed diff --git a/SysML2.NET/Core/AutoGenPoco/ConcernUsage.cs b/SysML2.NET/Core/AutoGenPoco/ConcernUsage.cs index 4d38f7c86..9d9eb3a89 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConcernUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConcernUsage.cs @@ -61,6 +61,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -71,8 +72,19 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements /// [Class(xmiId: "_19_0_4_12e503d9_1617051561652_163085_1288", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ConcernUsage : IConcernUsage + public partial class ConcernUsage : IConcernUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public ConcernUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -970,7 +982,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1069,7 +1084,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/ConjugatedPortDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ConjugatedPortDefinition.cs index b8c3ea09e..c4d057a27 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConjugatedPortDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConjugatedPortDefinition.cs @@ -56,6 +56,7 @@ namespace SysML2.NET.Core.POCO.Systems.Ports using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -69,8 +70,19 @@ namespace SysML2.NET.Core.POCO.Systems.Ports /// [Class(xmiId: "_19_0_2_12e503d9_1575484160733_882684_674", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ConjugatedPortDefinition : IConjugatedPortDefinition + public partial class ConjugatedPortDefinition : IConjugatedPortDefinition, IContainedElement { + /// + /// Initialize a new instance of + /// + public ConjugatedPortDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -615,7 +627,10 @@ public partial class ConjugatedPortDefinition : IConjugatedPortDefinition [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -750,7 +765,10 @@ public partial class ConjugatedPortDefinition : IConjugatedPortDefinition [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/ConjugatedPortTyping.cs b/SysML2.NET/Core/AutoGenPoco/ConjugatedPortTyping.cs index 311af6e28..a18654cbe 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConjugatedPortTyping.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConjugatedPortTyping.cs @@ -34,6 +34,7 @@ namespace SysML2.NET.Core.POCO.Systems.Ports using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -43,8 +44,23 @@ namespace SysML2.NET.Core.POCO.Systems.Ports /// [Class(xmiId: "_19_0_2_12e503d9_1577914899997_653496_45", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ConjugatedPortTyping : IConjugatedPortTyping + public partial class ConjugatedPortTyping : IConjugatedPortTyping, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public ConjugatedPortTyping() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -178,7 +194,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -186,7 +205,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -229,7 +251,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -237,7 +262,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the specific Type of this Specialization and owns it as its owningRelatedElement. diff --git a/SysML2.NET/Core/AutoGenPoco/Conjugation.cs b/SysML2.NET/Core/AutoGenPoco/Conjugation.cs index 4f4b88b17..c5e58266f 100644 --- a/SysML2.NET/Core/AutoGenPoco/Conjugation.cs +++ b/SysML2.NET/Core/AutoGenPoco/Conjugation.cs @@ -32,6 +32,7 @@ namespace SysML2.NET.Core.POCO.Core.Types using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -46,8 +47,23 @@ namespace SysML2.NET.Core.POCO.Core.Types /// [Class(xmiId: "_19_0_2_12e503d9_1575482328287_696279_181", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Conjugation : IConjugation + public partial class Conjugation : IConjugation, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public Conjugation() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -172,7 +188,10 @@ public partial class Conjugation : IConjugation [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -180,7 +199,10 @@ public partial class Conjugation : IConjugation [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -214,7 +236,10 @@ public partial class Conjugation : IConjugation [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -222,7 +247,10 @@ public partial class Conjugation : IConjugation [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The conjugatedType of this Conjugation that is also its owningRelatedElement. diff --git a/SysML2.NET/Core/AutoGenPoco/ConnectionDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ConnectionDefinition.cs index 0022fc5f0..628ccf8c4 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConnectionDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConnectionDefinition.cs @@ -57,6 +57,7 @@ namespace SysML2.NET.Core.POCO.Systems.Connections using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -65,8 +66,23 @@ namespace SysML2.NET.Core.POCO.Systems.Connections /// [Class(xmiId: "_19_0_2_12e503d9_1565813525877_81950_622", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ConnectionDefinition : IConnectionDefinition + public partial class ConnectionDefinition : IConnectionDefinition, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public ConnectionDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + } + /// /// Gets or sets the unique identifier /// @@ -628,7 +644,10 @@ bool Core.Types.IType.IsSufficient [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -636,7 +655,10 @@ bool Core.Types.IType.IsSufficient [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -770,7 +792,10 @@ bool Core.Types.IType.IsSufficient [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -778,7 +803,10 @@ bool Core.Types.IType.IsSufficient [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/ConnectionUsage.cs b/SysML2.NET/Core/AutoGenPoco/ConnectionUsage.cs index 2391830b4..c34e424a4 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConnectionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConnectionUsage.cs @@ -62,6 +62,7 @@ namespace SysML2.NET.Core.POCO.Systems.Connections using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -72,8 +73,23 @@ namespace SysML2.NET.Core.POCO.Systems.Connections /// [Class(xmiId: "_19_0_2_12e503d9_1565824079403_302443_1935", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ConnectionUsage : IConnectionUsage + public partial class ConnectionUsage : IConnectionUsage, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public ConnectionUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + } + /// /// Gets or sets the unique identifier /// @@ -948,7 +964,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -956,7 +975,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1055,7 +1077,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -1063,7 +1088,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/Connector.cs b/SysML2.NET/Core/AutoGenPoco/Connector.cs index 4a7d5ab99..ee1b48451 100644 --- a/SysML2.NET/Core/AutoGenPoco/Connector.cs +++ b/SysML2.NET/Core/AutoGenPoco/Connector.cs @@ -36,6 +36,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Connectors using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -46,8 +47,23 @@ namespace SysML2.NET.Core.POCO.Kernel.Connectors /// [Class(xmiId: "_18_5_3_12e503d9_1533160651698_598377_42185", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Connector : IConnector + public partial class Connector : IConnector, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public Connector() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + } + /// /// Gets or sets the unique identifier /// @@ -604,7 +620,10 @@ public partial class Connector : IConnector [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -612,7 +631,10 @@ public partial class Connector : IConnector [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -703,7 +725,10 @@ public partial class Connector : IConnector [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -711,7 +736,10 @@ public partial class Connector : IConnector [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/ConstraintDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ConstraintDefinition.cs index 0d000afd3..ab1b40c43 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConstraintDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConstraintDefinition.cs @@ -58,6 +58,7 @@ namespace SysML2.NET.Core.POCO.Systems.Constraints using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -66,8 +67,19 @@ namespace SysML2.NET.Core.POCO.Systems.Constraints /// [Class(xmiId: "_19_0_2_12e503d9_1578067054125_439104_1452", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ConstraintDefinition : IConstraintDefinition + public partial class ConstraintDefinition : IConstraintDefinition, IContainedElement { + /// + /// Initialize a new instance of + /// + public ConstraintDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -605,7 +617,10 @@ public partial class ConstraintDefinition : IConstraintDefinition [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -739,7 +754,10 @@ public partial class ConstraintDefinition : IConstraintDefinition [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The parameters of this Behavior, which are defined as its directedFeatures, whose values are passed diff --git a/SysML2.NET/Core/AutoGenPoco/ConstraintUsage.cs b/SysML2.NET/Core/AutoGenPoco/ConstraintUsage.cs index ca1111e74..97f9425e3 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConstraintUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConstraintUsage.cs @@ -61,6 +61,7 @@ namespace SysML2.NET.Core.POCO.Systems.Constraints using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -71,8 +72,19 @@ namespace SysML2.NET.Core.POCO.Systems.Constraints /// [Class(xmiId: "_19_0_2_12e503d9_1578067096274_745288_1478", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ConstraintUsage : IConstraintUsage + public partial class ConstraintUsage : IConstraintUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public ConstraintUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -926,7 +938,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1025,7 +1040,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/ConstructorExpression.cs b/SysML2.NET/Core/AutoGenPoco/ConstructorExpression.cs index eddaccc2e..b80191eb0 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConstructorExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConstructorExpression.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -46,8 +47,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions /// [Class(xmiId: "_2022x_2_12e503d9_1739134182574_300577_15", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ConstructorExpression : IConstructorExpression + public partial class ConstructorExpression : IConstructorExpression, IContainedElement { + /// + /// Initialize a new instance of + /// + public ConstructorExpression() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -612,7 +624,10 @@ public partial class ConstructorExpression : IConstructorExpression [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -703,7 +718,10 @@ public partial class ConstructorExpression : IConstructorExpression [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/CrossSubsetting.cs b/SysML2.NET/Core/AutoGenPoco/CrossSubsetting.cs index 8050aace7..fa96f946a 100644 --- a/SysML2.NET/Core/AutoGenPoco/CrossSubsetting.cs +++ b/SysML2.NET/Core/AutoGenPoco/CrossSubsetting.cs @@ -33,6 +33,7 @@ namespace SysML2.NET.Core.POCO.Core.Features using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -54,8 +55,23 @@ namespace SysML2.NET.Core.POCO.Core.Features /// [Class(xmiId: "_19_0_4_b9102da_1689616180239_998062_127", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class CrossSubsetting : ICrossSubsetting + public partial class CrossSubsetting : ICrossSubsetting, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public CrossSubsetting() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -200,7 +216,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -208,7 +227,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -252,7 +274,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -260,7 +285,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the specific Type of this Specialization and owns it as its owningRelatedElement. diff --git a/SysML2.NET/Core/AutoGenPoco/DataType.cs b/SysML2.NET/Core/AutoGenPoco/DataType.cs index 8a743d774..02e811867 100644 --- a/SysML2.NET/Core/AutoGenPoco/DataType.cs +++ b/SysML2.NET/Core/AutoGenPoco/DataType.cs @@ -35,6 +35,7 @@ namespace SysML2.NET.Core.POCO.Kernel.DataTypes using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -48,8 +49,19 @@ namespace SysML2.NET.Core.POCO.Kernel.DataTypes /// [Class(xmiId: "_18_5_3_12e503d9_1557527599533_240072_110321", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class DataType : IDataType + public partial class DataType : IDataType, IContainedElement { + /// + /// Initialize a new instance of + /// + public DataType() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -398,7 +410,10 @@ public partial class DataType : IDataType [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -460,7 +475,10 @@ public partial class DataType : IDataType [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/DecisionNode.cs b/SysML2.NET/Core/AutoGenPoco/DecisionNode.cs index 1e2bd9c1e..0f00bc34e 100644 --- a/SysML2.NET/Core/AutoGenPoco/DecisionNode.cs +++ b/SysML2.NET/Core/AutoGenPoco/DecisionNode.cs @@ -60,6 +60,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -67,8 +68,19 @@ namespace SysML2.NET.Core.POCO.Systems.Actions /// [Class(xmiId: "_18_5_3_12e503d9_1565503118756_203952_33551", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class DecisionNode : IDecisionNode + public partial class DecisionNode : IDecisionNode, IContainedElement { + /// + /// Initialize a new instance of + /// + public DecisionNode() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -905,7 +917,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1004,7 +1019,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/Definition.cs b/SysML2.NET/Core/AutoGenPoco/Definition.cs index 3d0761c78..a772f7733 100644 --- a/SysML2.NET/Core/AutoGenPoco/Definition.cs +++ b/SysML2.NET/Core/AutoGenPoco/Definition.cs @@ -56,6 +56,7 @@ namespace SysML2.NET.Core.POCO.Systems.DefinitionAndUsage using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -72,8 +73,19 @@ namespace SysML2.NET.Core.POCO.Systems.DefinitionAndUsage /// [Class(xmiId: "_18_5_3_12e503d9_1565479032244_336549_22524", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Definition : IDefinition + public partial class Definition : IDefinition, IContainedElement { + /// + /// Initialize a new instance of + /// + public Definition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -584,7 +596,10 @@ public partial class Definition : IDefinition [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -718,7 +733,10 @@ public partial class Definition : IDefinition [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/Dependency.cs b/SysML2.NET/Core/AutoGenPoco/Dependency.cs index d16a6ddd1..c9b563489 100644 --- a/SysML2.NET/Core/AutoGenPoco/Dependency.cs +++ b/SysML2.NET/Core/AutoGenPoco/Dependency.cs @@ -32,6 +32,7 @@ namespace SysML2.NET.Core.POCO.Root.Dependencies using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -43,8 +44,23 @@ namespace SysML2.NET.Core.POCO.Root.Dependencies /// [Class(xmiId: "_19_0_2_12e503d9_1594006219028_628649_74", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Dependency : IDependency + public partial class Dependency : IDependency, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public Dependency() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -161,7 +177,10 @@ public partial class Dependency : IDependency [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -169,7 +188,10 @@ public partial class Dependency : IDependency [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -203,7 +225,10 @@ public partial class Dependency : IDependency [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -211,7 +236,10 @@ public partial class Dependency : IDependency [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/Differencing.cs b/SysML2.NET/Core/AutoGenPoco/Differencing.cs index 95b42a8af..1eea0723c 100644 --- a/SysML2.NET/Core/AutoGenPoco/Differencing.cs +++ b/SysML2.NET/Core/AutoGenPoco/Differencing.cs @@ -32,6 +32,7 @@ namespace SysML2.NET.Core.POCO.Core.Types using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -40,8 +41,23 @@ namespace SysML2.NET.Core.POCO.Core.Types /// [Class(xmiId: "_19_0_4_b9102da_1661870994364_119372_712", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Differencing : IDifferencing + public partial class Differencing : IDifferencing, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public Differencing() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -159,7 +175,10 @@ public partial class Differencing : IDifferencing [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -167,7 +186,10 @@ public partial class Differencing : IDifferencing [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -201,7 +223,10 @@ public partial class Differencing : IDifferencing [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -209,7 +234,10 @@ public partial class Differencing : IDifferencing [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/Disjoining.cs b/SysML2.NET/Core/AutoGenPoco/Disjoining.cs index c077b5ef4..301e64af2 100644 --- a/SysML2.NET/Core/AutoGenPoco/Disjoining.cs +++ b/SysML2.NET/Core/AutoGenPoco/Disjoining.cs @@ -32,6 +32,7 @@ namespace SysML2.NET.Core.POCO.Core.Types using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -42,8 +43,23 @@ namespace SysML2.NET.Core.POCO.Core.Types /// [Class(xmiId: "_19_0_4_b9102da_1623182941809_239395_557", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Disjoining : IDisjoining + public partial class Disjoining : IDisjoining, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public Disjoining() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -160,7 +176,10 @@ public partial class Disjoining : IDisjoining [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -168,7 +187,10 @@ public partial class Disjoining : IDisjoining [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -202,7 +224,10 @@ public partial class Disjoining : IDisjoining [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -210,7 +235,10 @@ public partial class Disjoining : IDisjoining [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// A typeDisjoined that is also an owningRelatedElement. diff --git a/SysML2.NET/Core/AutoGenPoco/Documentation.cs b/SysML2.NET/Core/AutoGenPoco/Documentation.cs index 11144d83c..df4d3e5dc 100644 --- a/SysML2.NET/Core/AutoGenPoco/Documentation.cs +++ b/SysML2.NET/Core/AutoGenPoco/Documentation.cs @@ -31,6 +31,7 @@ namespace SysML2.NET.Core.POCO.Root.Annotations using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -38,8 +39,19 @@ namespace SysML2.NET.Core.POCO.Root.Annotations /// [Class(xmiId: "_19_0_4_12e503d9_1647722169749_235252_587", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Documentation : IDocumentation + public partial class Documentation : IDocumentation, IContainedElement { + /// + /// Initialize a new instance of + /// + public Documentation() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -194,7 +206,10 @@ public partial class Documentation : IDocumentation [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -237,7 +252,10 @@ public partial class Documentation : IDocumentation [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/ElementFilterMembership.cs b/SysML2.NET/Core/AutoGenPoco/ElementFilterMembership.cs index 59de26b51..53025afa1 100644 --- a/SysML2.NET/Core/AutoGenPoco/ElementFilterMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/ElementFilterMembership.cs @@ -34,6 +34,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Packages using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -44,8 +45,23 @@ namespace SysML2.NET.Core.POCO.Kernel.Packages /// [Class(xmiId: "_19_0_4_12e503d9_1605760960644_813844_5877", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ElementFilterMembership : IElementFilterMembership + public partial class ElementFilterMembership : IElementFilterMembership, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public ElementFilterMembership() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -253,7 +269,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -261,7 +280,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -295,7 +317,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -303,7 +328,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/EndFeatureMembership.cs b/SysML2.NET/Core/AutoGenPoco/EndFeatureMembership.cs index 23bd540d9..69bd0394b 100644 --- a/SysML2.NET/Core/AutoGenPoco/EndFeatureMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/EndFeatureMembership.cs @@ -34,6 +34,7 @@ namespace SysML2.NET.Core.POCO.Core.Features using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -42,8 +43,23 @@ namespace SysML2.NET.Core.POCO.Core.Features /// [Class(xmiId: "_19_0_4_12e503d9_1625459008756_956040_5416", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class EndFeatureMembership : IEndFeatureMembership + public partial class EndFeatureMembership : IEndFeatureMembership, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public EndFeatureMembership() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -260,7 +276,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -268,7 +287,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -302,7 +324,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -310,7 +335,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that owns this FeatureMembership. diff --git a/SysML2.NET/Core/AutoGenPoco/EnumerationDefinition.cs b/SysML2.NET/Core/AutoGenPoco/EnumerationDefinition.cs index 55ecbb102..651bcfff8 100644 --- a/SysML2.NET/Core/AutoGenPoco/EnumerationDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/EnumerationDefinition.cs @@ -56,6 +56,7 @@ namespace SysML2.NET.Core.POCO.Systems.Enumerations using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -65,8 +66,19 @@ namespace SysML2.NET.Core.POCO.Systems.Enumerations /// [Class(xmiId: "_19_0_4_12e503d9_1606946467364_179493_153", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class EnumerationDefinition : IEnumerationDefinition + public partial class EnumerationDefinition : IEnumerationDefinition, IContainedElement { + /// + /// Initialize a new instance of + /// + public EnumerationDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -603,7 +615,10 @@ bool Systems.DefinitionAndUsage.IDefinition.IsVariation [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -737,7 +752,10 @@ bool Systems.DefinitionAndUsage.IDefinition.IsVariation [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/EnumerationUsage.cs b/SysML2.NET/Core/AutoGenPoco/EnumerationUsage.cs index 199de7527..939615770 100644 --- a/SysML2.NET/Core/AutoGenPoco/EnumerationUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/EnumerationUsage.cs @@ -58,6 +58,7 @@ namespace SysML2.NET.Core.POCO.Systems.Enumerations using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -65,8 +66,19 @@ namespace SysML2.NET.Core.POCO.Systems.Enumerations /// [Class(xmiId: "_19_0_4_12e503d9_1606946489455_954016_180", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class EnumerationUsage : IEnumerationUsage + public partial class EnumerationUsage : IEnumerationUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public EnumerationUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -885,7 +897,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -984,7 +999,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/EventOccurrenceUsage.cs b/SysML2.NET/Core/AutoGenPoco/EventOccurrenceUsage.cs index 32395f31e..24cfc6398 100644 --- a/SysML2.NET/Core/AutoGenPoco/EventOccurrenceUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/EventOccurrenceUsage.cs @@ -59,6 +59,7 @@ namespace SysML2.NET.Core.POCO.Systems.Occurrences using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -71,8 +72,19 @@ namespace SysML2.NET.Core.POCO.Systems.Occurrences /// [Class(xmiId: "_19_0_4_12e503d9_1622831611763_442921_132", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class EventOccurrenceUsage : IEventOccurrenceUsage + public partial class EventOccurrenceUsage : IEventOccurrenceUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public EventOccurrenceUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -907,7 +919,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1006,7 +1021,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/ExhibitStateUsage.cs b/SysML2.NET/Core/AutoGenPoco/ExhibitStateUsage.cs index 07711f5bc..5445368fc 100644 --- a/SysML2.NET/Core/AutoGenPoco/ExhibitStateUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ExhibitStateUsage.cs @@ -60,6 +60,7 @@ namespace SysML2.NET.Core.POCO.Systems.States using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -70,8 +71,19 @@ namespace SysML2.NET.Core.POCO.Systems.States /// [Class(xmiId: "_19_0_2_12e503d9_1577070975739_684062_203", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ExhibitStateUsage : IExhibitStateUsage + public partial class ExhibitStateUsage : IExhibitStateUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public ExhibitStateUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -973,7 +985,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1072,7 +1087,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/Expression.cs b/SysML2.NET/Core/AutoGenPoco/Expression.cs index 73fd993c5..c3ce9a63e 100644 --- a/SysML2.NET/Core/AutoGenPoco/Expression.cs +++ b/SysML2.NET/Core/AutoGenPoco/Expression.cs @@ -36,6 +36,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Functions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -47,8 +48,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Functions /// [Class(xmiId: "_18_5_3_12e503d9_1533160651686_908654_42163", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Expression : IExpression + public partial class Expression : IExpression, IContainedElement { + /// + /// Initialize a new instance of + /// + public Expression() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -595,7 +607,10 @@ public partial class Expression : IExpression [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -686,7 +701,10 @@ public partial class Expression : IExpression [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/Feature.cs b/SysML2.NET/Core/AutoGenPoco/Feature.cs index c39efa361..3605254ce 100644 --- a/SysML2.NET/Core/AutoGenPoco/Feature.cs +++ b/SysML2.NET/Core/AutoGenPoco/Feature.cs @@ -34,6 +34,7 @@ namespace SysML2.NET.Core.POCO.Core.Features using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -56,8 +57,19 @@ namespace SysML2.NET.Core.POCO.Core.Features /// [Class(xmiId: "_18_5_3_12e503d9_1533160651684_893483_42160", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Feature : IFeature + public partial class Feature : IFeature, IContainedElement { + /// + /// Initialize a new instance of + /// + public Feature() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -578,7 +590,10 @@ public partial class Feature : IFeature [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -669,7 +684,10 @@ public partial class Feature : IFeature [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/FeatureChainExpression.cs b/SysML2.NET/Core/AutoGenPoco/FeatureChainExpression.cs index a652afe05..d425cc618 100644 --- a/SysML2.NET/Core/AutoGenPoco/FeatureChainExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/FeatureChainExpression.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -46,8 +47,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions /// [Class(xmiId: "_19_0_4_12e503d9_1645049764787_93967_15", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class FeatureChainExpression : IFeatureChainExpression + public partial class FeatureChainExpression : IFeatureChainExpression, IContainedElement { + /// + /// Initialize a new instance of + /// + public FeatureChainExpression() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -635,7 +647,10 @@ string IOperatorExpression.Operator [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -726,7 +741,10 @@ string IOperatorExpression.Operator [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/FeatureChaining.cs b/SysML2.NET/Core/AutoGenPoco/FeatureChaining.cs index f54cff681..9d636eb61 100644 --- a/SysML2.NET/Core/AutoGenPoco/FeatureChaining.cs +++ b/SysML2.NET/Core/AutoGenPoco/FeatureChaining.cs @@ -32,6 +32,7 @@ namespace SysML2.NET.Core.POCO.Core.Features using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -40,8 +41,23 @@ namespace SysML2.NET.Core.POCO.Core.Features /// [Class(xmiId: "_19_0_4_b9102da_1622124560789_965972_39", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class FeatureChaining : IFeatureChaining + public partial class FeatureChaining : IFeatureChaining, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public FeatureChaining() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -169,7 +185,10 @@ public partial class FeatureChaining : IFeatureChaining [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -177,7 +196,10 @@ public partial class FeatureChaining : IFeatureChaining [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -211,7 +233,10 @@ public partial class FeatureChaining : IFeatureChaining [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -219,7 +244,10 @@ public partial class FeatureChaining : IFeatureChaining [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/FeatureInverting.cs b/SysML2.NET/Core/AutoGenPoco/FeatureInverting.cs index d468cef9b..523fc0c28 100644 --- a/SysML2.NET/Core/AutoGenPoco/FeatureInverting.cs +++ b/SysML2.NET/Core/AutoGenPoco/FeatureInverting.cs @@ -32,6 +32,7 @@ namespace SysML2.NET.Core.POCO.Core.Features using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -43,8 +44,23 @@ namespace SysML2.NET.Core.POCO.Core.Features /// [Class(xmiId: "_19_0_4_b9102da_1623178487957_761743_77", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class FeatureInverting : IFeatureInverting + public partial class FeatureInverting : IFeatureInverting, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public FeatureInverting() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -169,7 +185,10 @@ public partial class FeatureInverting : IFeatureInverting [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -177,7 +196,10 @@ public partial class FeatureInverting : IFeatureInverting [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -220,7 +242,10 @@ public partial class FeatureInverting : IFeatureInverting [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -228,7 +253,10 @@ public partial class FeatureInverting : IFeatureInverting [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/FeatureMembership.cs b/SysML2.NET/Core/AutoGenPoco/FeatureMembership.cs index 049a2af3c..b63ebd661 100644 --- a/SysML2.NET/Core/AutoGenPoco/FeatureMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/FeatureMembership.cs @@ -34,6 +34,7 @@ namespace SysML2.NET.Core.POCO.Core.Types using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,23 @@ namespace SysML2.NET.Core.POCO.Core.Types /// [Class(xmiId: "_18_5_3_12e503d9_1533160651715_740575_42237", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class FeatureMembership : IFeatureMembership + public partial class FeatureMembership : IFeatureMembership, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public FeatureMembership() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -255,7 +271,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -263,7 +282,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -297,7 +319,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -305,7 +330,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that owns this FeatureMembership. diff --git a/SysML2.NET/Core/AutoGenPoco/FeatureReferenceExpression.cs b/SysML2.NET/Core/AutoGenPoco/FeatureReferenceExpression.cs index 9b5987c3b..15decb3dd 100644 --- a/SysML2.NET/Core/AutoGenPoco/FeatureReferenceExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/FeatureReferenceExpression.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -44,8 +45,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions /// [Class(xmiId: "_18_5_3_12e503d9_1533160651680_105632_42151", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class FeatureReferenceExpression : IFeatureReferenceExpression + public partial class FeatureReferenceExpression : IFeatureReferenceExpression, IContainedElement { + /// + /// Initialize a new instance of + /// + public FeatureReferenceExpression() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -592,7 +604,10 @@ public partial class FeatureReferenceExpression : IFeatureReferenceExpression [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -683,7 +698,10 @@ public partial class FeatureReferenceExpression : IFeatureReferenceExpression [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/FeatureTyping.cs b/SysML2.NET/Core/AutoGenPoco/FeatureTyping.cs index 0cf080320..7025fb39c 100644 --- a/SysML2.NET/Core/AutoGenPoco/FeatureTyping.cs +++ b/SysML2.NET/Core/AutoGenPoco/FeatureTyping.cs @@ -33,6 +33,7 @@ namespace SysML2.NET.Core.POCO.Core.Features using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -43,8 +44,23 @@ namespace SysML2.NET.Core.POCO.Core.Features /// [Class(xmiId: "_18_5_3_12e503d9_1543180339807_437641_20928", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class FeatureTyping : IFeatureTyping + public partial class FeatureTyping : IFeatureTyping, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public FeatureTyping() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -169,7 +185,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -177,7 +196,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -220,7 +242,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -228,7 +253,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the specific Type of this Specialization and owns it as its owningRelatedElement. diff --git a/SysML2.NET/Core/AutoGenPoco/FeatureValue.cs b/SysML2.NET/Core/AutoGenPoco/FeatureValue.cs index 038a14f39..9b8ebde85 100644 --- a/SysML2.NET/Core/AutoGenPoco/FeatureValue.cs +++ b/SysML2.NET/Core/AutoGenPoco/FeatureValue.cs @@ -35,6 +35,7 @@ namespace SysML2.NET.Core.POCO.Kernel.FeatureValues using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -52,8 +53,23 @@ namespace SysML2.NET.Core.POCO.Kernel.FeatureValues /// [Class(xmiId: "_18_5_3_12e503d9_1543180279304_499907_20659", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class FeatureValue : IFeatureValue + public partial class FeatureValue : IFeatureValue, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public FeatureValue() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -275,7 +291,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -283,7 +302,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -317,7 +339,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -325,7 +350,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/Flow.cs b/SysML2.NET/Core/AutoGenPoco/Flow.cs index 339a691e3..a14f3624d 100644 --- a/SysML2.NET/Core/AutoGenPoco/Flow.cs +++ b/SysML2.NET/Core/AutoGenPoco/Flow.cs @@ -39,6 +39,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Interactions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -47,8 +48,23 @@ namespace SysML2.NET.Core.POCO.Kernel.Interactions /// [Class(xmiId: "_18_5_3_b9102da_1536869417406_861526_17744", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Flow : IFlow + public partial class Flow : IFlow, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public Flow() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + } + /// /// Gets or sets the unique identifier /// @@ -634,7 +650,10 @@ public partial class Flow : IFlow [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -642,7 +661,10 @@ public partial class Flow : IFlow [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -733,7 +755,10 @@ public partial class Flow : IFlow [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -741,7 +766,10 @@ public partial class Flow : IFlow [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/FlowDefinition.cs b/SysML2.NET/Core/AutoGenPoco/FlowDefinition.cs index d4170c794..461359264 100644 --- a/SysML2.NET/Core/AutoGenPoco/FlowDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/FlowDefinition.cs @@ -59,6 +59,7 @@ namespace SysML2.NET.Core.POCO.Systems.Flows using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -67,8 +68,23 @@ namespace SysML2.NET.Core.POCO.Systems.Flows /// [Class(xmiId: "_19_0_4_12e503d9_1661892471095_470217_5", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class FlowDefinition : IFlowDefinition + public partial class FlowDefinition : IFlowDefinition, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public FlowDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + } + /// /// Gets or sets the unique identifier /// @@ -624,7 +640,10 @@ public partial class FlowDefinition : IFlowDefinition [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -632,7 +651,10 @@ public partial class FlowDefinition : IFlowDefinition [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -766,7 +788,10 @@ public partial class FlowDefinition : IFlowDefinition [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -774,7 +799,10 @@ public partial class FlowDefinition : IFlowDefinition [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The parameters of this Behavior, which are defined as its directedFeatures, whose values are passed diff --git a/SysML2.NET/Core/AutoGenPoco/FlowEnd.cs b/SysML2.NET/Core/AutoGenPoco/FlowEnd.cs index 92c77f665..77c4f9d78 100644 --- a/SysML2.NET/Core/AutoGenPoco/FlowEnd.cs +++ b/SysML2.NET/Core/AutoGenPoco/FlowEnd.cs @@ -35,6 +35,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Interactions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Interactions /// [Class(xmiId: "_18_5_3_12e503d9_1563219035000_53223_20571", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class FlowEnd : IFlowEnd + public partial class FlowEnd : IFlowEnd, IContainedElement { + /// + /// Initialize a new instance of + /// + public FlowEnd() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -567,7 +579,10 @@ public partial class FlowEnd : IFlowEnd [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -658,7 +673,10 @@ public partial class FlowEnd : IFlowEnd [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/FlowUsage.cs b/SysML2.NET/Core/AutoGenPoco/FlowUsage.cs index 1f19af976..e4a321281 100644 --- a/SysML2.NET/Core/AutoGenPoco/FlowUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/FlowUsage.cs @@ -63,6 +63,7 @@ namespace SysML2.NET.Core.POCO.Systems.Flows using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -70,8 +71,23 @@ namespace SysML2.NET.Core.POCO.Systems.Flows /// [Class(xmiId: "_19_0_4_12e503d9_1624054663096_771284_1274", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class FlowUsage : IFlowUsage + public partial class FlowUsage : IFlowUsage, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public FlowUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + } + /// /// Gets or sets the unique identifier /// @@ -974,7 +990,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -982,7 +1001,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1081,7 +1103,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -1089,7 +1114,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/ForLoopActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/ForLoopActionUsage.cs index 6d4e99076..8a9d04287 100644 --- a/SysML2.NET/Core/AutoGenPoco/ForLoopActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ForLoopActionUsage.cs @@ -61,6 +61,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -70,8 +71,19 @@ namespace SysML2.NET.Core.POCO.Systems.Actions /// [Class(xmiId: "_19_0_4_12e503d9_1624306893649_489444_5711", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ForLoopActionUsage : IForLoopActionUsage + public partial class ForLoopActionUsage : IForLoopActionUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public ForLoopActionUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -925,7 +937,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1024,7 +1039,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/ForkNode.cs b/SysML2.NET/Core/AutoGenPoco/ForkNode.cs index 6ed3e4659..ffcc27bb0 100644 --- a/SysML2.NET/Core/AutoGenPoco/ForkNode.cs +++ b/SysML2.NET/Core/AutoGenPoco/ForkNode.cs @@ -60,6 +60,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -68,8 +69,19 @@ namespace SysML2.NET.Core.POCO.Systems.Actions /// [Class(xmiId: "_18_5_3_12e503d9_1565503181274_818459_33629", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ForkNode : IForkNode + public partial class ForkNode : IForkNode, IContainedElement { + /// + /// Initialize a new instance of + /// + public ForkNode() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -906,7 +918,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1005,7 +1020,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/FramedConcernMembership.cs b/SysML2.NET/Core/AutoGenPoco/FramedConcernMembership.cs index 40cbf50c7..d1837bef6 100644 --- a/SysML2.NET/Core/AutoGenPoco/FramedConcernMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/FramedConcernMembership.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; using SysML2.NET.Core.POCO.Systems.Constraints; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,23 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements /// [Class(xmiId: "_19_0_4_12e503d9_1617120429499_126250_3667", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class FramedConcernMembership : IFramedConcernMembership + public partial class FramedConcernMembership : IFramedConcernMembership, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public FramedConcernMembership() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -296,7 +312,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -304,7 +323,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -338,7 +360,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -346,7 +371,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that owns this FeatureMembership. diff --git a/SysML2.NET/Core/AutoGenPoco/Function.cs b/SysML2.NET/Core/AutoGenPoco/Function.cs index 676d1ea5c..964451c62 100644 --- a/SysML2.NET/Core/AutoGenPoco/Function.cs +++ b/SysML2.NET/Core/AutoGenPoco/Function.cs @@ -36,6 +36,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Functions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Functions /// [Class(xmiId: "_18_5_3_12e503d9_1533160651697_513473_42183", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Function : IFunction + public partial class Function : IFunction, IContainedElement { + /// + /// Initialize a new instance of + /// + public Function() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -415,7 +427,10 @@ public partial class Function : IFunction [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -477,7 +492,10 @@ public partial class Function : IFunction [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The parameters of this Behavior, which are defined as its directedFeatures, whose values are passed diff --git a/SysML2.NET/Core/AutoGenPoco/IElement.cs b/SysML2.NET/Core/AutoGenPoco/IElement.cs index e5764bebc..fb71530fd 100644 --- a/SysML2.NET/Core/AutoGenPoco/IElement.cs +++ b/SysML2.NET/Core/AutoGenPoco/IElement.cs @@ -124,7 +124,7 @@ public partial interface IElement /// [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] - List OwnedRelationship { get; set; } + IReadOnlyCollection OwnedRelationship { get; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -154,7 +154,7 @@ public partial interface IElement /// [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] - IRelationship OwningRelationship { get; set; } + IRelationship OwningRelationship { get; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/IRelationship.cs b/SysML2.NET/Core/AutoGenPoco/IRelationship.cs index c896e102f..720b0d4a1 100644 --- a/SysML2.NET/Core/AutoGenPoco/IRelationship.cs +++ b/SysML2.NET/Core/AutoGenPoco/IRelationship.cs @@ -62,14 +62,14 @@ public partial interface IRelationship : IElement /// [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] - List OwnedRelatedElement { get; set; } + IReadOnlyCollection OwnedRelatedElement { get; } /// /// The relatedElement of this Relationship that owns the Relationship, if any. /// [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] - IElement OwningRelatedElement { get; set; } + IElement OwningRelatedElement { get; } /// /// The Elements that are related by this Relationship, derived as the union of the source and target diff --git a/SysML2.NET/Core/AutoGenPoco/IfActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/IfActionUsage.cs index 97679bf04..4a93b3da5 100644 --- a/SysML2.NET/Core/AutoGenPoco/IfActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IfActionUsage.cs @@ -61,6 +61,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -70,8 +71,19 @@ namespace SysML2.NET.Core.POCO.Systems.Actions /// [Class(xmiId: "_19_0_4_12e503d9_1624203546797_456808_3484", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class IfActionUsage : IIfActionUsage + public partial class IfActionUsage : IIfActionUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public IfActionUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -924,7 +936,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1023,7 +1038,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/IncludeUseCaseUsage.cs b/SysML2.NET/Core/AutoGenPoco/IncludeUseCaseUsage.cs index ed6c9c053..04baef2a2 100644 --- a/SysML2.NET/Core/AutoGenPoco/IncludeUseCaseUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IncludeUseCaseUsage.cs @@ -61,6 +61,7 @@ namespace SysML2.NET.Core.POCO.Systems.UseCases using SysML2.NET.Core.POCO.Systems.States; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -71,8 +72,19 @@ namespace SysML2.NET.Core.POCO.Systems.UseCases /// [Class(xmiId: "_19_0_4_12e503d9_1621532125543_31659_1117", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class IncludeUseCaseUsage : IIncludeUseCaseUsage + public partial class IncludeUseCaseUsage : IIncludeUseCaseUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public IncludeUseCaseUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -989,7 +1001,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1088,7 +1103,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/IndexExpression.cs b/SysML2.NET/Core/AutoGenPoco/IndexExpression.cs index adbec97ba..ee4c1480f 100644 --- a/SysML2.NET/Core/AutoGenPoco/IndexExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/IndexExpression.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions /// [Class(xmiId: "_2022x_2_12e503d9_1735075421524_242675_323", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class IndexExpression : IIndexExpression + public partial class IndexExpression : IIndexExpression, IContainedElement { + /// + /// Initialize a new instance of + /// + public IndexExpression() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -634,7 +646,10 @@ string IOperatorExpression.Operator [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -725,7 +740,10 @@ string IOperatorExpression.Operator [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/Interaction.cs b/SysML2.NET/Core/AutoGenPoco/Interaction.cs index 7888a772e..e324cfcbb 100644 --- a/SysML2.NET/Core/AutoGenPoco/Interaction.cs +++ b/SysML2.NET/Core/AutoGenPoco/Interaction.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Interactions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,23 @@ namespace SysML2.NET.Core.POCO.Kernel.Interactions /// [Class(xmiId: "_18_5_3_b9102da_1536782424772_574530_21292", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Interaction : IInteraction + public partial class Interaction : IInteraction, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public Interaction() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + } + /// /// Gets or sets the unique identifier /// @@ -415,7 +431,10 @@ public partial class Interaction : IInteraction [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -423,7 +442,10 @@ public partial class Interaction : IInteraction [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -485,7 +507,10 @@ public partial class Interaction : IInteraction [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -493,7 +518,10 @@ public partial class Interaction : IInteraction [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The parameters of this Behavior, which are defined as its directedFeatures, whose values are passed diff --git a/SysML2.NET/Core/AutoGenPoco/InterfaceDefinition.cs b/SysML2.NET/Core/AutoGenPoco/InterfaceDefinition.cs index 53074ff9e..3c1be3fb6 100644 --- a/SysML2.NET/Core/AutoGenPoco/InterfaceDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/InterfaceDefinition.cs @@ -57,6 +57,7 @@ namespace SysML2.NET.Core.POCO.Systems.Interfaces using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -65,8 +66,23 @@ namespace SysML2.NET.Core.POCO.Systems.Interfaces /// [Class(xmiId: "_18_5_3_12e503d9_1565496029896_966800_26573", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class InterfaceDefinition : IInterfaceDefinition + public partial class InterfaceDefinition : IInterfaceDefinition, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public InterfaceDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + } + /// /// Gets or sets the unique identifier /// @@ -637,7 +653,10 @@ bool Core.Types.IType.IsSufficient [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -645,7 +664,10 @@ bool Core.Types.IType.IsSufficient [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -779,7 +801,10 @@ bool Core.Types.IType.IsSufficient [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -787,7 +812,10 @@ bool Core.Types.IType.IsSufficient [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/InterfaceUsage.cs b/SysML2.NET/Core/AutoGenPoco/InterfaceUsage.cs index 633a77b70..93261304c 100644 --- a/SysML2.NET/Core/AutoGenPoco/InterfaceUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/InterfaceUsage.cs @@ -62,6 +62,7 @@ namespace SysML2.NET.Core.POCO.Systems.Interfaces using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -70,8 +71,23 @@ namespace SysML2.NET.Core.POCO.Systems.Interfaces /// [Class(xmiId: "_18_5_3_12e503d9_1565498940266_617738_28508", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class InterfaceUsage : IInterfaceUsage + public partial class InterfaceUsage : IInterfaceUsage, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public InterfaceUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + } + /// /// Gets or sets the unique identifier /// @@ -955,7 +971,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -963,7 +982,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1062,7 +1084,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -1070,7 +1095,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/Intersecting.cs b/SysML2.NET/Core/AutoGenPoco/Intersecting.cs index 24076e145..1fa421e52 100644 --- a/SysML2.NET/Core/AutoGenPoco/Intersecting.cs +++ b/SysML2.NET/Core/AutoGenPoco/Intersecting.cs @@ -32,6 +32,7 @@ namespace SysML2.NET.Core.POCO.Core.Types using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -40,8 +41,23 @@ namespace SysML2.NET.Core.POCO.Core.Types /// [Class(xmiId: "_19_0_4_b9102da_1623187351831_706169_90", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Intersecting : IIntersecting + public partial class Intersecting : IIntersecting, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public Intersecting() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -159,7 +175,10 @@ public partial class Intersecting : IIntersecting [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -167,7 +186,10 @@ public partial class Intersecting : IIntersecting [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -201,7 +223,10 @@ public partial class Intersecting : IIntersecting [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -209,7 +234,10 @@ public partial class Intersecting : IIntersecting [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/Invariant.cs b/SysML2.NET/Core/AutoGenPoco/Invariant.cs index 7d05b966a..df73b3ae2 100644 --- a/SysML2.NET/Core/AutoGenPoco/Invariant.cs +++ b/SysML2.NET/Core/AutoGenPoco/Invariant.cs @@ -36,6 +36,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Functions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Functions /// [Class(xmiId: "_19_0_2_12e503d9_1578025014367_499614_936", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Invariant : IInvariant + public partial class Invariant : IInvariant, IContainedElement { + /// + /// Initialize a new instance of + /// + public Invariant() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -601,7 +613,10 @@ public partial class Invariant : IInvariant [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -692,7 +707,10 @@ public partial class Invariant : IInvariant [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/InvocationExpression.cs b/SysML2.NET/Core/AutoGenPoco/InvocationExpression.cs index d8b5b4627..5863507eb 100644 --- a/SysML2.NET/Core/AutoGenPoco/InvocationExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/InvocationExpression.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -49,8 +50,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions /// [Class(xmiId: "_18_5_3_12e503d9_1557528671608_638869_111563", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class InvocationExpression : IInvocationExpression + public partial class InvocationExpression : IInvocationExpression, IContainedElement { + /// + /// Initialize a new instance of + /// + public InvocationExpression() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -615,7 +627,10 @@ public partial class InvocationExpression : IInvocationExpression [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -706,7 +721,10 @@ public partial class InvocationExpression : IInvocationExpression [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/ItemDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ItemDefinition.cs index 0f9d2663c..6ba92cd0e 100644 --- a/SysML2.NET/Core/AutoGenPoco/ItemDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ItemDefinition.cs @@ -57,6 +57,7 @@ namespace SysML2.NET.Core.POCO.Systems.Items using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -67,8 +68,19 @@ namespace SysML2.NET.Core.POCO.Systems.Items /// [Class(xmiId: "_19_0_2_12e503d9_1591216581238_805702_84", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ItemDefinition : IItemDefinition + public partial class ItemDefinition : IItemDefinition, IContainedElement { + /// + /// Initialize a new instance of + /// + public ItemDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -586,7 +598,10 @@ public partial class ItemDefinition : IItemDefinition [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -720,7 +735,10 @@ public partial class ItemDefinition : IItemDefinition [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/ItemUsage.cs b/SysML2.NET/Core/AutoGenPoco/ItemUsage.cs index c84ef7f5a..93e7ea590 100644 --- a/SysML2.NET/Core/AutoGenPoco/ItemUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ItemUsage.cs @@ -60,6 +60,7 @@ namespace SysML2.NET.Core.POCO.Systems.Items using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -70,8 +71,19 @@ namespace SysML2.NET.Core.POCO.Systems.Items /// [Class(xmiId: "_18_5_3_12e503d9_1565480460114_846184_24270", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ItemUsage : IItemUsage + public partial class ItemUsage : IItemUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public ItemUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -898,7 +910,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -997,7 +1012,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/JoinNode.cs b/SysML2.NET/Core/AutoGenPoco/JoinNode.cs index bcf69e66b..e190d751f 100644 --- a/SysML2.NET/Core/AutoGenPoco/JoinNode.cs +++ b/SysML2.NET/Core/AutoGenPoco/JoinNode.cs @@ -60,6 +60,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -68,8 +69,19 @@ namespace SysML2.NET.Core.POCO.Systems.Actions /// [Class(xmiId: "_18_5_3_12e503d9_1565503134270_392089_33594", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class JoinNode : IJoinNode + public partial class JoinNode : IJoinNode, IContainedElement { + /// + /// Initialize a new instance of + /// + public JoinNode() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -906,7 +918,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1005,7 +1020,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/LibraryPackage.cs b/SysML2.NET/Core/AutoGenPoco/LibraryPackage.cs index 90d6930cc..e78caedc0 100644 --- a/SysML2.NET/Core/AutoGenPoco/LibraryPackage.cs +++ b/SysML2.NET/Core/AutoGenPoco/LibraryPackage.cs @@ -33,6 +33,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Packages using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -41,8 +42,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Packages /// [Class(xmiId: "_19_0_4_12e503d9_1665457931502_349175_779", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class LibraryPackage : ILibraryPackage + public partial class LibraryPackage : ILibraryPackage, IContainedElement { + /// + /// Initialize a new instance of + /// + public LibraryPackage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -215,7 +227,10 @@ public partial class LibraryPackage : ILibraryPackage [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -249,7 +264,10 @@ public partial class LibraryPackage : ILibraryPackage [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/LiteralBoolean.cs b/SysML2.NET/Core/AutoGenPoco/LiteralBoolean.cs index a88f6cc6a..75c438ba6 100644 --- a/SysML2.NET/Core/AutoGenPoco/LiteralBoolean.cs +++ b/SysML2.NET/Core/AutoGenPoco/LiteralBoolean.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions /// [Class(xmiId: "_18_5_3_12e503d9_1533160651699_96836_42187", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class LiteralBoolean : ILiteralBoolean + public partial class LiteralBoolean : ILiteralBoolean, IContainedElement { + /// + /// Initialize a new instance of + /// + public LiteralBoolean() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -593,7 +605,10 @@ public partial class LiteralBoolean : ILiteralBoolean [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -684,7 +699,10 @@ public partial class LiteralBoolean : ILiteralBoolean [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/LiteralExpression.cs b/SysML2.NET/Core/AutoGenPoco/LiteralExpression.cs index 24cc5b2cc..e19664943 100644 --- a/SysML2.NET/Core/AutoGenPoco/LiteralExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/LiteralExpression.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -44,8 +45,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions /// [Class(xmiId: "_18_5_3_12e503d9_1533160651688_624289_42165", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class LiteralExpression : ILiteralExpression + public partial class LiteralExpression : ILiteralExpression, IContainedElement { + /// + /// Initialize a new instance of + /// + public LiteralExpression() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -592,7 +604,10 @@ public partial class LiteralExpression : ILiteralExpression [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -683,7 +698,10 @@ public partial class LiteralExpression : ILiteralExpression [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/LiteralInfinity.cs b/SysML2.NET/Core/AutoGenPoco/LiteralInfinity.cs index 4455af014..98a38dfd4 100644 --- a/SysML2.NET/Core/AutoGenPoco/LiteralInfinity.cs +++ b/SysML2.NET/Core/AutoGenPoco/LiteralInfinity.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions /// [Class(xmiId: "_18_5_3_12e503d9_1533160651697_757989_42184", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class LiteralInfinity : ILiteralInfinity + public partial class LiteralInfinity : ILiteralInfinity, IContainedElement { + /// + /// Initialize a new instance of + /// + public LiteralInfinity() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -593,7 +605,10 @@ public partial class LiteralInfinity : ILiteralInfinity [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -684,7 +699,10 @@ public partial class LiteralInfinity : ILiteralInfinity [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/LiteralInteger.cs b/SysML2.NET/Core/AutoGenPoco/LiteralInteger.cs index 26c9d9da8..33c8de5ef 100644 --- a/SysML2.NET/Core/AutoGenPoco/LiteralInteger.cs +++ b/SysML2.NET/Core/AutoGenPoco/LiteralInteger.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions /// [Class(xmiId: "_18_5_3_12e503d9_1533160651681_567347_42153", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class LiteralInteger : ILiteralInteger + public partial class LiteralInteger : ILiteralInteger, IContainedElement { + /// + /// Initialize a new instance of + /// + public LiteralInteger() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -593,7 +605,10 @@ public partial class LiteralInteger : ILiteralInteger [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -684,7 +699,10 @@ public partial class LiteralInteger : ILiteralInteger [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/LiteralRational.cs b/SysML2.NET/Core/AutoGenPoco/LiteralRational.cs index 05e57b9f3..07e5d233f 100644 --- a/SysML2.NET/Core/AutoGenPoco/LiteralRational.cs +++ b/SysML2.NET/Core/AutoGenPoco/LiteralRational.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions /// [Class(xmiId: "_18_5_3_12e503d9_1533160651706_235283_42203", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class LiteralRational : ILiteralRational + public partial class LiteralRational : ILiteralRational, IContainedElement { + /// + /// Initialize a new instance of + /// + public LiteralRational() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -593,7 +605,10 @@ public partial class LiteralRational : ILiteralRational [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -684,7 +699,10 @@ public partial class LiteralRational : ILiteralRational [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/LiteralString.cs b/SysML2.NET/Core/AutoGenPoco/LiteralString.cs index c4bbcc7c9..5b32f3887 100644 --- a/SysML2.NET/Core/AutoGenPoco/LiteralString.cs +++ b/SysML2.NET/Core/AutoGenPoco/LiteralString.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions /// [Class(xmiId: "_18_5_3_12e503d9_1533160651701_975433_42193", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class LiteralString : ILiteralString + public partial class LiteralString : ILiteralString, IContainedElement { + /// + /// Initialize a new instance of + /// + public LiteralString() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -593,7 +605,10 @@ public partial class LiteralString : ILiteralString [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -684,7 +699,10 @@ public partial class LiteralString : ILiteralString [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/Membership.cs b/SysML2.NET/Core/AutoGenPoco/Membership.cs index 090fa8c1f..b8ca83fef 100644 --- a/SysML2.NET/Core/AutoGenPoco/Membership.cs +++ b/SysML2.NET/Core/AutoGenPoco/Membership.cs @@ -32,6 +32,7 @@ namespace SysML2.NET.Core.POCO.Root.Namespaces using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -46,8 +47,23 @@ namespace SysML2.NET.Core.POCO.Root.Namespaces /// [Class(xmiId: "_18_5_3_12e503d9_1533160651680_888716_42152", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Membership : IMembership + public partial class Membership : IMembership, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public Membership() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -195,7 +211,10 @@ public partial class Membership : IMembership [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -203,7 +222,10 @@ public partial class Membership : IMembership [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -237,7 +259,10 @@ public partial class Membership : IMembership [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -245,7 +270,10 @@ public partial class Membership : IMembership [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/MembershipExpose.cs b/SysML2.NET/Core/AutoGenPoco/MembershipExpose.cs index bf3fdd3b2..f8ffc2f7c 100644 --- a/SysML2.NET/Core/AutoGenPoco/MembershipExpose.cs +++ b/SysML2.NET/Core/AutoGenPoco/MembershipExpose.cs @@ -33,6 +33,7 @@ namespace SysML2.NET.Core.POCO.Systems.Views using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -41,8 +42,23 @@ namespace SysML2.NET.Core.POCO.Systems.Views /// [Class(xmiId: "_19_0_4_12e503d9_1668805350620_499865_159", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class MembershipExpose : IMembershipExpose + public partial class MembershipExpose : IMembershipExpose, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public MembershipExpose() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -207,7 +223,10 @@ bool Root.Namespaces.IImport.IsImportAll [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -215,7 +234,10 @@ bool Root.Namespaces.IImport.IsImportAll [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -249,7 +271,10 @@ bool Root.Namespaces.IImport.IsImportAll [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -257,7 +282,10 @@ bool Root.Namespaces.IImport.IsImportAll [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/MembershipImport.cs b/SysML2.NET/Core/AutoGenPoco/MembershipImport.cs index 085456366..965dde49f 100644 --- a/SysML2.NET/Core/AutoGenPoco/MembershipImport.cs +++ b/SysML2.NET/Core/AutoGenPoco/MembershipImport.cs @@ -32,6 +32,7 @@ namespace SysML2.NET.Core.POCO.Root.Namespaces using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -41,8 +42,23 @@ namespace SysML2.NET.Core.POCO.Root.Namespaces /// [Class(xmiId: "_19_0_4_12e503d9_1668208086726_425885_108", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class MembershipImport : IMembershipImport + public partial class MembershipImport : IMembershipImport, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public MembershipImport() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -191,7 +207,10 @@ public partial class MembershipImport : IMembershipImport [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -199,7 +218,10 @@ public partial class MembershipImport : IMembershipImport [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -233,7 +255,10 @@ public partial class MembershipImport : IMembershipImport [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -241,7 +266,10 @@ public partial class MembershipImport : IMembershipImport [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/MergeNode.cs b/SysML2.NET/Core/AutoGenPoco/MergeNode.cs index 2c04bda30..0b1ec15c5 100644 --- a/SysML2.NET/Core/AutoGenPoco/MergeNode.cs +++ b/SysML2.NET/Core/AutoGenPoco/MergeNode.cs @@ -60,6 +60,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -68,8 +69,19 @@ namespace SysML2.NET.Core.POCO.Systems.Actions /// [Class(xmiId: "_18_5_3_12e503d9_1565503106899_225416_33510", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class MergeNode : IMergeNode + public partial class MergeNode : IMergeNode, IContainedElement { + /// + /// Initialize a new instance of + /// + public MergeNode() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -906,7 +918,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1005,7 +1020,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/Metaclass.cs b/SysML2.NET/Core/AutoGenPoco/Metaclass.cs index 2d7f9d432..5f9ff69ea 100644 --- a/SysML2.NET/Core/AutoGenPoco/Metaclass.cs +++ b/SysML2.NET/Core/AutoGenPoco/Metaclass.cs @@ -36,6 +36,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Metadata using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -43,8 +44,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Metadata /// [Class(xmiId: "_19_0_4_12e503d9_1645120910786_720932_39", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Metaclass : IMetaclass + public partial class Metaclass : IMetaclass, IContainedElement { + /// + /// Initialize a new instance of + /// + public Metaclass() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -393,7 +405,10 @@ public partial class Metaclass : IMetaclass [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -455,7 +470,10 @@ public partial class Metaclass : IMetaclass [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/MetadataAccessExpression.cs b/SysML2.NET/Core/AutoGenPoco/MetadataAccessExpression.cs index 0dfcd7d29..eb2551c1d 100644 --- a/SysML2.NET/Core/AutoGenPoco/MetadataAccessExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/MetadataAccessExpression.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -47,8 +48,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions /// [Class(xmiId: "_19_0_4_12e503d9_1665514023745_516216_1215", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class MetadataAccessExpression : IMetadataAccessExpression + public partial class MetadataAccessExpression : IMetadataAccessExpression, IContainedElement { + /// + /// Initialize a new instance of + /// + public MetadataAccessExpression() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -595,7 +607,10 @@ public partial class MetadataAccessExpression : IMetadataAccessExpression [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -686,7 +701,10 @@ public partial class MetadataAccessExpression : IMetadataAccessExpression [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/MetadataDefinition.cs b/SysML2.NET/Core/AutoGenPoco/MetadataDefinition.cs index 1a995f6fc..faf9afbb4 100644 --- a/SysML2.NET/Core/AutoGenPoco/MetadataDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/MetadataDefinition.cs @@ -57,6 +57,7 @@ namespace SysML2.NET.Core.POCO.Systems.Metadata using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -64,8 +65,19 @@ namespace SysML2.NET.Core.POCO.Systems.Metadata /// [Class(xmiId: "_19_0_4_12e503d9_1645121454429_912244_371", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class MetadataDefinition : IMetadataDefinition + public partial class MetadataDefinition : IMetadataDefinition, IContainedElement { + /// + /// Initialize a new instance of + /// + public MetadataDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -583,7 +595,10 @@ public partial class MetadataDefinition : IMetadataDefinition [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -717,7 +732,10 @@ public partial class MetadataDefinition : IMetadataDefinition [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/MetadataFeature.cs b/SysML2.NET/Core/AutoGenPoco/MetadataFeature.cs index 7aee699bd..452c47df6 100644 --- a/SysML2.NET/Core/AutoGenPoco/MetadataFeature.cs +++ b/SysML2.NET/Core/AutoGenPoco/MetadataFeature.cs @@ -35,6 +35,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Metadata using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -44,8 +45,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Metadata /// [Class(xmiId: "_19_0_4_12e503d9_1606345563822_968574_178", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class MetadataFeature : IMetadataFeature + public partial class MetadataFeature : IMetadataFeature, IContainedElement { + /// + /// Initialize a new instance of + /// + public MetadataFeature() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -602,7 +614,10 @@ public partial class MetadataFeature : IMetadataFeature [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -702,7 +717,10 @@ public partial class MetadataFeature : IMetadataFeature [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/MetadataUsage.cs b/SysML2.NET/Core/AutoGenPoco/MetadataUsage.cs index 36c5ca613..c31458ae0 100644 --- a/SysML2.NET/Core/AutoGenPoco/MetadataUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/MetadataUsage.cs @@ -61,6 +61,7 @@ namespace SysML2.NET.Core.POCO.Systems.Metadata using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -71,8 +72,19 @@ namespace SysML2.NET.Core.POCO.Systems.Metadata /// [Class(xmiId: "_19_0_4_12e503d9_1645121476406_921183_398", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class MetadataUsage : IMetadataUsage + public partial class MetadataUsage : IMetadataUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public MetadataUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -944,7 +956,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1052,7 +1067,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/Multiplicity.cs b/SysML2.NET/Core/AutoGenPoco/Multiplicity.cs index 51f39b0f9..12d888734 100644 --- a/SysML2.NET/Core/AutoGenPoco/Multiplicity.cs +++ b/SysML2.NET/Core/AutoGenPoco/Multiplicity.cs @@ -34,6 +34,7 @@ namespace SysML2.NET.Core.POCO.Core.Types using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -53,8 +54,19 @@ namespace SysML2.NET.Core.POCO.Core.Types /// [Class(xmiId: "_19_0_2_12e503d9_1573083797505_495205_3879", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Multiplicity : IMultiplicity + public partial class Multiplicity : IMultiplicity, IContainedElement { + /// + /// Initialize a new instance of + /// + public Multiplicity() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -575,7 +587,10 @@ public partial class Multiplicity : IMultiplicity [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -666,7 +681,10 @@ public partial class Multiplicity : IMultiplicity [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/MultiplicityRange.cs b/SysML2.NET/Core/AutoGenPoco/MultiplicityRange.cs index 4a1adabfb..0aca305fc 100644 --- a/SysML2.NET/Core/AutoGenPoco/MultiplicityRange.cs +++ b/SysML2.NET/Core/AutoGenPoco/MultiplicityRange.cs @@ -36,6 +36,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Multiplicities using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -49,8 +50,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Multiplicities /// [Class(xmiId: "_19_0_2_12e503d9_1573086225407_540120_4572", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class MultiplicityRange : IMultiplicityRange + public partial class MultiplicityRange : IMultiplicityRange, IContainedElement { + /// + /// Initialize a new instance of + /// + public MultiplicityRange() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -590,7 +602,10 @@ public partial class MultiplicityRange : IMultiplicityRange [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -681,7 +696,10 @@ public partial class MultiplicityRange : IMultiplicityRange [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/Namespace.cs b/SysML2.NET/Core/AutoGenPoco/Namespace.cs index 0e5d39ab1..3ae60fc6d 100644 --- a/SysML2.NET/Core/AutoGenPoco/Namespace.cs +++ b/SysML2.NET/Core/AutoGenPoco/Namespace.cs @@ -31,6 +31,7 @@ namespace SysML2.NET.Core.POCO.Root.Namespaces using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -47,8 +48,19 @@ namespace SysML2.NET.Core.POCO.Root.Namespaces /// [Class(xmiId: "_18_5_3_12e503d9_1533160651694_110063_42176", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Namespace : INamespace + public partial class Namespace : INamespace, IContainedElement { + /// + /// Initialize a new instance of + /// + public Namespace() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -203,7 +215,10 @@ public partial class Namespace : INamespace [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -237,7 +252,10 @@ public partial class Namespace : INamespace [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/NamespaceExpose.cs b/SysML2.NET/Core/AutoGenPoco/NamespaceExpose.cs index 44699e132..16e109dac 100644 --- a/SysML2.NET/Core/AutoGenPoco/NamespaceExpose.cs +++ b/SysML2.NET/Core/AutoGenPoco/NamespaceExpose.cs @@ -33,6 +33,7 @@ namespace SysML2.NET.Core.POCO.Systems.Views using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -41,8 +42,23 @@ namespace SysML2.NET.Core.POCO.Systems.Views /// [Class(xmiId: "_19_0_4_12e503d9_1668805386737_851862_212", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class NamespaceExpose : INamespaceExpose + public partial class NamespaceExpose : INamespaceExpose, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public NamespaceExpose() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -207,7 +223,10 @@ bool Root.Namespaces.IImport.IsImportAll [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -215,7 +234,10 @@ bool Root.Namespaces.IImport.IsImportAll [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -249,7 +271,10 @@ bool Root.Namespaces.IImport.IsImportAll [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -257,7 +282,10 @@ bool Root.Namespaces.IImport.IsImportAll [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/NamespaceImport.cs b/SysML2.NET/Core/AutoGenPoco/NamespaceImport.cs index af18c1ddf..f23beda6e 100644 --- a/SysML2.NET/Core/AutoGenPoco/NamespaceImport.cs +++ b/SysML2.NET/Core/AutoGenPoco/NamespaceImport.cs @@ -32,6 +32,7 @@ namespace SysML2.NET.Core.POCO.Root.Namespaces using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -42,8 +43,23 @@ namespace SysML2.NET.Core.POCO.Root.Namespaces /// [Class(xmiId: "_19_0_4_12e503d9_1668208114894_902739_132", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class NamespaceImport : INamespaceImport + public partial class NamespaceImport : INamespaceImport, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public NamespaceImport() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -192,7 +208,10 @@ public partial class NamespaceImport : INamespaceImport [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -200,7 +219,10 @@ public partial class NamespaceImport : INamespaceImport [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -234,7 +256,10 @@ public partial class NamespaceImport : INamespaceImport [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -242,7 +267,10 @@ public partial class NamespaceImport : INamespaceImport [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/NullExpression.cs b/SysML2.NET/Core/AutoGenPoco/NullExpression.cs index 313b96ff1..a45574aa7 100644 --- a/SysML2.NET/Core/AutoGenPoco/NullExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/NullExpression.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -44,8 +45,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions /// [Class(xmiId: "_18_5_3_12e503d9_1533160651705_773974_42202", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class NullExpression : INullExpression + public partial class NullExpression : INullExpression, IContainedElement { + /// + /// Initialize a new instance of + /// + public NullExpression() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -592,7 +604,10 @@ public partial class NullExpression : INullExpression [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -683,7 +698,10 @@ public partial class NullExpression : INullExpression [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/ObjectiveMembership.cs b/SysML2.NET/Core/AutoGenPoco/ObjectiveMembership.cs index 04059cb62..42385f5c0 100644 --- a/SysML2.NET/Core/AutoGenPoco/ObjectiveMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/ObjectiveMembership.cs @@ -36,6 +36,7 @@ namespace SysML2.NET.Core.POCO.Systems.Cases using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; using SysML2.NET.Core.POCO.Systems.Requirements; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -44,8 +45,23 @@ namespace SysML2.NET.Core.POCO.Systems.Cases /// [Class(xmiId: "_19_0_2_59601fc_1590256849943_920466_400", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ObjectiveMembership : IObjectiveMembership + public partial class ObjectiveMembership : IObjectiveMembership, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public ObjectiveMembership() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -263,7 +279,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -271,7 +290,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -305,7 +327,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -313,7 +338,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that owns this FeatureMembership. diff --git a/SysML2.NET/Core/AutoGenPoco/OccurrenceDefinition.cs b/SysML2.NET/Core/AutoGenPoco/OccurrenceDefinition.cs index 78cfdc139..55c33537c 100644 --- a/SysML2.NET/Core/AutoGenPoco/OccurrenceDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/OccurrenceDefinition.cs @@ -57,6 +57,7 @@ namespace SysML2.NET.Core.POCO.Systems.Occurrences using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -67,8 +68,19 @@ namespace SysML2.NET.Core.POCO.Systems.Occurrences /// [Class(xmiId: "_19_0_4_12e503d9_1618943693347_790503_111", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class OccurrenceDefinition : IOccurrenceDefinition + public partial class OccurrenceDefinition : IOccurrenceDefinition, IContainedElement { + /// + /// Initialize a new instance of + /// + public OccurrenceDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -586,7 +598,10 @@ public partial class OccurrenceDefinition : IOccurrenceDefinition [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -720,7 +735,10 @@ public partial class OccurrenceDefinition : IOccurrenceDefinition [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/OccurrenceUsage.cs b/SysML2.NET/Core/AutoGenPoco/OccurrenceUsage.cs index aafd8bb0b..e7a9e46ea 100644 --- a/SysML2.NET/Core/AutoGenPoco/OccurrenceUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/OccurrenceUsage.cs @@ -59,6 +59,7 @@ namespace SysML2.NET.Core.POCO.Systems.Occurrences using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -69,8 +70,19 @@ namespace SysML2.NET.Core.POCO.Systems.Occurrences /// [Class(xmiId: "_19_0_4_12e503d9_1618943737195_33207_138", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class OccurrenceUsage : IOccurrenceUsage + public partial class OccurrenceUsage : IOccurrenceUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public OccurrenceUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -887,7 +899,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -986,7 +1001,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/OperatorExpression.cs b/SysML2.NET/Core/AutoGenPoco/OperatorExpression.cs index f26e95e8a..19cdb86d2 100644 --- a/SysML2.NET/Core/AutoGenPoco/OperatorExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/OperatorExpression.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions /// [Class(xmiId: "_18_5_3_12e503d9_1557528779746_71999_111623", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class OperatorExpression : IOperatorExpression + public partial class OperatorExpression : IOperatorExpression, IContainedElement { + /// + /// Initialize a new instance of + /// + public OperatorExpression() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -619,7 +631,10 @@ public partial class OperatorExpression : IOperatorExpression [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -710,7 +725,10 @@ public partial class OperatorExpression : IOperatorExpression [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/OwningMembership.cs b/SysML2.NET/Core/AutoGenPoco/OwningMembership.cs index db6766ccf..c13c594b3 100644 --- a/SysML2.NET/Core/AutoGenPoco/OwningMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/OwningMembership.cs @@ -32,6 +32,7 @@ namespace SysML2.NET.Core.POCO.Root.Namespaces using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -40,8 +41,23 @@ namespace SysML2.NET.Core.POCO.Root.Namespaces /// [Class(xmiId: "_19_0_4_12e503d9_1648180804650_933390_31", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class OwningMembership : IOwningMembership + public partial class OwningMembership : IOwningMembership, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public OwningMembership() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -239,7 +255,10 @@ string IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -247,7 +266,10 @@ string IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -281,7 +303,10 @@ string IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -289,7 +314,10 @@ string IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/Package.cs b/SysML2.NET/Core/AutoGenPoco/Package.cs index 1f87ef787..b1f61d913 100644 --- a/SysML2.NET/Core/AutoGenPoco/Package.cs +++ b/SysML2.NET/Core/AutoGenPoco/Package.cs @@ -33,6 +33,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Packages using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -42,8 +43,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Packages /// [Class(xmiId: "_19_0_4_12e503d9_1606943754976_445656_5532", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Package : IPackage + public partial class Package : IPackage, IContainedElement { + /// + /// Initialize a new instance of + /// + public Package() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -207,7 +219,10 @@ public partial class Package : IPackage [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -241,7 +256,10 @@ public partial class Package : IPackage [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/ParameterMembership.cs b/SysML2.NET/Core/AutoGenPoco/ParameterMembership.cs index cf7ed8da1..f7d3bb601 100644 --- a/SysML2.NET/Core/AutoGenPoco/ParameterMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/ParameterMembership.cs @@ -35,6 +35,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Behaviors using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -44,8 +45,23 @@ namespace SysML2.NET.Core.POCO.Kernel.Behaviors /// [Class(xmiId: "_18_5_3_12e503d9_1557527738711_165124_110466", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ParameterMembership : IParameterMembership + public partial class ParameterMembership : IParameterMembership, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public ParameterMembership() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -263,7 +279,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -271,7 +290,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -305,7 +327,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -313,7 +338,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that owns this FeatureMembership. diff --git a/SysML2.NET/Core/AutoGenPoco/PartDefinition.cs b/SysML2.NET/Core/AutoGenPoco/PartDefinition.cs index 2ec1d4c28..83f1fdf65 100644 --- a/SysML2.NET/Core/AutoGenPoco/PartDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/PartDefinition.cs @@ -56,6 +56,7 @@ namespace SysML2.NET.Core.POCO.Systems.Parts using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -65,8 +66,19 @@ namespace SysML2.NET.Core.POCO.Systems.Parts /// [Class(xmiId: "_18_5_3_12e503d9_1565469626440_455154_19856", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class PartDefinition : IPartDefinition + public partial class PartDefinition : IPartDefinition, IContainedElement { + /// + /// Initialize a new instance of + /// + public PartDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -584,7 +596,10 @@ public partial class PartDefinition : IPartDefinition [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -718,7 +733,10 @@ public partial class PartDefinition : IPartDefinition [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/PartUsage.cs b/SysML2.NET/Core/AutoGenPoco/PartUsage.cs index 5d6eb8aed..f98f51b22 100644 --- a/SysML2.NET/Core/AutoGenPoco/PartUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/PartUsage.cs @@ -60,6 +60,7 @@ namespace SysML2.NET.Core.POCO.Systems.Parts using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -69,8 +70,19 @@ namespace SysML2.NET.Core.POCO.Systems.Parts /// [Class(xmiId: "_18_5_3_12e503d9_1565471239590_312157_20701", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class PartUsage : IPartUsage + public partial class PartUsage : IPartUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public PartUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -897,7 +909,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -996,7 +1011,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/PayloadFeature.cs b/SysML2.NET/Core/AutoGenPoco/PayloadFeature.cs index 6041f8aad..f2744957e 100644 --- a/SysML2.NET/Core/AutoGenPoco/PayloadFeature.cs +++ b/SysML2.NET/Core/AutoGenPoco/PayloadFeature.cs @@ -35,6 +35,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Interactions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -43,8 +44,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Interactions /// [Class(xmiId: "_18_5_3_12e503d9_1563219020686_897240_20518", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class PayloadFeature : IPayloadFeature + public partial class PayloadFeature : IPayloadFeature, IContainedElement { + /// + /// Initialize a new instance of + /// + public PayloadFeature() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -565,7 +577,10 @@ public partial class PayloadFeature : IPayloadFeature [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -656,7 +671,10 @@ public partial class PayloadFeature : IPayloadFeature [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/PerformActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/PerformActionUsage.cs index c7da1fbe5..6af64ab65 100644 --- a/SysML2.NET/Core/AutoGenPoco/PerformActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/PerformActionUsage.cs @@ -60,6 +60,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -70,8 +71,19 @@ namespace SysML2.NET.Core.POCO.Systems.Actions /// [Class(xmiId: "_18_5_3_12e503d9_1565503273042_472885_33822", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class PerformActionUsage : IPerformActionUsage + public partial class PerformActionUsage : IPerformActionUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public PerformActionUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -927,7 +939,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1026,7 +1041,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/PortConjugation.cs b/SysML2.NET/Core/AutoGenPoco/PortConjugation.cs index c473f4f35..7a7281bc8 100644 --- a/SysML2.NET/Core/AutoGenPoco/PortConjugation.cs +++ b/SysML2.NET/Core/AutoGenPoco/PortConjugation.cs @@ -33,6 +33,7 @@ namespace SysML2.NET.Core.POCO.Systems.Ports using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -44,8 +45,23 @@ namespace SysML2.NET.Core.POCO.Systems.Ports /// [Class(xmiId: "_19_0_2_12e503d9_1575484318404_705000_871", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class PortConjugation : IPortConjugation + public partial class PortConjugation : IPortConjugation, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public PortConjugation() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -197,7 +213,10 @@ IType Core.Types.IConjugation.OriginalType [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -205,7 +224,10 @@ IType Core.Types.IConjugation.OriginalType [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -239,7 +261,10 @@ IType Core.Types.IConjugation.OriginalType [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -247,7 +272,10 @@ IType Core.Types.IConjugation.OriginalType [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The conjugatedType of this Conjugation that is also its owningRelatedElement. diff --git a/SysML2.NET/Core/AutoGenPoco/PortDefinition.cs b/SysML2.NET/Core/AutoGenPoco/PortDefinition.cs index 7512bf7fb..e740be4bb 100644 --- a/SysML2.NET/Core/AutoGenPoco/PortDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/PortDefinition.cs @@ -57,6 +57,7 @@ namespace SysML2.NET.Core.POCO.Systems.Ports using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -66,8 +67,19 @@ namespace SysML2.NET.Core.POCO.Systems.Ports /// [Class(xmiId: "_18_5_3_12e503d9_1565478005829_611481_22375", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class PortDefinition : IPortDefinition + public partial class PortDefinition : IPortDefinition, IContainedElement { + /// + /// Initialize a new instance of + /// + public PortDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -593,7 +605,10 @@ public partial class PortDefinition : IPortDefinition [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -727,7 +742,10 @@ public partial class PortDefinition : IPortDefinition [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/PortUsage.cs b/SysML2.NET/Core/AutoGenPoco/PortUsage.cs index 80379310d..592591195 100644 --- a/SysML2.NET/Core/AutoGenPoco/PortUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/PortUsage.cs @@ -59,6 +59,7 @@ namespace SysML2.NET.Core.POCO.Systems.Ports using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -67,8 +68,19 @@ namespace SysML2.NET.Core.POCO.Systems.Ports /// [Class(xmiId: "_18_5_3_12e503d9_1565492704639_896080_24992", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class PortUsage : IPortUsage + public partial class PortUsage : IPortUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public PortUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -886,7 +898,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -985,7 +1000,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/Predicate.cs b/SysML2.NET/Core/AutoGenPoco/Predicate.cs index 981763a1c..0caeeb493 100644 --- a/SysML2.NET/Core/AutoGenPoco/Predicate.cs +++ b/SysML2.NET/Core/AutoGenPoco/Predicate.cs @@ -36,6 +36,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Functions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -43,8 +44,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Functions /// [Class(xmiId: "_18_5_3_12e503d9_1533160651691_194569_42171", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Predicate : IPredicate + public partial class Predicate : IPredicate, IContainedElement { + /// + /// Initialize a new instance of + /// + public Predicate() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -413,7 +425,10 @@ public partial class Predicate : IPredicate [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -475,7 +490,10 @@ public partial class Predicate : IPredicate [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The parameters of this Behavior, which are defined as its directedFeatures, whose values are passed diff --git a/SysML2.NET/Core/AutoGenPoco/Redefinition.cs b/SysML2.NET/Core/AutoGenPoco/Redefinition.cs index 9d106e240..b2016fb62 100644 --- a/SysML2.NET/Core/AutoGenPoco/Redefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/Redefinition.cs @@ -33,6 +33,7 @@ namespace SysML2.NET.Core.POCO.Core.Features using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -51,8 +52,23 @@ namespace SysML2.NET.Core.POCO.Core.Features /// [Class(xmiId: "_18_5_3_12e503d9_1533160651690_251835_42168", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Redefinition : IRedefinition + public partial class Redefinition : IRedefinition, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public Redefinition() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -180,7 +196,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -188,7 +207,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -231,7 +253,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -239,7 +264,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the specific Type of this Specialization and owns it as its owningRelatedElement. diff --git a/SysML2.NET/Core/AutoGenPoco/ReferenceSubsetting.cs b/SysML2.NET/Core/AutoGenPoco/ReferenceSubsetting.cs index a55e56187..540e900a8 100644 --- a/SysML2.NET/Core/AutoGenPoco/ReferenceSubsetting.cs +++ b/SysML2.NET/Core/AutoGenPoco/ReferenceSubsetting.cs @@ -33,6 +33,7 @@ namespace SysML2.NET.Core.POCO.Core.Features using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,23 @@ namespace SysML2.NET.Core.POCO.Core.Features /// [Class(xmiId: "_19_0_4_12e503d9_1661554793960_500657_60", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ReferenceSubsetting : IReferenceSubsetting + public partial class ReferenceSubsetting : IReferenceSubsetting, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public ReferenceSubsetting() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -174,7 +190,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -182,7 +201,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -226,7 +248,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -234,7 +259,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the specific Type of this Specialization and owns it as its owningRelatedElement. diff --git a/SysML2.NET/Core/AutoGenPoco/ReferenceUsage.cs b/SysML2.NET/Core/AutoGenPoco/ReferenceUsage.cs index cc9d7bd41..0cfddbfc1 100644 --- a/SysML2.NET/Core/AutoGenPoco/ReferenceUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ReferenceUsage.cs @@ -57,6 +57,7 @@ namespace SysML2.NET.Core.POCO.Systems.DefinitionAndUsage using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -68,8 +69,19 @@ namespace SysML2.NET.Core.POCO.Systems.DefinitionAndUsage /// [Class(xmiId: "_19_0_2_12e503d9_1591477377905_618531_857", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ReferenceUsage : IReferenceUsage + public partial class ReferenceUsage : IReferenceUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public ReferenceUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -868,7 +880,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -967,7 +982,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/RenderingDefinition.cs b/SysML2.NET/Core/AutoGenPoco/RenderingDefinition.cs index 8c6d1e4ec..b3044b92e 100644 --- a/SysML2.NET/Core/AutoGenPoco/RenderingDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/RenderingDefinition.cs @@ -56,6 +56,7 @@ namespace SysML2.NET.Core.POCO.Systems.Views using SysML2.NET.Core.POCO.Systems.States; using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -64,8 +65,19 @@ namespace SysML2.NET.Core.POCO.Systems.Views /// [Class(xmiId: "_19_0_2_12e503d9_1596657122569_397556_4766", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class RenderingDefinition : IRenderingDefinition + public partial class RenderingDefinition : IRenderingDefinition, IContainedElement { + /// + /// Initialize a new instance of + /// + public RenderingDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -583,7 +595,10 @@ public partial class RenderingDefinition : IRenderingDefinition [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -717,7 +732,10 @@ public partial class RenderingDefinition : IRenderingDefinition [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/RenderingUsage.cs b/SysML2.NET/Core/AutoGenPoco/RenderingUsage.cs index 73f20d094..11f41b942 100644 --- a/SysML2.NET/Core/AutoGenPoco/RenderingUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/RenderingUsage.cs @@ -60,6 +60,7 @@ namespace SysML2.NET.Core.POCO.Systems.Views using SysML2.NET.Core.POCO.Systems.States; using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -68,8 +69,19 @@ namespace SysML2.NET.Core.POCO.Systems.Views /// [Class(xmiId: "_19_0_2_12e503d9_1596657138882_432286_4810", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class RenderingUsage : IRenderingUsage + public partial class RenderingUsage : IRenderingUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public RenderingUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -896,7 +908,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -995,7 +1010,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/RequirementConstraintMembership.cs b/SysML2.NET/Core/AutoGenPoco/RequirementConstraintMembership.cs index ac32bc43a..444355ca4 100644 --- a/SysML2.NET/Core/AutoGenPoco/RequirementConstraintMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/RequirementConstraintMembership.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; using SysML2.NET.Core.POCO.Systems.Constraints; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,23 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements /// [Class(xmiId: "_19_0_2_12e503d9_1584048032876_657748_336", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class RequirementConstraintMembership : IRequirementConstraintMembership + public partial class RequirementConstraintMembership : IRequirementConstraintMembership, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public RequirementConstraintMembership() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -271,7 +287,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -279,7 +298,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -313,7 +335,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -321,7 +346,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that owns this FeatureMembership. diff --git a/SysML2.NET/Core/AutoGenPoco/RequirementDefinition.cs b/SysML2.NET/Core/AutoGenPoco/RequirementDefinition.cs index 63c45005e..40de60a31 100644 --- a/SysML2.NET/Core/AutoGenPoco/RequirementDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/RequirementDefinition.cs @@ -58,6 +58,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -67,8 +68,19 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements /// [Class(xmiId: "_19_0_2_12e503d9_1582990729262_130404_898", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class RequirementDefinition : IRequirementDefinition + public partial class RequirementDefinition : IRequirementDefinition, IContainedElement { + /// + /// Initialize a new instance of + /// + public RequirementDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -641,7 +653,10 @@ string Root.Elements.IElement.DeclaredShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -775,7 +790,10 @@ string Root.Elements.IElement.DeclaredShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The parameters of this Behavior, which are defined as its directedFeatures, whose values are passed diff --git a/SysML2.NET/Core/AutoGenPoco/RequirementUsage.cs b/SysML2.NET/Core/AutoGenPoco/RequirementUsage.cs index 67f6376ad..35f773287 100644 --- a/SysML2.NET/Core/AutoGenPoco/RequirementUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/RequirementUsage.cs @@ -61,6 +61,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -68,8 +69,19 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements /// [Class(xmiId: "_19_0_2_12e503d9_1582991078230_41497_1143", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class RequirementUsage : IRequirementUsage + public partial class RequirementUsage : IRequirementUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public RequirementUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -959,7 +971,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1058,7 +1073,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/RequirementVerificationMembership.cs b/SysML2.NET/Core/AutoGenPoco/RequirementVerificationMembership.cs index 8b39a1715..e1d0da3e5 100644 --- a/SysML2.NET/Core/AutoGenPoco/RequirementVerificationMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/RequirementVerificationMembership.cs @@ -38,6 +38,7 @@ namespace SysML2.NET.Core.POCO.Systems.VerificationCases using SysML2.NET.Core.POCO.Root.Namespaces; using SysML2.NET.Core.POCO.Systems.Constraints; using SysML2.NET.Core.POCO.Systems.Requirements; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -46,8 +47,23 @@ namespace SysML2.NET.Core.POCO.Systems.VerificationCases /// [Class(xmiId: "_19_0_4_12e503d9_1603921138449_428307_72", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class RequirementVerificationMembership : IRequirementVerificationMembership + public partial class RequirementVerificationMembership : IRequirementVerificationMembership, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public RequirementVerificationMembership() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -289,7 +305,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -297,7 +316,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owned RequirementUsage that acts as the ownedConstraint for this @@ -341,7 +363,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -349,7 +374,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that owns this FeatureMembership. diff --git a/SysML2.NET/Core/AutoGenPoco/ResultExpressionMembership.cs b/SysML2.NET/Core/AutoGenPoco/ResultExpressionMembership.cs index 5fa03c0b9..00d8e63a3 100644 --- a/SysML2.NET/Core/AutoGenPoco/ResultExpressionMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/ResultExpressionMembership.cs @@ -35,6 +35,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Functions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,23 @@ namespace SysML2.NET.Core.POCO.Kernel.Functions /// [Class(xmiId: "_19_0_2_12e503d9_1594868887258_973573_2461", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ResultExpressionMembership : IResultExpressionMembership + public partial class ResultExpressionMembership : IResultExpressionMembership, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public ResultExpressionMembership() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -256,7 +272,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -264,7 +283,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The Expression that provides the result for the owner of the ResultExpressionMembership. @@ -306,7 +328,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -314,7 +339,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that owns this FeatureMembership. diff --git a/SysML2.NET/Core/AutoGenPoco/ReturnParameterMembership.cs b/SysML2.NET/Core/AutoGenPoco/ReturnParameterMembership.cs index 9c6d99091..3047490b5 100644 --- a/SysML2.NET/Core/AutoGenPoco/ReturnParameterMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/ReturnParameterMembership.cs @@ -36,6 +36,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Functions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,23 @@ namespace SysML2.NET.Core.POCO.Kernel.Functions /// [Class(xmiId: "_18_5_3_12e503d9_1557528148740_240982_111109", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ReturnParameterMembership : IReturnParameterMembership + public partial class ReturnParameterMembership : IReturnParameterMembership, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public ReturnParameterMembership() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -264,7 +280,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -272,7 +291,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -306,7 +328,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -314,7 +339,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that owns this FeatureMembership. diff --git a/SysML2.NET/Core/AutoGenPoco/SatisfyRequirementUsage.cs b/SysML2.NET/Core/AutoGenPoco/SatisfyRequirementUsage.cs index 768464571..7028806aa 100644 --- a/SysML2.NET/Core/AutoGenPoco/SatisfyRequirementUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/SatisfyRequirementUsage.cs @@ -61,6 +61,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -71,8 +72,19 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements /// [Class(xmiId: "_19_0_2_12e503d9_1583184587272_448420_2009", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class SatisfyRequirementUsage : ISatisfyRequirementUsage + public partial class SatisfyRequirementUsage : ISatisfyRequirementUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public SatisfyRequirementUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -979,7 +991,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1078,7 +1093,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/SelectExpression.cs b/SysML2.NET/Core/AutoGenPoco/SelectExpression.cs index 304d72aac..371194548 100644 --- a/SysML2.NET/Core/AutoGenPoco/SelectExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/SelectExpression.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions /// [Class(xmiId: "_18_5_3_12e503d9_1559596717567_82711_29088", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class SelectExpression : ISelectExpression + public partial class SelectExpression : ISelectExpression, IContainedElement { + /// + /// Initialize a new instance of + /// + public SelectExpression() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -634,7 +646,10 @@ string IOperatorExpression.Operator [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -725,7 +740,10 @@ string IOperatorExpression.Operator [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/SendActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/SendActionUsage.cs index 8f15236de..5da7f9aa3 100644 --- a/SysML2.NET/Core/AutoGenPoco/SendActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/SendActionUsage.cs @@ -61,6 +61,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -73,8 +74,19 @@ namespace SysML2.NET.Core.POCO.Systems.Actions /// [Class(xmiId: "_18_5_3_12e503d9_1565505727349_597544_34143", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class SendActionUsage : ISendActionUsage + public partial class SendActionUsage : ISendActionUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public SendActionUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -911,7 +923,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1010,7 +1025,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/Specialization.cs b/SysML2.NET/Core/AutoGenPoco/Specialization.cs index 72d274d63..7a5cbb0ab 100644 --- a/SysML2.NET/Core/AutoGenPoco/Specialization.cs +++ b/SysML2.NET/Core/AutoGenPoco/Specialization.cs @@ -32,6 +32,7 @@ namespace SysML2.NET.Core.POCO.Core.Types using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -41,8 +42,23 @@ namespace SysML2.NET.Core.POCO.Core.Types /// [Class(xmiId: "_18_5_3_12e503d9_1533160651696_992729_42182", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Specialization : ISpecialization + public partial class Specialization : ISpecialization, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public Specialization() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -159,7 +175,10 @@ public partial class Specialization : ISpecialization [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -167,7 +186,10 @@ public partial class Specialization : ISpecialization [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -201,7 +223,10 @@ public partial class Specialization : ISpecialization [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -209,7 +234,10 @@ public partial class Specialization : ISpecialization [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the specific Type of this Specialization and owns it as its owningRelatedElement. diff --git a/SysML2.NET/Core/AutoGenPoco/StakeholderMembership.cs b/SysML2.NET/Core/AutoGenPoco/StakeholderMembership.cs index 58e30bde5..d93d823dd 100644 --- a/SysML2.NET/Core/AutoGenPoco/StakeholderMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/StakeholderMembership.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; using SysML2.NET.Core.POCO.Systems.Parts; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -46,8 +47,23 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements /// [Class(xmiId: "_19_0_4_12e503d9_1624034341711_188515_40791", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class StakeholderMembership : IStakeholderMembership + public partial class StakeholderMembership : IStakeholderMembership, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public StakeholderMembership() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -266,7 +282,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -274,7 +293,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The PartUsage specifying the stakeholder. @@ -316,7 +338,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -324,7 +349,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that owns this FeatureMembership. diff --git a/SysML2.NET/Core/AutoGenPoco/StateDefinition.cs b/SysML2.NET/Core/AutoGenPoco/StateDefinition.cs index 3acf2d9fa..6e5589b03 100644 --- a/SysML2.NET/Core/AutoGenPoco/StateDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/StateDefinition.cs @@ -57,6 +57,7 @@ namespace SysML2.NET.Core.POCO.Systems.States using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -67,8 +68,19 @@ namespace SysML2.NET.Core.POCO.Systems.States /// [Class(xmiId: "_19_0_2_12e503d9_1575587534200_898246_600", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class StateDefinition : IStateDefinition + public partial class StateDefinition : IStateDefinition, IContainedElement { + /// + /// Initialize a new instance of + /// + public StateDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -632,7 +644,10 @@ public partial class StateDefinition : IStateDefinition [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -766,7 +781,10 @@ public partial class StateDefinition : IStateDefinition [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The parameters of this Behavior, which are defined as its directedFeatures, whose values are passed diff --git a/SysML2.NET/Core/AutoGenPoco/StateSubactionMembership.cs b/SysML2.NET/Core/AutoGenPoco/StateSubactionMembership.cs index 5f4461494..414f84181 100644 --- a/SysML2.NET/Core/AutoGenPoco/StateSubactionMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/StateSubactionMembership.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Systems.States using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; using SysML2.NET.Core.POCO.Systems.Actions; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,23 @@ namespace SysML2.NET.Core.POCO.Systems.States /// [Class(xmiId: "_19_0_2_12e503d9_1575671792204_632048_203", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class StateSubactionMembership : IStateSubactionMembership + public partial class StateSubactionMembership : IStateSubactionMembership, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public StateSubactionMembership() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -271,7 +287,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -279,7 +298,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -313,7 +335,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -321,7 +346,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that owns this FeatureMembership. diff --git a/SysML2.NET/Core/AutoGenPoco/StateUsage.cs b/SysML2.NET/Core/AutoGenPoco/StateUsage.cs index 4ea7cce0d..81f8868b9 100644 --- a/SysML2.NET/Core/AutoGenPoco/StateUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/StateUsage.cs @@ -60,6 +60,7 @@ namespace SysML2.NET.Core.POCO.Systems.States using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -71,8 +72,19 @@ namespace SysML2.NET.Core.POCO.Systems.States /// [Class(xmiId: "_19_0_2_12e503d9_1575587557729_586912_651", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class StateUsage : IStateUsage + public partial class StateUsage : IStateUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public StateUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -946,7 +958,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1045,7 +1060,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/Step.cs b/SysML2.NET/Core/AutoGenPoco/Step.cs index db1e3c6a0..86cc54214 100644 --- a/SysML2.NET/Core/AutoGenPoco/Step.cs +++ b/SysML2.NET/Core/AutoGenPoco/Step.cs @@ -35,6 +35,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Behaviors using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Behaviors /// [Class(xmiId: "_18_5_3_b9102da_1536345916995_711141_17306", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Step : IStep + public partial class Step : IStep, IContainedElement { + /// + /// Initialize a new instance of + /// + public Step() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -576,7 +588,10 @@ public partial class Step : IStep [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -667,7 +682,10 @@ public partial class Step : IStep [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/Structure.cs b/SysML2.NET/Core/AutoGenPoco/Structure.cs index cafa3e62d..c4c97041c 100644 --- a/SysML2.NET/Core/AutoGenPoco/Structure.cs +++ b/SysML2.NET/Core/AutoGenPoco/Structure.cs @@ -36,6 +36,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Structures using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,19 @@ namespace SysML2.NET.Core.POCO.Kernel.Structures /// [Class(xmiId: "_19_0_4_b9102da_1609606051359_625961_451", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Structure : IStructure + public partial class Structure : IStructure, IContainedElement { + /// + /// Initialize a new instance of + /// + public Structure() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -395,7 +407,10 @@ public partial class Structure : IStructure [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -457,7 +472,10 @@ public partial class Structure : IStructure [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/Subclassification.cs b/SysML2.NET/Core/AutoGenPoco/Subclassification.cs index f05199219..504c1591d 100644 --- a/SysML2.NET/Core/AutoGenPoco/Subclassification.cs +++ b/SysML2.NET/Core/AutoGenPoco/Subclassification.cs @@ -33,6 +33,7 @@ namespace SysML2.NET.Core.POCO.Core.Classifiers using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -41,8 +42,23 @@ namespace SysML2.NET.Core.POCO.Core.Classifiers /// [Class(xmiId: "_18_5_3_12e503d9_1543188778639_872842_24973", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Subclassification : ISubclassification + public partial class Subclassification : ISubclassification, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public Subclassification() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -170,7 +186,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -178,7 +197,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -220,7 +242,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -228,7 +253,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the specific Type of this Specialization and owns it as its owningRelatedElement. diff --git a/SysML2.NET/Core/AutoGenPoco/SubjectMembership.cs b/SysML2.NET/Core/AutoGenPoco/SubjectMembership.cs index 8db413f27..360e5aedd 100644 --- a/SysML2.NET/Core/AutoGenPoco/SubjectMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/SubjectMembership.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; using SysML2.NET.Core.POCO.Systems.DefinitionAndUsage; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -46,8 +47,23 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements /// [Class(xmiId: "_19_0_2_59601fc_1590256833607_99707_374", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class SubjectMembership : ISubjectMembership + public partial class SubjectMembership : ISubjectMembership, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public SubjectMembership() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -266,7 +282,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -274,7 +293,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The UsageownedMemberParameter of this SubjectMembership. @@ -316,7 +338,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -324,7 +349,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that owns this FeatureMembership. diff --git a/SysML2.NET/Core/AutoGenPoco/Subsetting.cs b/SysML2.NET/Core/AutoGenPoco/Subsetting.cs index 0ccf8af91..274336680 100644 --- a/SysML2.NET/Core/AutoGenPoco/Subsetting.cs +++ b/SysML2.NET/Core/AutoGenPoco/Subsetting.cs @@ -33,6 +33,7 @@ namespace SysML2.NET.Core.POCO.Core.Features using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -45,8 +46,23 @@ namespace SysML2.NET.Core.POCO.Core.Features /// [Class(xmiId: "_18_5_3_12e503d9_1533160651710_980688_42209", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Subsetting : ISubsetting + public partial class Subsetting : ISubsetting, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public Subsetting() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -174,7 +190,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -182,7 +201,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -225,7 +247,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -233,7 +258,10 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the specific Type of this Specialization and owns it as its owningRelatedElement. diff --git a/SysML2.NET/Core/AutoGenPoco/Succession.cs b/SysML2.NET/Core/AutoGenPoco/Succession.cs index b280d9d0a..bbff7bd0c 100644 --- a/SysML2.NET/Core/AutoGenPoco/Succession.cs +++ b/SysML2.NET/Core/AutoGenPoco/Succession.cs @@ -36,6 +36,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Connectors using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -43,8 +44,23 @@ namespace SysML2.NET.Core.POCO.Kernel.Connectors /// [Class(xmiId: "_18_5_3_71301a1_1536100248189_622183_16479", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Succession : ISuccession + public partial class Succession : ISuccession, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public Succession() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + } + /// /// Gets or sets the unique identifier /// @@ -601,7 +617,10 @@ public partial class Succession : ISuccession [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -609,7 +628,10 @@ public partial class Succession : ISuccession [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -700,7 +722,10 @@ public partial class Succession : ISuccession [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -708,7 +733,10 @@ public partial class Succession : ISuccession [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/SuccessionAsUsage.cs b/SysML2.NET/Core/AutoGenPoco/SuccessionAsUsage.cs index 888dcaeef..3651afdc3 100644 --- a/SysML2.NET/Core/AutoGenPoco/SuccessionAsUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/SuccessionAsUsage.cs @@ -59,6 +59,7 @@ namespace SysML2.NET.Core.POCO.Systems.Connections using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -66,8 +67,23 @@ namespace SysML2.NET.Core.POCO.Systems.Connections /// [Class(xmiId: "_19_0_4_12e503d9_1624053404424_842165_528", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class SuccessionAsUsage : ISuccessionAsUsage + public partial class SuccessionAsUsage : ISuccessionAsUsage, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public SuccessionAsUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + } + /// /// Gets or sets the unique identifier /// @@ -893,7 +909,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -901,7 +920,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1000,7 +1022,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -1008,7 +1033,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/SuccessionFlow.cs b/SysML2.NET/Core/AutoGenPoco/SuccessionFlow.cs index d0ad0cc3a..bde47a6a5 100644 --- a/SysML2.NET/Core/AutoGenPoco/SuccessionFlow.cs +++ b/SysML2.NET/Core/AutoGenPoco/SuccessionFlow.cs @@ -39,6 +39,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Interactions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -48,8 +49,23 @@ namespace SysML2.NET.Core.POCO.Kernel.Interactions /// [Class(xmiId: "_18_5_3_b9102da_1536869794875_359922_17902", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class SuccessionFlow : ISuccessionFlow + public partial class SuccessionFlow : ISuccessionFlow, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public SuccessionFlow() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + } + /// /// Gets or sets the unique identifier /// @@ -635,7 +651,10 @@ public partial class SuccessionFlow : ISuccessionFlow [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -643,7 +662,10 @@ public partial class SuccessionFlow : ISuccessionFlow [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -734,7 +756,10 @@ public partial class SuccessionFlow : ISuccessionFlow [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -742,7 +767,10 @@ public partial class SuccessionFlow : ISuccessionFlow [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/SuccessionFlowUsage.cs b/SysML2.NET/Core/AutoGenPoco/SuccessionFlowUsage.cs index a4089d1ce..26773c049 100644 --- a/SysML2.NET/Core/AutoGenPoco/SuccessionFlowUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/SuccessionFlowUsage.cs @@ -63,6 +63,7 @@ namespace SysML2.NET.Core.POCO.Systems.Flows using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -70,8 +71,23 @@ namespace SysML2.NET.Core.POCO.Systems.Flows /// [Class(xmiId: "_19_0_4_12e503d9_1624054686981_604189_1301", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class SuccessionFlowUsage : ISuccessionFlowUsage + public partial class SuccessionFlowUsage : ISuccessionFlowUsage, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public SuccessionFlowUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + } + /// /// Gets or sets the unique identifier /// @@ -974,7 +990,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -982,7 +1001,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1081,7 +1103,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -1089,7 +1114,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/TerminateActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/TerminateActionUsage.cs index 7a5dba72c..3442e0f89 100644 --- a/SysML2.NET/Core/AutoGenPoco/TerminateActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/TerminateActionUsage.cs @@ -61,6 +61,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -72,8 +73,19 @@ namespace SysML2.NET.Core.POCO.Systems.Actions /// [Class(xmiId: "_2022x_2_12e503d9_1724451571263_191875_31", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class TerminateActionUsage : ITerminateActionUsage + public partial class TerminateActionUsage : ITerminateActionUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public TerminateActionUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -910,7 +922,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1009,7 +1024,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/TextualRepresentation.cs b/SysML2.NET/Core/AutoGenPoco/TextualRepresentation.cs index 48abd0d8d..f662375c8 100644 --- a/SysML2.NET/Core/AutoGenPoco/TextualRepresentation.cs +++ b/SysML2.NET/Core/AutoGenPoco/TextualRepresentation.cs @@ -31,6 +31,7 @@ namespace SysML2.NET.Core.POCO.Root.Annotations using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -65,8 +66,19 @@ namespace SysML2.NET.Core.POCO.Root.Annotations /// [Class(xmiId: "_19_0_2_12e503d9_1594152214531_455349_2448", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class TextualRepresentation : ITextualRepresentation + public partial class TextualRepresentation : ITextualRepresentation, IContainedElement { + /// + /// Initialize a new instance of + /// + public TextualRepresentation() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -210,7 +222,10 @@ public partial class TextualRepresentation : ITextualRepresentation [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -253,7 +268,10 @@ public partial class TextualRepresentation : ITextualRepresentation [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/TransitionFeatureMembership.cs b/SysML2.NET/Core/AutoGenPoco/TransitionFeatureMembership.cs index 942ba1724..ef0319a57 100644 --- a/SysML2.NET/Core/AutoGenPoco/TransitionFeatureMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/TransitionFeatureMembership.cs @@ -37,6 +37,7 @@ namespace SysML2.NET.Core.POCO.Systems.States using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -46,8 +47,23 @@ namespace SysML2.NET.Core.POCO.Systems.States /// [Class(xmiId: "_19_0_2_12e503d9_1575672033669_188530_395", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class TransitionFeatureMembership : ITransitionFeatureMembership + public partial class TransitionFeatureMembership : ITransitionFeatureMembership, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public TransitionFeatureMembership() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -264,7 +280,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -272,7 +291,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -306,7 +328,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -314,7 +339,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that owns this FeatureMembership. diff --git a/SysML2.NET/Core/AutoGenPoco/TransitionUsage.cs b/SysML2.NET/Core/AutoGenPoco/TransitionUsage.cs index 3446ae339..17ca399eb 100644 --- a/SysML2.NET/Core/AutoGenPoco/TransitionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/TransitionUsage.cs @@ -62,6 +62,7 @@ namespace SysML2.NET.Core.POCO.Systems.States using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -74,8 +75,19 @@ namespace SysML2.NET.Core.POCO.Systems.States /// [Class(xmiId: "_19_0_2_12e503d9_1575672078353_626298_450", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class TransitionUsage : ITransitionUsage + public partial class TransitionUsage : ITransitionUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public TransitionUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -932,7 +944,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1031,7 +1046,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/TriggerInvocationExpression.cs b/SysML2.NET/Core/AutoGenPoco/TriggerInvocationExpression.cs index 3f9d7f300..cdc9c2a5c 100644 --- a/SysML2.NET/Core/AutoGenPoco/TriggerInvocationExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/TriggerInvocationExpression.cs @@ -39,6 +39,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -47,8 +48,19 @@ namespace SysML2.NET.Core.POCO.Systems.Actions /// [Class(xmiId: "_19_0_4_12e503d9_1643588492412_624345_274", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class TriggerInvocationExpression : ITriggerInvocationExpression + public partial class TriggerInvocationExpression : ITriggerInvocationExpression, IContainedElement { + /// + /// Initialize a new instance of + /// + public TriggerInvocationExpression() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -621,7 +633,10 @@ public partial class TriggerInvocationExpression : ITriggerInvocationExpression [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -712,7 +727,10 @@ public partial class TriggerInvocationExpression : ITriggerInvocationExpression [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/Type.cs b/SysML2.NET/Core/AutoGenPoco/Type.cs index df4104105..71adf21c6 100644 --- a/SysML2.NET/Core/AutoGenPoco/Type.cs +++ b/SysML2.NET/Core/AutoGenPoco/Type.cs @@ -33,6 +33,7 @@ namespace SysML2.NET.Core.POCO.Core.Types using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -42,8 +43,19 @@ namespace SysML2.NET.Core.POCO.Core.Types /// [Class(xmiId: "_18_5_3_71301a1_1537895141427_270492_15579", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Type : IType + public partial class Type : IType, IContainedElement { + /// + /// Initialize a new instance of + /// + public Type() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -392,7 +404,10 @@ public partial class Type : IType [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -445,7 +460,10 @@ public partial class Type : IType [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/TypeFeaturing.cs b/SysML2.NET/Core/AutoGenPoco/TypeFeaturing.cs index 79f1e753b..3e0d73e86 100644 --- a/SysML2.NET/Core/AutoGenPoco/TypeFeaturing.cs +++ b/SysML2.NET/Core/AutoGenPoco/TypeFeaturing.cs @@ -33,6 +33,7 @@ namespace SysML2.NET.Core.POCO.Core.Features using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -41,8 +42,23 @@ namespace SysML2.NET.Core.POCO.Core.Features /// [Class(xmiId: "_19_0_4_12e503d9_1603904809245_349502_510", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class TypeFeaturing : ITypeFeaturing + public partial class TypeFeaturing : ITypeFeaturing, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public TypeFeaturing() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -167,7 +183,10 @@ public partial class TypeFeaturing : ITypeFeaturing [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -175,7 +194,10 @@ public partial class TypeFeaturing : ITypeFeaturing [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -218,7 +240,10 @@ public partial class TypeFeaturing : ITypeFeaturing [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -226,7 +251,10 @@ public partial class TypeFeaturing : ITypeFeaturing [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/Unioning.cs b/SysML2.NET/Core/AutoGenPoco/Unioning.cs index c4520b623..eda71ca5b 100644 --- a/SysML2.NET/Core/AutoGenPoco/Unioning.cs +++ b/SysML2.NET/Core/AutoGenPoco/Unioning.cs @@ -32,6 +32,7 @@ namespace SysML2.NET.Core.POCO.Core.Types using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -39,8 +40,23 @@ namespace SysML2.NET.Core.POCO.Core.Types /// [Class(xmiId: "_19_0_4_b9102da_1661869922775_190651_380", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Unioning : IUnioning + public partial class Unioning : IUnioning, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public Unioning() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -149,7 +165,10 @@ public partial class Unioning : IUnioning [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -157,7 +176,10 @@ public partial class Unioning : IUnioning [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this @@ -191,7 +213,10 @@ public partial class Unioning : IUnioning [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -199,7 +224,10 @@ public partial class Unioning : IUnioning [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/Usage.cs b/SysML2.NET/Core/AutoGenPoco/Usage.cs index 1b5d8bf24..f21a7d6a5 100644 --- a/SysML2.NET/Core/AutoGenPoco/Usage.cs +++ b/SysML2.NET/Core/AutoGenPoco/Usage.cs @@ -57,6 +57,7 @@ namespace SysML2.NET.Core.POCO.Systems.DefinitionAndUsage using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -71,8 +72,19 @@ namespace SysML2.NET.Core.POCO.Systems.DefinitionAndUsage /// [Class(xmiId: "_18_5_3_12e503d9_1565469997820_598571_19982", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class Usage : IUsage + public partial class Usage : IUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public Usage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -862,7 +874,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -961,7 +976,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/UseCaseDefinition.cs b/SysML2.NET/Core/AutoGenPoco/UseCaseDefinition.cs index 91fd00ebd..1a4b79ecd 100644 --- a/SysML2.NET/Core/AutoGenPoco/UseCaseDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/UseCaseDefinition.cs @@ -58,6 +58,7 @@ namespace SysML2.NET.Core.POCO.Systems.UseCases using SysML2.NET.Core.POCO.Systems.States; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -67,8 +68,19 @@ namespace SysML2.NET.Core.POCO.Systems.UseCases /// [Class(xmiId: "_19_0_4_12e503d9_1621460866763_205297_823", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class UseCaseDefinition : IUseCaseDefinition + public partial class UseCaseDefinition : IUseCaseDefinition, IContainedElement { + /// + /// Initialize a new instance of + /// + public UseCaseDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -647,7 +659,10 @@ public partial class UseCaseDefinition : IUseCaseDefinition [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -781,7 +796,10 @@ public partial class UseCaseDefinition : IUseCaseDefinition [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The parameters of this Behavior, which are defined as its directedFeatures, whose values are passed diff --git a/SysML2.NET/Core/AutoGenPoco/UseCaseUsage.cs b/SysML2.NET/Core/AutoGenPoco/UseCaseUsage.cs index 9352a2c7b..01976e1d8 100644 --- a/SysML2.NET/Core/AutoGenPoco/UseCaseUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/UseCaseUsage.cs @@ -61,6 +61,7 @@ namespace SysML2.NET.Core.POCO.Systems.UseCases using SysML2.NET.Core.POCO.Systems.States; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -68,8 +69,19 @@ namespace SysML2.NET.Core.POCO.Systems.UseCases /// [Class(xmiId: "_19_0_4_12e503d9_1621460902507_609356_850", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class UseCaseUsage : IUseCaseUsage + public partial class UseCaseUsage : IUseCaseUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public UseCaseUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -967,7 +979,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1066,7 +1081,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/VariantMembership.cs b/SysML2.NET/Core/AutoGenPoco/VariantMembership.cs index 9ef4cd3db..9e166c350 100644 --- a/SysML2.NET/Core/AutoGenPoco/VariantMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/VariantMembership.cs @@ -33,6 +33,7 @@ namespace SysML2.NET.Core.POCO.Systems.DefinitionAndUsage using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -42,8 +43,23 @@ namespace SysML2.NET.Core.POCO.Systems.DefinitionAndUsage /// [Class(xmiId: "_19_0_2_59601fc_1590331535985_437424_487", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class VariantMembership : IVariantMembership + public partial class VariantMembership : IVariantMembership, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public VariantMembership() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -242,7 +258,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -250,7 +269,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The Usage that represents a variant in the context of the owningVariationDefinition or @@ -293,7 +315,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -301,7 +326,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/VerificationCaseDefinition.cs b/SysML2.NET/Core/AutoGenPoco/VerificationCaseDefinition.cs index 474b10434..9a0fd5072 100644 --- a/SysML2.NET/Core/AutoGenPoco/VerificationCaseDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/VerificationCaseDefinition.cs @@ -58,6 +58,7 @@ namespace SysML2.NET.Core.POCO.Systems.VerificationCases using SysML2.NET.Core.POCO.Systems.States; using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -66,8 +67,19 @@ namespace SysML2.NET.Core.POCO.Systems.VerificationCases /// [Class(xmiId: "_19_0_2_12e503d9_1596821335655_850182_10186", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class VerificationCaseDefinition : IVerificationCaseDefinition + public partial class VerificationCaseDefinition : IVerificationCaseDefinition, IContainedElement { + /// + /// Initialize a new instance of + /// + public VerificationCaseDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -638,7 +650,10 @@ public partial class VerificationCaseDefinition : IVerificationCaseDefinition [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -772,7 +787,10 @@ public partial class VerificationCaseDefinition : IVerificationCaseDefinition [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The parameters of this Behavior, which are defined as its directedFeatures, whose values are passed diff --git a/SysML2.NET/Core/AutoGenPoco/VerificationCaseUsage.cs b/SysML2.NET/Core/AutoGenPoco/VerificationCaseUsage.cs index 5d514e87a..43d311bfa 100644 --- a/SysML2.NET/Core/AutoGenPoco/VerificationCaseUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/VerificationCaseUsage.cs @@ -61,6 +61,7 @@ namespace SysML2.NET.Core.POCO.Systems.VerificationCases using SysML2.NET.Core.POCO.Systems.States; using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -68,8 +69,19 @@ namespace SysML2.NET.Core.POCO.Systems.VerificationCases /// [Class(xmiId: "_19_0_2_12e503d9_1596821359347_71332_10236", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class VerificationCaseUsage : IVerificationCaseUsage + public partial class VerificationCaseUsage : IVerificationCaseUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public VerificationCaseUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -958,7 +970,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1057,7 +1072,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/ViewDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ViewDefinition.cs index 875d05ba9..ba9d7ba66 100644 --- a/SysML2.NET/Core/AutoGenPoco/ViewDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ViewDefinition.cs @@ -57,6 +57,7 @@ namespace SysML2.NET.Core.POCO.Systems.Views using SysML2.NET.Core.POCO.Systems.States; using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -66,8 +67,19 @@ namespace SysML2.NET.Core.POCO.Systems.Views /// [Class(xmiId: "_19_0_2_59601fc_1583087286915_926479_556", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ViewDefinition : IViewDefinition + public partial class ViewDefinition : IViewDefinition, IContainedElement { + /// + /// Initialize a new instance of + /// + public ViewDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -585,7 +597,10 @@ public partial class ViewDefinition : IViewDefinition [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -719,7 +734,10 @@ public partial class ViewDefinition : IViewDefinition [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The full ownership-qualified name of this Element, represented in a form that is valid according to diff --git a/SysML2.NET/Core/AutoGenPoco/ViewRenderingMembership.cs b/SysML2.NET/Core/AutoGenPoco/ViewRenderingMembership.cs index dbe10cee3..99d6e523d 100644 --- a/SysML2.NET/Core/AutoGenPoco/ViewRenderingMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/ViewRenderingMembership.cs @@ -35,6 +35,7 @@ namespace SysML2.NET.Core.POCO.Systems.Views using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -43,8 +44,23 @@ namespace SysML2.NET.Core.POCO.Systems.Views /// [Class(xmiId: "_19_0_4_12e503d9_1617134177967_461389_5877", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ViewRenderingMembership : IViewRenderingMembership + public partial class ViewRenderingMembership : IViewRenderingMembership, IContainedRelationship { + /// + /// Initialize a new instance of + /// + public ViewRenderingMembership() + { + ((IContainedRelationship)this).OwnedRelatedElement = new ContainerList(this, + (element, relationship) => ((IContainedElement)element).OwningRelationship = relationship, + element => element.OwningRelationship); + + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -254,7 +270,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public List OwnedRelatedElement { get; set; } = []; + public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + + /// Backing field for IRelationship.OwnedRelatedElement + ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } /// /// The Relationships for which this Element is the owningRelatedElement. @@ -262,7 +281,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The owned RenderingUsage that is either itself the referencedRendering or subsets the @@ -305,7 +327,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwningRelatedElement")] - public IElement OwningRelatedElement { get; set; } + public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement; + + /// Backing field for IRelationship.OwningRelatedElement + IElement IContainedRelationship.OwningRelatedElement { get; set; } /// /// The Relationship for which this Element is an ownedRelatedElement, if any. @@ -313,7 +338,10 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that owns this FeatureMembership. diff --git a/SysML2.NET/Core/AutoGenPoco/ViewUsage.cs b/SysML2.NET/Core/AutoGenPoco/ViewUsage.cs index 0e749db79..4cc717602 100644 --- a/SysML2.NET/Core/AutoGenPoco/ViewUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ViewUsage.cs @@ -61,6 +61,7 @@ namespace SysML2.NET.Core.POCO.Systems.Views using SysML2.NET.Core.POCO.Systems.States; using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -70,8 +71,19 @@ namespace SysML2.NET.Core.POCO.Systems.Views /// [Class(xmiId: "_19_0_2_12e503d9_1596644366280_485907_701", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ViewUsage : IViewUsage + public partial class ViewUsage : IViewUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public ViewUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -907,7 +919,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1006,7 +1021,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/ViewpointDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ViewpointDefinition.cs index 4bc192cd9..355c9c895 100644 --- a/SysML2.NET/Core/AutoGenPoco/ViewpointDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ViewpointDefinition.cs @@ -58,6 +58,7 @@ namespace SysML2.NET.Core.POCO.Systems.Views using SysML2.NET.Core.POCO.Systems.States; using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -66,8 +67,19 @@ namespace SysML2.NET.Core.POCO.Systems.Views /// [Class(xmiId: "_19_0_2_12e503d9_1596649640349_746765_3429", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ViewpointDefinition : IViewpointDefinition + public partial class ViewpointDefinition : IViewpointDefinition, IContainedElement { + /// + /// Initialize a new instance of + /// + public ViewpointDefinition() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -640,7 +652,10 @@ string Root.Elements.IElement.DeclaredShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The RenderingUsages that are ownedUsages of this Definition. @@ -774,7 +789,10 @@ string Root.Elements.IElement.DeclaredShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The parameters of this Behavior, which are defined as its directedFeatures, whose values are passed diff --git a/SysML2.NET/Core/AutoGenPoco/ViewpointUsage.cs b/SysML2.NET/Core/AutoGenPoco/ViewpointUsage.cs index 244afb51c..e2ff68301 100644 --- a/SysML2.NET/Core/AutoGenPoco/ViewpointUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ViewpointUsage.cs @@ -61,6 +61,7 @@ namespace SysML2.NET.Core.POCO.Systems.Views using SysML2.NET.Core.POCO.Systems.States; using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -68,8 +69,19 @@ namespace SysML2.NET.Core.POCO.Systems.Views /// [Class(xmiId: "_19_0_2_59601fc_1583087291401_74297_590", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class ViewpointUsage : IViewpointUsage + public partial class ViewpointUsage : IViewpointUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public ViewpointUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -959,7 +971,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1058,7 +1073,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/AutoGenPoco/WhileLoopActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/WhileLoopActionUsage.cs index 1f7a1d67c..329ebcbaf 100644 --- a/SysML2.NET/Core/AutoGenPoco/WhileLoopActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/WhileLoopActionUsage.cs @@ -61,6 +61,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using SysML2.NET.Core.POCO.Systems.UseCases; using SysML2.NET.Core.POCO.Systems.VerificationCases; using SysML2.NET.Core.POCO.Systems.Views; + using SysML2.NET.Collections; using SysML2.NET.Decorators; /// @@ -72,8 +73,19 @@ namespace SysML2.NET.Core.POCO.Systems.Actions /// [Class(xmiId: "_19_0_4_12e503d9_1624306821108_998562_5594", isAbstract: false, isFinalSpecialization: false, isActive: false)] [GeneratedCode("SysML2.NET", "latest")] - public partial class WhileLoopActionUsage : IWhileLoopActionUsage + public partial class WhileLoopActionUsage : IWhileLoopActionUsage, IContainedElement { + /// + /// Initialize a new instance of + /// + public WhileLoopActionUsage() + { + ((IContainedElement)this).OwnedRelationship = new ContainerList(this, + (relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element, + relationship => relationship.OwningRelatedElement); + + } + /// /// Gets or sets the unique identifier /// @@ -918,7 +930,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public List OwnedRelationship { get; set; } = []; + public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + + /// Backing field for IElement.OwnedRelationship + ContainerList IContainedElement.OwnedRelationship { get; set; } /// /// The ownedRelationships of this Type that are Specializations, for which the Type is the specific @@ -1017,7 +1032,10 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwningRelationship")] - public IRelationship OwningRelationship { get; set; } + public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship; + + /// Backing field for IElement.OwningRelationship + IRelationship IContainedElement.OwningRelationship { get; set; } /// /// The Type that is the owningType of the owningFeatureMembership of this Feature. diff --git a/SysML2.NET/Core/Poco/IContainedElement.cs b/SysML2.NET/Core/Poco/IContainedElement.cs new file mode 100644 index 000000000..fe668449b --- /dev/null +++ b/SysML2.NET/Core/Poco/IContainedElement.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.Core.POCO.Root.Elements +{ + using SysML2.NET.Collections; + + /// + /// Provides internal locking principle to correctly implement the containment principle for the + /// + internal interface IContainedElement + { + /// + /// Provided backing field for + /// + ContainerList OwnedRelationship { get; set; } + + /// + /// Provided backing field for + /// + IRelationship OwningRelationship { get; set; } + } +} diff --git a/SysML2.NET/Core/Poco/IContainedRelationship.cs b/SysML2.NET/Core/Poco/IContainedRelationship.cs new file mode 100644 index 000000000..223797697 --- /dev/null +++ b/SysML2.NET/Core/Poco/IContainedRelationship.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.Core.POCO.Root.Elements +{ + using SysML2.NET.Collections; + + /// + /// Provides internal locking principle to correctly implement the containment principle for the + /// + internal interface IContainedRelationship: IContainedElement + { + /// + /// Backing field for the + /// + ContainerList OwnedRelatedElement { get; set; } + + /// + /// Backing field for the + /// + IElement OwningRelatedElement { get; set; } + } +} diff --git a/SysML2.NET/Extensions/ElementExtensions.cs b/SysML2.NET/Extensions/ElementExtensions.cs new file mode 100644 index 000000000..41148fcc9 --- /dev/null +++ b/SysML2.NET/Extensions/ElementExtensions.cs @@ -0,0 +1,91 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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 +{ + using System; + using System.Linq; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// Extension method for the interface + /// + public static class ElementExtensions + { + /// + /// Assigns the containment ownership of a child to a parent via the bridge + /// + /// The container + /// The bridge + /// The contained + /// If one of the parameter is null + /// If the equals the + /// or if the equals the + public static void AssignOwnership(this IElement parent, IRelationship bridgeRelationship, IElement child) + { + if (parent == null) + { + throw new ArgumentNullException(nameof(parent)); + } + + if (bridgeRelationship == null) + { + throw new ArgumentNullException(nameof(bridgeRelationship)); + } + + if (child == null) + { + throw new ArgumentNullException(nameof(child)); + } + + if (parent == child) + { + throw new InvalidOperationException("The parent cannot own itself."); + } + + if (bridgeRelationship == child) + { + throw new InvalidOperationException("The relationship can not own itself."); + } + + // Missing logic: Child can not contain Parent at any containment level + + if (bridgeRelationship.OwningRelatedElement != null && bridgeRelationship.OwningRelatedElement != parent) + { + ((IContainedElement)bridgeRelationship.OwningRelatedElement).OwnedRelationship.Remove(bridgeRelationship); + } + + ((IContainedRelationship)bridgeRelationship).OwningRelatedElement = parent; + + if (!parent.OwnedRelationship.Contains(bridgeRelationship)) + { + ((IContainedElement)parent).OwnedRelationship.Add(bridgeRelationship); + } + + if (child.OwningRelationship != null && child.OwningRelationship != bridgeRelationship) + { + ((IContainedRelationship)child.OwningRelationship).OwnedRelatedElement.Remove(child); + } + + ((IContainedRelationship)bridgeRelationship).OwnedRelatedElement.Add(child); + } + } +} diff --git a/SysML2.NET/SysML2.NET.csproj b/SysML2.NET/SysML2.NET.csproj index 72d0dcc1c..c8d3f7851 100644 --- a/SysML2.NET/SysML2.NET.csproj +++ b/SysML2.NET/SysML2.NET.csproj @@ -39,7 +39,9 @@ - + + + \ No newline at end of file From 2bb1d541b8922197b6446b396f23c7645b7c31d9 Mon Sep 17 00:00:00 2001 From: atheate Date: Mon, 16 Feb 2026 10:07:45 +0100 Subject: [PATCH 2/3] Rename --- SysML2.NET/Extensions/ElementExtensions.cs | 39 +++++++++++----------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/SysML2.NET/Extensions/ElementExtensions.cs b/SysML2.NET/Extensions/ElementExtensions.cs index 41148fcc9..78d305431 100644 --- a/SysML2.NET/Extensions/ElementExtensions.cs +++ b/SysML2.NET/Extensions/ElementExtensions.cs @@ -31,19 +31,20 @@ namespace SysML2.NET.Extensions public static class ElementExtensions { /// - /// Assigns the containment ownership of a child to a parent via the bridge + /// Assigns the containment ownership of a target to a source via the bridge /// - /// The container + /// The container /// The bridge - /// The contained + /// The contained /// If one of the parameter is null - /// If the equals the - /// or if the equals the - public static void AssignOwnership(this IElement parent, IRelationship bridgeRelationship, IElement child) + /// If the equals the + /// or if the equals the + /// Note: The source is the container element and the target is the containee + public static void AssignOwnership(this IElement source, IRelationship bridgeRelationship, IElement target) { - if (parent == null) + if (source == null) { - throw new ArgumentNullException(nameof(parent)); + throw new ArgumentNullException(nameof(source)); } if (bridgeRelationship == null) @@ -51,41 +52,41 @@ public static void AssignOwnership(this IElement parent, IRelationship bridgeRel throw new ArgumentNullException(nameof(bridgeRelationship)); } - if (child == null) + if (target == null) { - throw new ArgumentNullException(nameof(child)); + throw new ArgumentNullException(nameof(target)); } - if (parent == child) + if (source == target) { throw new InvalidOperationException("The parent cannot own itself."); } - if (bridgeRelationship == child) + if (bridgeRelationship == target) { throw new InvalidOperationException("The relationship can not own itself."); } // Missing logic: Child can not contain Parent at any containment level - if (bridgeRelationship.OwningRelatedElement != null && bridgeRelationship.OwningRelatedElement != parent) + if (bridgeRelationship.OwningRelatedElement != null && bridgeRelationship.OwningRelatedElement != source) { ((IContainedElement)bridgeRelationship.OwningRelatedElement).OwnedRelationship.Remove(bridgeRelationship); } - ((IContainedRelationship)bridgeRelationship).OwningRelatedElement = parent; + ((IContainedRelationship)bridgeRelationship).OwningRelatedElement = source; - if (!parent.OwnedRelationship.Contains(bridgeRelationship)) + if (!source.OwnedRelationship.Contains(bridgeRelationship)) { - ((IContainedElement)parent).OwnedRelationship.Add(bridgeRelationship); + ((IContainedElement)source).OwnedRelationship.Add(bridgeRelationship); } - if (child.OwningRelationship != null && child.OwningRelationship != bridgeRelationship) + if (target.OwningRelationship != null && target.OwningRelationship != bridgeRelationship) { - ((IContainedRelationship)child.OwningRelationship).OwnedRelatedElement.Remove(child); + ((IContainedRelationship)target.OwningRelationship).OwnedRelatedElement.Remove(target); } - ((IContainedRelationship)bridgeRelationship).OwnedRelatedElement.Add(child); + ((IContainedRelationship)bridgeRelationship).OwnedRelatedElement.Add(target); } } } From b788a16acd840d2b7607856948604e460babda8d Mon Sep 17 00:00:00 2001 From: atheate Date: Mon, 16 Feb 2026 10:14:10 +0100 Subject: [PATCH 3/3] Update doc --- SysML2.NET/Extensions/ElementExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SysML2.NET/Extensions/ElementExtensions.cs b/SysML2.NET/Extensions/ElementExtensions.cs index 78d305431..39ace00d4 100644 --- a/SysML2.NET/Extensions/ElementExtensions.cs +++ b/SysML2.NET/Extensions/ElementExtensions.cs @@ -67,7 +67,7 @@ public static void AssignOwnership(this IElement source, IRelationship bridgeRel throw new InvalidOperationException("The relationship can not own itself."); } - // Missing logic: Child can not contain Parent at any containment level + // Missing logic: Target can not contain Source at any containment level if (bridgeRelationship.OwningRelatedElement != null && bridgeRelationship.OwningRelatedElement != source) {