Table of Contents

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

public static SpecRef ToSpecRef(this ProductSpecification productSpecification)

Parameters

productSpecification ProductSpecification

Returns

SpecRef

TryToSpecRef(ProductSpecification, out SpecRef)

Attempts to derive a SpecRef from this product specification entry. Tries, in order:

  1. Name + Version.
  2. 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

productSpecification ProductSpecification
specRef SpecRef

Returns

bool