System.Xml.Xsl.XsltArgumentList.GetExtensionObject C# (CSharp) Method

GetExtensionObject() public method

public GetExtensionObject ( string namespaceUri ) : object
namespaceUri string
return object
        public object GetExtensionObject(string namespaceUri)
        {
            return _extensions[namespaceUri];
        }

Usage Example

Exemplo n.º 1
0
        public void GetExtObject9()
        {
            int i = 1;
            m_xsltArg = new XsltArgumentList();

            foreach (String str in szWhiteSpace)
            {
                MyObject obj = new MyObject(i, _output);

                m_xsltArg.AddExtensionObject(szDefaultNS + str, obj);
                retObj = m_xsltArg.GetExtensionObject(szDefaultNS + str);
                if (((MyObject)retObj).MyValue() != i)
                {
                    _output.WriteLine("Error processing {0} test for whitespace arg", i);
                    Assert.True(false);
                }
                i++;
            }

            try
            {
                if ((LoadXSL("MyObjectDef.xsl") == 1))
                    Transform_ArgList("fruits.xml");
            }
            catch (System.Xml.Xsl.XsltException)
            {
                return;
            }
            _output.WriteLine("Did not throw expected exception: System.Xml.Xsl.XsltException");
            Assert.True(false);
        }
All Usage Examples Of System.Xml.Xsl.XsltArgumentList::GetExtensionObject