EpcClassFromComponents Method |
Creates an
EpcClass instance from the specified EPC Class scheme and components.
Depending on the scheme, the resulting
EpcClass instance will have
an EPC Class URI that consists of one of the following:
- (If the scheme corresponds to an EPC Scheme)
urn:epc:idpat:, the specified EPC class scheme name, a colon (:)
character, the specified components separated by dot (.) characters
with %xx escape sequences as required to conform to URI syntax, another dot,
and a wildcard asterisk (*)
- (If the scheme is an EPC Class Scheme not based on an EPC Scheme)
urn:epc:class:, the specified EPC class scheme name, a colon (:)
character, and the specified components separated by dot (.) characters
with %xx escape sequences as required to conform to URI syntax
Example: fromComponents(EpcClassScheme.SGTIN, "0614141", "112345")
returns an EpcClass instance whose EPC Class URI is
urn:epc:idpat:sgtin:0614141.112345.*.
Example: fromComponents(EpcClassScheme.LGTIN, "0614141", "112345", "a/b")
returns an EpcClass instance whose EPC Class URI is
urn:epc:class:lgtin:0614141.112345.a%2Fb.
Namespace: GS1.EPC.ApiAssembly: epc-epconly (in epc-epconly.dll) Version: 2.1.0.28145 (2.1.0.0)
Syntaxpublic static EpcClass FromComponents(
EpcClassScheme scheme,
params string[] components
)
Parameters
- scheme EpcClassScheme
-
- components String
-
Return Value
EpcClass
ExceptionsException | Condition |
---|
EpcException | if the number of components specified is not appropriate for
the specified EPC Class scheme, if any component has inappropriate syntax, or if the resulting
EpcClass would be invalid for any other reason.
|
See Also