Skip to content

Fix #218: PackageExtension methods implemented#219

Merged
antoineatstariongroup merged 1 commit intodevelopmentfrom
218-feature-implement-package-extension-methods
Apr 21, 2026
Merged

Fix #218: PackageExtension methods implemented#219
antoineatstariongroup merged 1 commit intodevelopmentfrom
218-feature-implement-package-extension-methods

Conversation

@antoineatstariongroup
Copy link
Copy Markdown
Collaborator

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the SysML2.NET code style guidelines
  • I have provided test coverage for my change (where applicable)

Description

Provided implementation for extension methods for the IPackage interface

@antoineatstariongroup antoineatstariongroup linked an issue Apr 20, 2026 that may be closed by this pull request
8 tasks
@antoineatstariongroup antoineatstariongroup marked this pull request as ready for review April 20, 2026 14:48
throw new ArgumentNullException(nameof(packageSubject));
}

if (element == null)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this not throw an exception, or does the spec allow this to be null?

throw new ArgumentNullException(nameof(packageSubject));
}

var importedMembership= packageSubject.ComputeImportedMembershipsOperation(excluded);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ComputeRedefinedImportedMembershipsOperation returns the list from
ComputeImportedMembershipsOperation directly when there are no filters (line 77), but returns a fresh
.ToList() in the filtered branch (line 80). Callers mutating the return would mutate the underlying namespace
computation in one branch and not the other. Return .ToList() (or a new
List(importedMembership)) in both branches for consistent ownership semantics

@antoineatstariongroup antoineatstariongroup merged commit c0168d3 into development Apr 21, 2026
7 checks passed
@antoineatstariongroup antoineatstariongroup deleted the 218-feature-implement-package-extension-methods branch April 21, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Implement Package Extension methods

2 participants