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
Commit 44741bd
Browse filesBrowse the repository at this point in the historyBrowse files
refactor!: model StringOrStringList as a type hierarchy
StringOrStringList is now an abstract base with SingleString and
StringList subtypes instead of wrapping an AsyncApiAny that callers had
to inspect. Implicit conversions from string, string[] and List<string>
replace new StringOrStringList(new AsyncApiAny(...)), and invalid values
(non-strings, null items) can no longer be constructed. The Value
property is replaced by Write(IAsyncApiWriter) for serialization.
BREAKING CHANGE: the public constructor and the Value property are
removed. Construct values through the implicit conversions or the
SingleString/StringList constructors.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JsonArrayarray=>IsValidStringList(array)?newAsyncApiAny(array):thrownewArgumentException($"{nameof(StringOrStringList)} value should only contain string items."),
19
-
JsonValuejValue=>IsString(jValue)?newAsyncApiAny(jValue):thrownewArgumentException($"{nameof(StringOrStringList)} should be a string value or a string list."),
20
-
_ =>thrownewArgumentException($"{nameof(StringOrStringList)} should be a string value or a string list."),
0 commit comments