public object ProcessXmlResource(Stream stream)
            {
                XmlPreprocessor preprocessor = new XmlPreprocessor();

                preprocessor.Add("version", new Version(ApplicationEnvironment.ProductVersion));
                preprocessor.Add("language", CultureInfo.CurrentUICulture.TwoLetterISOLanguageName);
                preprocessor.Add("culture", CultureInfo.CurrentUICulture.Name);

                XmlDocument document = new XmlDocument();

                document.Load(stream);
                preprocessor.Munge(document);

                MemoryStream processedStream = new MemoryStream();

                document.Save(processedStream);
                processedStream.Seek(0, SeekOrigin.Begin);

                return(_processor(processedStream));
            }
            public object ProcessXmlResource(Stream stream)
            {
                XmlPreprocessor preprocessor = new XmlPreprocessor();
                preprocessor.Add("version", new Version(ApplicationEnvironment.ProductVersion));
                preprocessor.Add("language", CultureInfo.CurrentUICulture.TwoLetterISOLanguageName);
                preprocessor.Add("culture", CultureInfo.CurrentUICulture.Name);

                XmlDocument document = new XmlDocument();
                document.Load(stream);
                preprocessor.Munge(document);

                MemoryStream processedStream = new MemoryStream();
                document.Save(processedStream);
                processedStream.Seek(0, SeekOrigin.Begin);

                return _processor(processedStream);
            }