private static DbfField CreateDbfField(string columnName, object val)
    {
        if (val == null)
        {
            return(null);
        }
        DbfField field = new DbfField();

        field.SetColumnName(columnName);
        field.SetValue(val);
        return(field);
    }
 private static void AddLocStrings(DbfRecord record, List <LocalizedString> protoStrings)
 {
     for (int i = 0; i < protoStrings.Count; i++)
     {
         List <DbfLocValue> val = new List <DbfLocValue>();
         LocalizedString    str = protoStrings[i];
         string             key = str.Key;
         for (int j = 0; j < str.Values.Count; j++)
         {
             LocalizedStringValue value2 = str.Values[j];
             Locale      locale          = (Locale)value2.Locale;
             DbfLocValue item            = new DbfLocValue();
             item.SetLocale(locale);
             item.SetValue(TextUtils.DecodeWhitespaces(value2.Value));
             val.Add(item);
         }
         DbfField field = new DbfField();
         field.SetColumnName(key);
         field.SetValue(val);
         record.AddField(field);
     }
 }