当前位置: 首页>>代码示例>>C#>>正文


C# XsltArgumentList.RemoveExtensionObject方法代码示例

本文整理汇总了C#中System.Xml.Xsl.XsltArgumentList.RemoveExtensionObject方法的典型用法代码示例。如果您正苦于以下问题:C# XsltArgumentList.RemoveExtensionObject方法的具体用法?C# XsltArgumentList.RemoveExtensionObject怎么用?C# XsltArgumentList.RemoveExtensionObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Xml.Xsl.XsltArgumentList的用法示例。


在下文中一共展示了XsltArgumentList.RemoveExtensionObject方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RemoveExtObj5

 public void RemoveExtObj5()
 {
     m_xsltArg = new XsltArgumentList();
     MyObject obj = new MyObject(5, _output);
     ///nonePermSet.PermitOnly(); ;
     m_xsltArg.AddExtensionObject("urn:" + szLongNS, obj);
     m_xsltArg.RemoveExtensionObject("urn:" + szLongNS);
     ///CodeAccessPermission.RevertPermitOnly();
     try
     {
         if ((LoadXSL("MyObjectDef.xsl") == 1))
             Transform_ArgList("fruits.xml", true);
     }
     catch (System.Xml.Xsl.XsltException)
     {
         return;
     }
     _output.WriteLine("Did not throw expected exception");
     Assert.True(false);
 }
开发者ID:Corillian,项目名称:corefx,代码行数:20,代码来源:XsltArgumentList.cs

示例2: AddExtObject14

 public void AddExtObject14(object param)
 {
     string Baseline = "baseline\\" + (string)param;
     MyObject obj = new MyObject(14, _output);
     m_xsltArg = new XsltArgumentList();
     ///nonePermSet.PermitOnly(); ;
     for (int i = 0; i < 400; i++)
     {
         m_xsltArg.AddExtensionObject(szDefaultNS, obj);
         m_xsltArg.RemoveExtensionObject(szDefaultNS);
     }
     m_xsltArg.AddExtensionObject(szDefaultNS, obj);
     ///CodeAccessPermission.RevertPermitOnly();
     if ((LoadXSL("MyObjectDef.xsl") == 1) && (Transform_ArgList("fruits.xml") == 1))
     {
         VerifyResult(Baseline, _strOutFile);
         return;
     }
     else
         Assert.True(false);
 }
开发者ID:Corillian,项目名称:corefx,代码行数:21,代码来源:XsltArgumentList.cs

示例3: RemoveExtObj2

        public void RemoveExtObj2()
        {
            MyObject obj = new MyObject(2, _output);
            m_xsltArg = new XsltArgumentList();

            try
            {
                m_xsltArg.RemoveExtensionObject(null);
            }
            catch (System.ArgumentNullException)
            {
                return;
            }
            _output.WriteLine("Exception not generated for null parameter name");
            Assert.True(false);
        }
开发者ID:Corillian,项目名称:corefx,代码行数:16,代码来源:XsltArgumentList.cs

示例4: RemoveExtObj6

        public void RemoveExtObj6()
        {
            string expected = @"<?xml version=""1.0"" encoding=""utf-8""?><result>
		1.No Value Specified
		2.No Value Specified
		3.No Value Specified
		4.No Value Specified
		5.No Value Specified
		6.No Value Specified</result>";

            MyObject obj = new MyObject(6, _output);
            m_xsltArg = new XsltArgumentList();

            m_xsltArg.AddExtensionObject("urn:my-object", obj);
            m_xsltArg.RemoveExtensionObject("urn:my-object");

            m_xsltArg.AddExtensionObject("urn:my-object", 2);
            m_xsltArg.RemoveExtensionObject("urn:my-object");

            m_xsltArg.AddExtensionObject("urn:my-object", "Test String");
            m_xsltArg.RemoveExtensionObject("urn:my-object");

            m_xsltArg.AddExtensionObject("urn:my-object", (double)5.1);
            m_xsltArg.RemoveExtensionObject("urn:my-object");

            m_xsltArg.AddExtensionObject("urn:my-object", true);
            m_xsltArg.RemoveExtensionObject("urn:my-object");

            m_xsltArg.AddExtensionObject("urn:my-object", false);
            m_xsltArg.RemoveExtensionObject("urn:my-object");

            if ((LoadXSL("showParam.xsl") == 1) && (Transform_ArgList("fruits.xml") == 1))
            {
                VerifyResult(expected);
                return;
            }
            else
                Assert.True(false);
        }
