Class OdfCns11643MappingTable
Parses and joins CNS 11643 code mapping tables. 解析並聯結 CNS 11643 字碼對照表。
public static class OdfCns11643MappingTable
- Inheritance
-
OdfCns11643MappingTable
- Inherited Members
Remarks
Mapping data is available from the CNS open data service under the Open Government Data License, version 1.0; this repository does not embed that data. 對照資料來源為全字庫開放資料,依政府資料開放授權條款第 1 版提供;本倉庫不內建該資料。
Methods
JoinOnCns(IReadOnlyDictionary<string, int>, IReadOnlyDictionary<string, int>)
Joins two mappings by their shared CNS 11643 codes. 依共用的 CNS 11643 字碼聯結兩份對照表。
public static IReadOnlyDictionary<int, int> JoinOnCns(IReadOnlyDictionary<string, int> cnsToSource, IReadOnlyDictionary<string, int> cnsToTarget)
Parameters
cnsToSourceIReadOnlyDictionary<string, int>The CNS-code-to-source-value mapping. / CNS 字碼至來源值的對應表。
cnsToTargetIReadOnlyDictionary<string, int>The CNS-code-to-target-value mapping. / CNS 字碼至目標值的對應表。
Returns
- IReadOnlyDictionary<int, int>
A source-value-to-target-value mapping for shared CNS codes. / 共用 CNS 字碼所形成的來源值至目標值對應表。
Exceptions
Parse(TextReader)
Parses a CNS 11643 mapping table from a text reader. 從文字讀取器解析 CNS 11643 字碼對照表。
public static IReadOnlyDictionary<string, int> Parse(TextReader reader)
Parameters
readerTextReaderThe reader containing the official tab-delimited mapping data. / 包含官方跳格分隔對照資料的讀取器。
Returns
- IReadOnlyDictionary<string, int>
A CNS-code-to-value mapping using ordinal key comparison. / 使用序數鍵值比較的 CNS 字碼至數值對應表。
Exceptions
- ArgumentNullException
- FormatException
A nonblank line does not use the expected format. / 非空白行不符合預期格式。