Class ProductSpecificationExtensions
- Namespace
- EncDotNet.S100.ExchangeSets
- Assembly
- EncDotNet.S100.ExchangeSets.dll
Extensions that bridge the loosely-typed exchange-set ProductSpecification DTO to the strongly-typed SpecRef identity used elsewhere in the pipeline.
public static class ProductSpecificationExtensions
- Inheritance
-
ProductSpecificationExtensions
- Inherited Members
Methods
ToSpecRef(ProductSpecification)
Strict variant of TryToSpecRef(ProductSpecification, out SpecRef); throws FormatException when neither Name
- Version nor ProductIdentifier can be resolved.
public static SpecRef ToSpecRef(this ProductSpecification productSpecification)
Parameters
productSpecificationProductSpecification
Returns
TryToSpecRef(ProductSpecification, out SpecRef)
Attempts to derive a SpecRef from this product specification entry. Tries, in order:
- Name + Version.
- ProductIdentifier in the long-form
"INT.IHO.S-NNN.x.y.z"shape (which carries both name and version).
Returns false when neither shape yields a parseable
SpecRef.
public static bool TryToSpecRef(this ProductSpecification productSpecification, out SpecRef specRef)
Parameters
productSpecificationProductSpecificationspecRefSpecRef