Ejemplo n.º 1
0
 public ParserResourceCatalog (Parser parser)
 {
     foreach (var unit in parser.Parse ()) {
         var str = unit as LocalizedString;
         if (str != null) {
             foreach (var resource in ResourceString.Generate (ResourceIdType, str)) {
                 resources.Add (resource.Id, resource.Translated);
             }
         }
     }
 }
Ejemplo n.º 2
0
 public AssemblyParser (Parser embeddedResourceParser = null)
 {
     embedded_resource_parser = embeddedResourceParser;
 }
Ejemplo n.º 3
0
        public void Reduce (Parser masterSet, Parser subSet)
        {
            foreach (var localization_unit in subSet.Parse ()) {
                var localized_string = localization_unit as LocalizedString;
                if (localized_string != null) {
                    Add (localized_string, stripMetadata: true);
                }
            }

            foreach (var localization_unit in masterSet.Parse ()) {
                var localized_string = localization_unit as LocalizedString;
                var localization_metadata = localization_unit as LocalizationMetadata;

                if (localized_string != null) {
                    Merge (localized_string, stripMetadata: true);
                } else if (localization_metadata != null) {
                    Add (localization_metadata);
                }
            }
        }
Ejemplo n.º 4
0
 public XapParser (Parser parserForParts)
 {
     parser_for_parts = parserForParts;
 }
Ejemplo n.º 5
0
        public void Reduce(Parser masterSet, Parser subSet)
        {
            foreach (var localized_string in subSet.Parse ()) {
                Add (localized_string, stripMetadata: true);
            }

            foreach (var localized_string in masterSet.Parse ()) {
                Merge (localized_string, stripMetadata: true);
            }
        }