开发者ID:chcosta,项目名称:corefx,代码行数:39,代码来源:CXslTArgumentList.cs

示例5: RemoveExtObj9

        public void RemoveExtObj9()
        {
            MyObject obj = new MyObject(10, _output);
            m_xsltArg = new XsltArgumentList();

            m_xsltArg.RemoveExtensionObject(szDefaultNS);

            // ensure we can still do a transform
            if ((LoadXSL("showParam.xsl") == 1) && (Transform_ArgList("fruits.xml") == 1) &&
                (CheckResult(466.5112789241) == 1))
                return;
            else
                Assert.True(false);
        }
开发者ID:dotnet,项目名称:corefx,代码行数:14,代码来源:CXslTArgumentList.cs

示例6: RemoveExtObj8

        public void RemoveExtObj8()
        {
            int i = 1;
            m_xsltArg = new XsltArgumentList();
            ///nonePermSet.PermitOnly(); ;
            foreach (String str in szWhiteSpace)
            {
                MyObject obj = new MyObject(i, _output);

                m_xsltArg.AddExtensionObject(szDefaultNS + str, obj);
                m_xsltArg.RemoveExtensionObject(szDefaultNS + str);
                retObj = m_xsltArg.GetExtensionObject(szDefaultNS + str);
                if (retObj != null)
                {
                    _output.WriteLine("Error deleting case #{0} for whitespace arg", i);
                    Assert.True(false);
                }
                i++;
            }
            ///CodeAccessPermission.RevertPermitOnly();

            try
            {
                if ((LoadXSL("MyObjectDef.xsl") == 1))
                    Transform_ArgList("fruits.xml", true);
            }
            catch (System.Xml.Xsl.XsltException)
            {
                return;
            }
            _output.WriteLine("Did not exception for object that could not be executed");
            Assert.True(false);
        }
开发者ID:Corillian,项目名称:corefx,代码行数:33,代码来源:XsltArgumentList.cs

示例7: Clear8

        public void Clear8(object param)
        {
            string Baseline = "baseline\\" + (string)param;
            m_xsltArg = new XsltArgumentList();

            m_xsltArg.AddParam("myArg1", szEmpty, "Test1");
            retObj = m_xsltArg.GetParam("myArg1", szEmpty);
            if (retObj.ToString() != "Test1")
                return; //TEST_SKIPPED;
            retObj = m_xsltArg.RemoveParam("myArg1", szEmpty);
            m_xsltArg.Clear();

            if ((LoadXSL("showParam.xsl") != 1) || (Transform_ArgList("fruits.xml") != 1))
                Assert.True(false);

            VerifyResult(Baseline, _strOutFile);

            MyObject obj = new MyObject(26, _output);

            m_xsltArg.AddExtensionObject(szDefaultNS, obj);
            m_xsltArg.RemoveExtensionObject(szDefaultNS);
            m_xsltArg.Clear();

            if ((LoadXSL("MyObjectDef.xsl") == 1))
            {
                try
                {
                    Transform_ArgList("fruits.xml");
                }
                catch (System.Xml.Xsl.XsltException)
                {
                    return;
                }
            }
            _output.WriteLine("Exception not thrown for NS not found");
            Assert.True(false);
        }
开发者ID:Corillian,项目名称:corefx,代码行数:37,代码来源:XsltArgumentList.cs

