public Line ( |
||
ss | ||
legacySymbol | ||
legacyEntity | ||
functionCode | ||
리턴 | string |
private int _exportSymbols(StreamWriter w, bool isFirst, string standard, int id) { LegacySymbolExport symbolExport = new LegacySymbolExport(_helper, standard); if (isFirst) { string headers = symbolExport.Headers; headers = "id," + headers; w.WriteLine(headers); w.Flush(); } foreach (SymbolSet ss in _lib.SymbolSets) { if (ss.LegacySymbols != null) { foreach (SymbolSetLegacySymbol legacySymbol in ss.LegacySymbols) { if (legacySymbol.EntityID != "NA" && legacySymbol.EntityID != "UNSPECIFIED") { string line = id.ToString() + "," + symbolExport.Line(ss, legacySymbol); id++; w.WriteLine(line); w.Flush(); } } } } return(id); }
private int _exportSymbols(StreamWriter w, bool isFirst, string standard, int id, bool asOriginal) { LegacySymbolExport symbolExport = new LegacySymbolExport(_helper, standard); if (isFirst) { string headers = symbolExport.Headers; headers = "id," + headers; w.WriteLine(headers); w.Flush(); } foreach (SymbolSet ss in _lib.SymbolSets) { logger.Info("Exporting symbols for: " + ss.ID); try { if (ss.LegacySymbols != null) { foreach (SymbolSetLegacySymbol legacySymbol in ss.LegacySymbols) { if (!legacySymbol.IsDuplicate) { if (legacySymbol.EntityID != "NA" && legacySymbol.EntityID != "UNSPECIFIED" && (asOriginal == false || legacySymbol.LegacyEntity == null)) { LegacyFunctionCodeType[] functionCodes = _helper.LegacyFunctions(legacySymbol.LegacyFunctionCode, standard); foreach (LegacyFunctionCodeType functionCode in functionCodes) { string line = id.ToString() + "," + symbolExport.Line(ss, legacySymbol, functionCode); id++; w.WriteLine(line); w.Flush(); } } else if ((legacySymbol.Remarks == "Retired" || asOriginal) && legacySymbol.LegacyEntity != null) { foreach (LegacyEntityType legacyEntity in legacySymbol.LegacyEntity) { LegacyFunctionCodeType[] functionCodes = _helper.LegacyFunctions(legacyEntity.LegacyFunctionCode, standard); foreach (LegacyFunctionCodeType functionCode in functionCodes) { string line = id.ToString() + "," + symbolExport.Line(ss, legacySymbol, legacyEntity, functionCode); id++; w.WriteLine(line); w.Flush(); } } } } } } } catch (Exception ex) { logger.Error(ex.Message); } } return(id); }
private int _exportSymbols(StreamWriter w, bool isFirst, string standard, int id, bool asOriginal) { LegacySymbolExport symbolExport = new LegacySymbolExport(_helper, standard); if (isFirst) { string headers = symbolExport.Headers; headers = "id," + headers; w.WriteLine(headers); w.Flush(); } foreach (SymbolSet ss in _lib.SymbolSets) { logger.Info("Exporting symbols for: " + ss.ID); try { if (ss.LegacySymbols != null) { foreach (SymbolSetLegacySymbol legacySymbol in ss.LegacySymbols) { if (!legacySymbol.IsDuplicate) { if (legacySymbol.EntityID != "NA" && legacySymbol.EntityID != "UNSPECIFIED" && (asOriginal == false || legacySymbol.LegacyEntity == null)) { LegacyFunctionCodeType[] functionCodes = _helper.LegacyFunctions(legacySymbol.LegacyFunctionCode, standard); foreach (LegacyFunctionCodeType functionCode in functionCodes) { string line = id.ToString() + "," + symbolExport.Line(ss, legacySymbol, functionCode); id++; w.WriteLine(line); w.Flush(); } } else if ((legacySymbol.Remarks == "Retired" || asOriginal) && legacySymbol.LegacyEntity != null) { foreach (LegacyEntityType legacyEntity in legacySymbol.LegacyEntity) { LegacyFunctionCodeType[] functionCodes = _helper.LegacyFunctions(legacyEntity.LegacyFunctionCode, standard); foreach (LegacyFunctionCodeType functionCode in functionCodes) { string line = id.ToString() + "," + symbolExport.Line(ss, legacySymbol, legacyEntity, functionCode); id++; w.WriteLine(line); w.Flush(); } } } } } } } catch (Exception ex) { logger.Error(ex.Message); } } return id; }