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);
             }
         }
     }
 }
Beispiel #2
0
 public AssemblyParser (Parser embeddedResourceParser = null)
 {
     embedded_resource_parser = embeddedResourceParser;
 }
Beispiel #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);
                }
            }
        }
Beispiel #4
0
 public XapParser (Parser parserForParts)
 {
     parser_for_parts = parserForParts;
 }
Beispiel #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);
            }
        }