/// <summary>
                ///  currencySpacing{
                ///      afterCurrency{
                ///          currencyMatch{"[:^S:]"}
                ///          insertBetween{" "}
                ///          surroundingMatch{"[:digit:]"}
                ///      }
                ///      beforeCurrency{
                ///          currencyMatch{"[:^S:]"}
                ///          insertBetween{" "}
                ///          surroundingMatch{"[:digit:]"}
                ///      }
                ///  }
                /// </summary>
                internal void ConsumeCurrencySpacingTable(UResource.Key key, UResource.Value value)
                {
                    Debug.Assert(spacingInfo != null);
                    UResource.ITable spacingTypesTable = value.GetTable();
                    for (int i = 0; spacingTypesTable.GetKeyAndValue(i, key, value); ++i)
                    {
                        CurrencySpacingInfo.SpacingType type;
                        if (key.ContentEquals("beforeCurrency"))
                        {
                            type = CurrencySpacingInfo.SpacingType.Before;
                            spacingInfo.hasBeforeCurrency = true;
                        }
                        else if (key.ContentEquals("afterCurrency"))
                        {
                            type = CurrencySpacingInfo.SpacingType.After;
                            spacingInfo.hasAfterCurrency = true;
                        }
                        else
                        {
                            continue;
                        }

                        UResource.ITable patternsTable = value.GetTable();
                        for (int j = 0; patternsTable.GetKeyAndValue(j, key, value); ++j)
                        {
                            CurrencySpacingInfo.SpacingPattern pattern;
                            if (key.ContentEquals("currencyMatch"))
                            {
                                pattern = CurrencySpacingInfo.SpacingPattern.CurrencyMatch;
                            }
                            else if (key.ContentEquals("surroundingMatch"))
                            {
                                pattern = CurrencySpacingInfo.SpacingPattern.SurroundingMatch;
                            }
                            else if (key.ContentEquals("insertBetween"))
                            {
                                pattern = CurrencySpacingInfo.SpacingPattern.InsertBetween;
                            }
                            else
                            {
                                continue;
                            }

                            spacingInfo.SetSymbolIfNull(type, pattern, value.GetString());
                        }
                    }
                }
 private void ConsumeTopTable(UResource.Key key, UResource.Value value)
 {
     UResource.ITable table = value.GetTable();
     for (int i = 0; table.GetKeyAndValue(i, key, value); i++)
     {
         if (key.ContentEquals("Currencies"))
         {
             ConsumeCurrenciesTable(key, value);
         }
         else if (key.ContentEquals("Currencies%variant"))
         {
             ConsumeCurrenciesVariantTable(key, value);
         }
         else if (key.ContentEquals("CurrencyPlurals"))
         {
             ConsumeCurrencyPluralsTable(key, value);
         }
     }
 }