Esempio n. 1
0
        private IEnumerable <Instruction> ConvertToNodes(Stream stream)
        {
            var reader            = new XmlCompatibilityReader(stream);
            var runtimeTypeSource = RuntimeTypeSource;
            var pullParser        = new InstructionParser(runtimeTypeSource);
            var protoParser       = new ProtoInstructionParser(runtimeTypeSource);

            return(pullParser.Parse(protoParser.Parse(reader)).ToList());
        }
Esempio n. 2
0
        private static IEnumerable <Instruction> ReadNodes(Type underlyingType)
        {
            var resourceProvider = new InflatableTranslator();

            using (var stream = resourceProvider.GetInflationSourceStream(underlyingType))
            {
                var reader            = new XmlCompatibilityReader(stream);
                var runtimeTypeSource = new WpfRuntimeTypeSource();
                var loader            = new InstructionParser(runtimeTypeSource);
                var protoParser       = new ProtoInstructionParser(runtimeTypeSource);

                return(loader.Parse(protoParser.Parse(reader)));
            }
        }
Esempio n. 3
0
        private static IEnumerable<Instruction> ReadNodes(Type underlyingType)
        {
            var resourceProvider = new InflatableTranslator();

            using (var stream = resourceProvider.GetInflationSourceStream(underlyingType))
            {
                var reader = new XmlCompatibilityReader(stream);
                var runtimeTypeSource = new WpfRuntimeTypeSource();
                var loader = new InstructionParser(runtimeTypeSource);
                var protoParser = new ProtoInstructionParser(runtimeTypeSource);

                return loader.Parse(protoParser.Parse(reader));
            }
        }