Exemplo n.º 1
0
        private void BuildResources(IStreamSource source)
        {
            string resxMarkup = GetMarkup(source);
            List<ResXItem> resourceItems = ResXParser.ParseResxMarkup(resxMarkup);

            string resourceName = Utility.GetResourceFileName(source.Name);
            Dictionary<string, ResXItem> existingResourceItems = symbols.GetResources(resourceName);

            foreach (ResXItem item in resourceItems) existingResourceItems[item.Name] = item;
        }
Exemplo n.º 2
0
        private void BuildResources(ResourcesSymbol resourcesSymbol)
        {
            ICollection <ResXItem> items = _symbols.GetResources(resourcesSymbol.Name).Values;

            if (items.Count != 0)
            {
                foreach (ResXItem item in items)
                {
                    FieldSymbol fieldSymbol = resourcesSymbol.GetMember(item.Name) as FieldSymbol;
                    Debug.Assert(fieldSymbol != null);

                    if (fieldSymbol != null)
                    {
                        fieldSymbol.Value = item.Value;
                    }
                }
            }
        }