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()); }
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))); } }
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)); } }