示例8: RemoveExtObj1

        public void RemoveExtObj1()
        {
            MyObject obj = new MyObject(1, _output);
            m_xsltArg = new XsltArgumentList();

            m_xsltArg.AddExtensionObject(szDefaultNS, obj);
            m_xsltArg.RemoveExtensionObject(szDefaultNS);

            try
            {
                if ((LoadXSL("myObjectDef.xsl") == 1))
                    Transform_ArgList("fruits.xml", true);
            }
            catch (System.Xml.Xsl.XsltException)
            {
                return;
            }
            _output.WriteLine("Did not throw expected exception");
            Assert.True(false);
        }
开发者ID:dotnet,项目名称:corefx,代码行数:20,代码来源:CXslTArgumentList.cs

示例9: RemoveExtObj3

        public void RemoveExtObj3()
        {
            MyObject obj = new MyObject(10, _output);
            m_xsltArg = new XsltArgumentList();

            m_xsltArg.AddExtensionObject(szDefaultNS, obj);

            for (int i = 0; i < 500; i++)
                m_xsltArg.RemoveExtensionObject(szDefaultNS);

            if ((LoadXSL("showParam.xsl") == 1) && (Transform_ArgList("fruits.xml") == 1) &&
                (CheckResult(466.5112789241) == 1))
                return;
            else
                Assert.True(false);
        }
开发者ID:dotnet,项目名称:corefx,代码行数:16,代码来源:CXslTArgumentList.cs

示例10: PrepareArgs

 //перенесено
 public static void PrepareArgs(XsltArgumentList args){
     args.RemoveExtensionObject(Namespace);
     args.AddExtensionObject(Namespace, new XsltStandardExtension());
 }
开发者ID:Qorpent,项目名称:comdiv.oldcore,代码行数:5,代码来源:XsltStandardExtension.cs

示例11: RemoveExtObj4

 public void RemoveExtObj4(object param)
 {
     string Baseline = Path.Combine("baseline", (string)param);
     MyObject obj = new MyObject(4, _output);
     m_xsltArg = new XsltArgumentList();
     ///nonePermSet.PermitOnly(); ;
     m_xsltArg.AddExtensionObject(szDefaultNS, obj);
     m_xsltArg.RemoveExtensionObject(szSimple);
     ///CodeAccessPermission.RevertPermitOnly();
     if ((LoadXSL("myObjectDef.xsl") == 1) && (Transform_ArgList("fruits.xml") == 1))
     {
         VerifyResult(Baseline, _strOutFile);
         return;
     }
     else
         Assert.True(false);
 }
开发者ID:AtsushiKan,项目名称:corefx,代码行数:17,代码来源:XsltArgumentList.cs

示例12: Clear8

        public void Clear8()
        {
            string expected = @"<?xml version=""1.0"" encoding=""utf-8""?><result>
		1.No Value Specified
		2.No Value Specified
		3.No Value Specified
		4.No Value Specified
		5.No Value Specified
		6.No Value Specified</result>";

            m_xsltArg = new XsltArgumentList();

            m_xsltArg.AddParam("myArg1", szEmpty, "Test1");
            retObj = m_xsltArg.GetParam("myArg1", szEmpty);
            if (retObj.ToString() != "Test1")
                return; //return TEST_SKIPPED;
            retObj = m_xsltArg.RemoveParam("myArg1", szEmpty);
            m_xsltArg.Clear();

            if ((LoadXSL("showParam.xsl") != 1) || (Transform_ArgList("fruits.xml") != 1))
            Assert.True(false);

            VerifyResult(expected);

            MyObject obj = new MyObject(26, _output);

            m_xsltArg.AddExtensionObject(szDefaultNS, obj);
            m_xsltArg.RemoveExtensionObject(szDefaultNS);
            m_xsltArg.Clear();

            if ((LoadXSL("myObjectDef.xsl") == 1))
            {
                try
                {
                    Transform_ArgList("fruits.xml");
                }
                catch (System.Xml.Xsl.XsltException)
                {
                    return;
                }
            }
            _output.WriteLine("Exception not thrown for NS not found");
            Assert.True(false);
        }
