當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。