Inheritance: IXamlNamespaceResolver
コード例 #1
0
        public XamlXmlReader(XmlReader xmlReader, XamlSchemaContext schemaContext, XamlXmlReaderSettings settings)
        {
            if (xmlReader == null)
            {
                throw new ArgumentNullException("xmlReader");
            }
            if (schemaContext == null)
            {
                throw new ArgumentNullException("schemaContext");
            }

            sctx          = schemaContext;
            this.settings = settings ?? new XamlXmlReaderSettings();

            // filter out some nodes.
            var xrs = new XmlReaderSettings()
            {
                CloseInput     = this.settings.CloseInput,
                IgnoreComments = true,
                IgnoreProcessingInstructions = true,
                IgnoreWhitespace             = true
            };

            r         = XmlReader.Create(xmlReader, xrs);
            line_info = r as IXmlLineInfo;
            xaml_namespace_resolver = new NamespaceResolver(r as IXmlNamespaceResolver);
        }
コード例 #2
0
 public ValueSerializerContext(PrefixLookup prefixLookup, XamlSchemaContext schemaContext)
 {
     if (prefixLookup == null)
     {
         throw new ArgumentNullException("prefixLookup");
     }
     if (schemaContext == null)
     {
         throw new ArgumentNullException("schemaContext");
     }
     prefix_lookup      = prefixLookup;
     namespace_resolver = new NamespaceResolver(prefix_lookup.Namespaces);
     type_resolver      = new XamlTypeResolver(namespace_resolver, schemaContext);
     sctx = schemaContext;
 }
コード例 #3
0
        public XamlXmlParser(XmlReader xmlReader, XamlSchemaContext schemaContext, XamlXmlReaderSettings settings)
        {
            if (xmlReader == null)
            {
                throw new ArgumentNullException(nameof(xmlReader));
            }
            if (schemaContext == null)
            {
                throw new ArgumentNullException(nameof(schemaContext));
            }

            sctx          = schemaContext;
            this.settings = settings ?? default_settings;
            if (settings?.SkipXmlCompatibilityProcessing != true)
            {
                xmlReader = new CompatibleXmlReader(xmlReader, schemaContext);
            }

            r         = xmlReader;
            line_info = r as IXmlLineInfo;
            xaml_namespace_resolver = new NamespaceResolver(r as IXmlNamespaceResolver);
        }
コード例 #4
0
 public XamlTypeResolver(NamespaceResolver namespaceResolver, XamlSchemaContext schemaContext)
 {
     ns_resolver    = namespaceResolver;
     schema_context = schemaContext;
 }
コード例 #5
0
ファイル: XamlObjectWriter.cs プロジェクト: jdecuyper/mono
			public XamlTypeResolver (NamespaceResolver namespaceResolver, XamlSchemaContext schemaContext)
			{
				ns_resolver = namespaceResolver;
				schema_context = schemaContext;
			}
コード例 #6
0
ファイル: XamlObjectWriter.cs プロジェクト: jdecuyper/mono
			public XamlObjectWriterServiceProvider (XamlObjectWriter writer)
			{
				namespace_resolver = new NamespaceResolver (writer.namespaces);
				type_resolver = new XamlTypeResolver (namespace_resolver, writer.SchemaContext);
			}