开发者ID:chcosta,项目名称:corefx,代码行数:44,代码来源:CXslTArgumentList.cs

示例13: RemoveExtObj9

        public void RemoveExtObj9()
        {
            string expected = @"<?xml version=""1.0"" encoding=""utf-8""?><result>
		1.No Value Specified
		2.No Value Specified
		3.No Value Specified
		4.No Value Specified
		5.No Value Specified
		6.No Value Specified</result>";

            MyObject obj = new MyObject(10, _output);
            m_xsltArg = new XsltArgumentList();

            m_xsltArg.RemoveExtensionObject(szDefaultNS);

            // ensure we can still do a transform
            if ((LoadXSL("showParam.xsl") == 1) && (Transform_ArgList("fruits.xml") == 1))
            {
                VerifyResult(expected);
                return;
            }
            else
                Assert.True(false);
        }
开发者ID:chcosta,项目名称:corefx,代码行数:24,代码来源:CXslTArgumentList.cs

示例14: RemoveExtObj7

        public void RemoveExtObj7()
        {
            string expected = @"<?xml version=""1.0"" encoding=""utf-8""?><result xmlns:myObj=""urn:my-object"">
		1.Test1
		2.Test2
		3.Test3</result>";

            MyObject obj = new MyObject(7, _output);
            m_xsltArg = new XsltArgumentList();

            m_xsltArg.AddExtensionObject("urn:my-object", obj);

            m_xsltArg.RemoveExtensionObject("URN:MY-OBJECT");
            m_xsltArg.RemoveExtensionObject("urn:My-Object");
            m_xsltArg.RemoveExtensionObject("urn-my:object");
            m_xsltArg.RemoveExtensionObject("urn:my-object ");

            if ((LoadXSL("myObjectDef.xsl") == 1) && (Transform_ArgList("fruits.xml") == 1))
            {
                VerifyResult(expected);
                return;
            }
            else
                Assert.True(false);
        }
开发者ID:chcosta,项目名称:corefx,代码行数:25,代码来源:CXslTArgumentList.cs

示例15: RemoveExtObj6

        public void RemoveExtObj6(object param)
        {
            string Baseline = "baseline\\" + (string)param;
            MyObject obj = new MyObject(6, _output);
            m_xsltArg = new XsltArgumentList();
            ///nonePermSet.PermitOnly(); ;
            m_xsltArg.AddExtensionObject("urn:my-object", obj);
            m_xsltArg.RemoveExtensionObject("urn:my-object");

            m_xsltArg.AddExtensionObject("urn:my-object", 2);
            m_xsltArg.RemoveExtensionObject("urn:my-object");

            m_xsltArg.AddExtensionObject("urn:my-object", "Test String");
            m_xsltArg.RemoveExtensionObject("urn:my-object");

            m_xsltArg.AddExtensionObject("urn:my-object", (double)5.1);
            m_xsltArg.RemoveExtensionObject("urn:my-object");

            m_xsltArg.AddExtensionObject("urn:my-object", true);
            m_xsltArg.RemoveExtensionObject("urn:my-object");

            m_xsltArg.AddExtensionObject("urn:my-object", false);
            m_xsltArg.RemoveExtensionObject("urn:my-object");
            ///CodeAccessPermission.RevertPermitOnly();
            if ((LoadXSL("showParam.xsl") == 1) && (Transform_ArgList("fruits.xml") == 1))
            {
                VerifyResult(Baseline, _strOutFile);
                return;
            }
            else
                Assert.True(false);
        }
开发者ID:Corillian,项目名称:corefx,代码行数:32,代码来源:XsltArgumentList.cs


注:本文中的System.Xml.Xsl.XsltArgumentList.RemoveExtensionObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。