Skip to content

Commit 6a10112

Browse files
First extension only implementation
1 parent 606a65d commit 6a10112

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

SysML2.NET/Extend/ClassifierExtensions.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ namespace SysML2.NET.Core.POCO.Core.Classifiers
2222
{
2323
using System;
2424
using System.Collections.Generic;
25+
using System.Linq;
2526

2627
using SysML2.NET.Core.Core.Types;
2728
using SysML2.NET.Core.Root.Namespaces;
@@ -53,10 +54,13 @@ internal static class ClassifierExtensions
5354
/// <returns>
5455
/// the computed result
5556
/// </returns>
56-
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
57+
/// [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
5758
internal static List<ISubclassification> ComputeOwnedSubclassification(this IClassifier classifierSubject)
5859
{
59-
throw new NotSupportedException("Create a GitHub issue when this method is required");
60+
return classifierSubject == null
61+
? throw new ArgumentNullException(nameof(classifierSubject))
62+
: [..classifierSubject.ownedSpecialization.OfType<ISubclassification>()];
63+
//throw new NotSupportedException("Create a GitHub issue when this method is required");
6064
}
6165

6266
}

0 commit comments

Comments
 (0)