protected override IFormatReaderContext Create(System.Xml.XmlReader parameter) { var resolver = _contexts.IsSatisfiedBy(parameter.NameTable) ? _contexts.Get(parameter.NameTable) .NamespaceManager : parameter as IXmlNamespaceResolver ?? Default(parameter); var mapper = new IdentityMapper(_store, resolver); var reflector = new TypePartReflector(mapper, _types); var types = new TypeParser(reflector); var parser = new ReflectionParser(types, reflector); var result = new FormatReaderContext(mapper, parser); return(result); }
IXmlNamespaceResolver Determine(System.Xml.XmlReader parameter) => parameter.NameTable != null && _contexts.IsSatisfiedBy(parameter.NameTable) ? _contexts.Get(parameter.NameTable).NamespaceManager : null;