// Token: 0x060020F3 RID: 8435 RVA: 0x000978FC File Offset: 0x00095AFC
        public void WritePIMapping(string xmlNamespace, string clrNamespace, string assemblyName)
        {
            this.VerifyWriteState();
            this.ProcessMarkupExtensionNodes();
            XamlPIMappingNode xamlPIMappingNode = new XamlPIMappingNode(0, 0, this._depth, xmlNamespace, clrNamespace, assemblyName);

            if (!this._xamlTypeMapper.PITable.Contains(xmlNamespace))
            {
                ClrNamespaceAssemblyPair clrNamespaceAssemblyPair = new ClrNamespaceAssemblyPair(clrNamespace, assemblyName);
                this._xamlTypeMapper.PITable.Add(xmlNamespace, clrNamespaceAssemblyPair);
            }
            this._bamlRecordWriter.WritePIMapping(xamlPIMappingNode);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Write a mapping processing instruction to baml stream
        /// </summary>
        public void WritePIMapping(
            string    xmlNamespace,
            string    clrNamespace,
            string    assemblyName)
        {
            VerifyWriteState();
            ProcessMarkupExtensionNodes();

            XamlPIMappingNode piMapping = new XamlPIMappingNode(
                                                     0,
                                                     0,
                                                     _depth,
                                                     xmlNamespace,
                                                     clrNamespace,
                                                     assemblyName);
            if (!_xamlTypeMapper.PITable.Contains(xmlNamespace))
            {
                ClrNamespaceAssemblyPair mapping = new ClrNamespaceAssemblyPair(clrNamespace, assemblyName);
                _xamlTypeMapper.PITable.Add(xmlNamespace, mapping);
            }
            // Write it out anyway.  It is redundant but we are being asked to write it so write it.
            // In the round trip case this will preserve the exact file data.
            _bamlRecordWriter.WritePIMapping(piMapping);
        }