Exemplo n.º 1
0
            public override void Put(ResourceKey key, ResourceValue value, bool noFallback)
            {
                IResourceTable contextsTable = value.GetTable();

                for (int i = 0; contextsTable.GetKeyAndValue(i, key, value); ++i)
                {
                    if (!contextUsageTypeMap.TryGetValue(key.ToString(), out CapitalizationContextUsage usage))
                    {
                        continue;
                    }


                    int[] intVector = value.GetInt32Vector();
                    if (intVector.Length < 2)
                    {
                        continue;
                    }

                    int titlecaseInt = (dataTableCultureDisplayNames.displayContextOptions.Capitalization == Capitalization.UIListOrMenu)
                            ? intVector[0] : intVector[1];
                    if (titlecaseInt == 0)
                    {
                        continue;
                    }

                    dataTableCultureDisplayNames.capitalizationUsage[(int)usage] = true;
                    hasCapitalizationUsage = true;
                }
            }