public string GetAppropriateFormatKeyForType(CsvFieldType type) { string ret = null; foreach (string key in this.CsvFieldTypeFormatsAvailable.Keys) { if (key.Contains(type.ToString()) == false) continue; ret = key; break; } return ret; }
public string GetAppropriateFormatKeyForType(CsvFieldType type) { string ret = null; foreach (string key in this.CsvFieldTypeFormatsAvailable.Keys) { if (key.Contains(type.ToString()) == false) { continue; } ret = key; break; } return(ret); }
public void AddFormatForTypeUnique(string selectedFormat, CsvFieldType csvFieldType) { string storedUnderKey = this.GetAppropriateFormatKeyForType(csvFieldType); if (storedUnderKey == null) { //throw new Exception("CANT_GUESS_KEY_FOR_FORMATS_AVAILABLE_FOR_TYPE dataSnapshot.GetAppropriateFormatKeyForType(" + iCatcherEdited.Parser.CsvType + ")=null"); storedUnderKey = csvFieldType.ToString(); this.CsvFieldTypeFormatsAvailable.Add(storedUnderKey, new List <string>()); } List <string> typeFormats = this.CsvFieldTypeFormatsAvailable[storedUnderKey]; if (typeFormats.Contains(selectedFormat) == false) { typeFormats.Add(selectedFormat); typeFormats.Sort(); } }
public void AddFormatForTypeUnique(string selectedFormat, CsvFieldType csvFieldType) { string storedUnderKey = this.GetAppropriateFormatKeyForType(csvFieldType); if (storedUnderKey == null) { //throw new Exception("CANT_GUESS_KEY_FOR_FORMATS_AVAILABLE_FOR_TYPE dataSnapshot.GetAppropriateFormatKeyForType(" + iCatcherEdited.Parser.CsvType + ")=null"); storedUnderKey = csvFieldType.ToString(); this.CsvFieldTypeFormatsAvailable.Add(storedUnderKey, new List<string>()); } List<string> typeFormats = this.CsvFieldTypeFormatsAvailable[storedUnderKey]; if (typeFormats.Contains(selectedFormat) == false) { typeFormats.Add(selectedFormat); typeFormats.Sort(); } }