You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: QueryFormattedValue returns OtherContent instead of the names of the selected enumeration literals
#88
I have verified that I am running the latest version of the reqifsharp
I have searched open and closed issues to ensure it has not already been reported
Description
ReqIFSharp.Extensions: AttributeValueExtensions.QueryFormattedValue() formats an AttributeValueEnumeration as the Properties.OtherContent of the selected EnumValues, joined by ;. OtherContent is free text that most tools leave empty or fill with an internal value; the name users know is the literal's LongName.
In the ReqIF Viewer this shows up as values like "Other content for: not applicable" (Subset026 sample) and as empty cells for other files.
Proposal
Return the LongName of the selected literals (falling back to Identifier), or keep the current behaviour and add a method that returns the names. Changing it is a breaking change for anyone who relies on OtherContent; mark it as such in the CHANGELOG if chosen.
Acceptance criteria
For Datatype-Demo.reqif (test data), the enumeration values are formatted as the literal names, for example "One;Two;Three".
Steps to Reproduce
varreqif=newReqIFDeserializer().Deserialize("Datatype-Demo.reqif").First();varvalue=reqif.CoreContent.SpecObjects.SelectMany(o =>o.Values).OfType<AttributeValueEnumeration>().First();Console.WriteLine(string.Join(", ",value.Values.Select(v =>v.LongName)));// One, Two, ThreeConsole.WriteLine(value.QueryFormattedValue());// 1;2;3 (the OtherContent of each literal)
Activity