TryParse Method
Definition
- Namespace
- Codebelt.Extensions.Asp.Versioning
- Assemblies
- Codebelt.Extensions.Asp.Versioning.dll
TryParse(ReadOnlySpan<char>, out ApiVersion)
Tries to parse the specified text into an API version by resolving aliases before using the fallback parser.
public virtual bool TryParse(ReadOnlySpan<char> text, out ApiVersion apiVersion)
Parameters
textReadOnlySpan<char>The API version text to parse.
apiVersionApiVersionWhen this method returns, contains the API version that matched either an alias or the fallback parser; otherwise, contains
null.
Returns
- bool
trueiftextmatched an alias or was accepted by the fallback parser; otherwise,false.
Remarks
Override this method to customize alias resolution while preserving the same parse contract.