Skip to content

[Bug]: Multiplicity inconsistency #312

Description

@antoineatstariongroup

What type of issue is this?

  • Bug report
  • Feature request

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am running the latest version of the SysML2.NET
  • I have searched open and closed issues to ensure it has not already been reported

Description

Some derived properties/operation are subsets of collection properties. For those that have the multiplicity as [1..1], a specific call to the RequiredSingleTypeOf method is applied to make sure to have one single element that matches.

When the multiplicity is [0..1], most of implementation uses naively the FirstOfDefault() from LinQ method that would silently accepts if the collection contains many elements that matches a predicate.

A new extension method that would be the sibling of RequiredSingleTypeOf but allowing default value shall be implemented. Current implemented extend methods that violates the rules has to be fixed

Steps to Reproduce

System Configuration

  • SysML2.NET version:
  • Environment (Operating system, version and so on):
  • .NET Framework version:
  • Additional information:

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions