本文整理汇总了C#中System.Xml.Xsl.XsltArgumentList.RemoveParam方法的典型用法代码示例。如果您正苦于以下问题:C# XsltArgumentList.RemoveParam方法的具体用法?C# XsltArgumentList.RemoveParam怎么用?C# XsltArgumentList.RemoveParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Xml.Xsl.XsltArgumentList
的用法示例。
在下文中一共展示了XsltArgumentList.RemoveParam方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RemoveParam11
public void RemoveParam11()
{
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>";
double d1 = double.PositiveInfinity;
double d2 = double.NegativeInfinity;
double d3 = double.NaN;
double d4 = 2.000001;
double d5 = 0.00;
double d6 = double.MaxValue;
double d7 = double.MinValue;
m_xsltArg = new XsltArgumentList();
m_xsltArg.AddParam("myArg1", szEmpty, d1);
m_xsltArg.RemoveParam("myArg1", szEmpty);
retObj = m_xsltArg.GetParam("myArg1", szEmpty);
if (retObj != null)
{
_output.WriteLine("Failed to remove {0}", d1);
Assert.True(false);
}
m_xsltArg.AddParam("myArg2", szEmpty, d2);
m_xsltArg.RemoveParam("myArg2", szEmpty);
retObj = m_xsltArg.GetParam("myArg2", szEmpty);
if (retObj != null)
{
_output.WriteLine("Failed to remove {0}", d2);
Assert.True(false);
}
m_xsltArg.AddParam("myArg3", szEmpty, d3);
m_xsltArg.RemoveParam("myArg3", szEmpty);
retObj = m_xsltArg.GetParam("myArg3", szEmpty);
if (retObj != null)
{
_output.WriteLine("Failed to remove {0}", d3);
Assert.True(false);
}
m_xsltArg.AddParam("myArg4", szEmpty, d4);
m_xsltArg.RemoveParam("myArg4", szEmpty);
retObj = m_xsltArg.GetParam("myArg4", szEmpty);
if (retObj != null)
{
_output.WriteLine("Failed to remove {0}", d4);
Assert.True(false);
}
m_xsltArg.AddParam("myArg5", szEmpty, d5);
m_xsltArg.RemoveParam("myArg5", szEmpty);
retObj = m_xsltArg.GetParam("myArg5", szEmpty);
if (retObj != null)
{
_output.WriteLine("Failed to remove {0}", d5);
Assert.True(false);
}
m_xsltArg.AddParam("myArg6", szEmpty, d6);
m_xsltArg.RemoveParam("myArg6", szEmpty);
retObj = m_xsltArg.GetParam("myArg6", szEmpty);
if (retObj != null)
{
_output.WriteLine("Failed to remove {0}", d6);
Assert.True(false);
}
m_xsltArg.AddParam("myArg7", szEmpty, d7);
m_xsltArg.RemoveParam("myArg7", szEmpty);
retObj = m_xsltArg.GetParam("myArg7", szEmpty);
if (retObj != null)
{
_output.WriteLine("Failed to remove {0}", d7);
Assert.True(false);
}
String obj = "0.00";
// string
m_xsltArg.AddParam("myArg1", szEmpty, obj);
m_xsltArg.RemoveParam("myArg1", szEmpty);
retObj = m_xsltArg.GetParam("myArg1", szEmpty);
if (retObj != null)
{
_output.WriteLine("Failed to remove {0}", obj);
Assert.True(false);
}
//int
int i = 2;
m_xsltArg.AddParam("myArg2", szEmpty, i);
m_xsltArg.RemoveParam("myArg2", szEmpty);
//.........这里部分代码省略.........
示例2: RemoveParam15
public void RemoveParam15()
{
m_xsltArg = new XsltArgumentList();
m_xsltArg.RemoveParam("myParam", szDefaultNS);
return;
}
示例3: GetParam15
public void GetParam15()
{
m_xsltArg = new XsltArgumentList();
m_xsltArg.AddParam("myArg1", szEmpty, "Test1");
m_xsltArg.RemoveParam("myArg1", szEmpty);
retObj = m_xsltArg.GetParam("myArg1", szEmpty);
if (retObj != null)
Assert.True(false);
return;
}
示例4: RemoveParam11
public void RemoveParam11(object param)
{
string Baseline = "baseline\\" + (string)param;
double d1 = double.PositiveInfinity;
double d2 = double.NegativeInfinity;
double d3 = double.NaN;
double d4 = 2.000001;
double d5 = 0.00;
double d6 = double.MaxValue;
double d7 = double.MinValue;
m_xsltArg = new XsltArgumentList();
m_xsltArg.AddParam("myArg1", szEmpty, d1);
m_xsltArg.RemoveParam("myArg1", szEmpty);
retObj = m_xsltArg.GetParam("myArg1", szEmpty);
if (retObj != null)
{
_output.WriteLine("Failed to remove {0}", d1);
Assert.True(false);
}
m_xsltArg.AddParam("myArg2", szEmpty, d2);
m_xsltArg.RemoveParam("myArg2", szEmpty);
retObj = m_xsltArg.GetParam("myArg2", szEmpty);
if (retObj != null)
{
_output.WriteLine("Failed to remove {0}", d2);
Assert.True(false);
}
m_xsltArg.AddParam("myArg3", szEmpty, d3);
m_xsltArg.RemoveParam("myArg3", szEmpty);
retObj = m_xsltArg.GetParam("myArg3", szEmpty);
if (retObj != null)
{
_output.WriteLine("Failed to remove {0}", d3);
Assert.True(false);
}
m_xsltArg.AddParam("myArg4", szEmpty, d4);
m_xsltArg.RemoveParam("myArg4", szEmpty);
retObj = m_xsltArg.GetParam("myArg4", szEmpty);
if (retObj != null)
{
_output.WriteLine("Failed to remove {0}", d4);
Assert.True(false);
}
m_xsltArg.AddParam("myArg5", szEmpty, d5);
m_xsltArg.RemoveParam("myArg5", szEmpty);
retObj = m_xsltArg.GetParam("myArg5", szEmpty);
if (retObj != null)
{
_output.WriteLine("Failed to remove {0}", d5);
Assert.True(false);
}
m_xsltArg.AddParam("myArg6", szEmpty, d6);
m_xsltArg.RemoveParam("myArg6", szEmpty);
retObj = m_xsltArg.GetParam("myArg6", szEmpty);
if (retObj != null)
{
_output.WriteLine("Failed to remove {0}", d6);
Assert.True(false);
}
m_xsltArg.AddParam("myArg7", szEmpty, d7);
m_xsltArg.RemoveParam("myArg7", szEmpty);
retObj = m_xsltArg.GetParam("myArg7", szEmpty);
if (retObj != null)
{
_output.WriteLine("Failed to remove {0}", d7);
Assert.True(false);
}
String obj = "0.00";
// string
m_xsltArg.AddParam("myArg1", szEmpty, obj);
m_xsltArg.RemoveParam("myArg1", szEmpty);
retObj = m_xsltArg.GetParam("myArg1", szEmpty);
if (retObj != null)
{
_output.WriteLine("Failed to remove {0}", obj);
Assert.True(false);
}
//int
int i = 2;
m_xsltArg.AddParam("myArg2", szEmpty, i);
m_xsltArg.RemoveParam("myArg2", szEmpty);
retObj = m_xsltArg.GetParam("myArg2", szEmpty);
if (retObj != null)
{
_output.WriteLine("Failed to remove {0}", i);
Assert.True(false);
}
//.........这里部分代码省略.........
示例5: RemoveParam13
public void RemoveParam13(object param)
{
string Baseline = "baseline\\" + (string)param;
int i = 1;
m_xsltArg = new XsltArgumentList();
foreach (String str in szWhiteSpace)
{
m_xsltArg.AddParam("myArg" + i, szEmpty, "Test" + str);
m_xsltArg.RemoveParam("myArg" + i, szEmpty);
retObj = m_xsltArg.GetParam("myArg" + i, szEmpty);
if (retObj != null)
{
_output.WriteLine("Error removing case #{0} from this test", i);
Assert.True(false);
}
i++;
}
i = 1;
foreach (String str in szWhiteSpace)
{
m_xsltArg.AddParam("myArg" + i, szEmpty, "Test"); // dont add whitespace to name here since addparam would throw
m_xsltArg.RemoveParam("myArg" + str, szEmpty);
retObj = m_xsltArg.GetParam("myArg" + str, szEmpty);
if (retObj != null)
{
_output.WriteLine("Error removing case #{0} in the second batch from this test", i);
Assert.True(false);
}
i++;
}
// perform a transform for kicks and ensure all is ok.
if ((LoadXSL("showParam.xsl") == 1) && (Transform_ArgList("fruits.xml") == 1))
{
VerifyResult(Baseline, _strOutFile);
return;
}
else
Assert.True(false);
}
示例6: RemoveParam1
public void RemoveParam1(object param)
{
m_xsltArg = new XsltArgumentList();
m_xsltArg.AddParam("myArg1", szEmpty, "Test2");
m_xsltArg.RemoveParam("myArg1", szEmpty);
retObj = m_xsltArg.GetParam("myArg1", szEmpty);
if (retObj != null)
{
_output.WriteLine("Value of Removed Object is not null : {0}", retObj);
Assert.True(false);
}
m_xsltArg.AddParam("myArg1", szEmpty, "Test1");
retObj = m_xsltArg.GetParam("myArg1", szEmpty);
_output.WriteLine("Added Value:{0}\nRetrieved Value: {1}", "Test1", retObj);
if (retObj.ToString() != "Test1")
{
_output.WriteLine("Value of removed object is not as expected : {0}", retObj);
Assert.True(false);
}
_baseline = "baseline\\" + (string)param;
if ((LoadXSL("showParam.xsl") == 1) && (Transform_ArgList("fruits.xml") == 1))
{
VerifyResult(_baseline, "out.xml");
return;
}
else
Assert.True(false);
}
示例7: RemoveParam6
public void RemoveParam6(object param)
{
string Baseline = "baseline\\" + (string)param;
m_xsltArg = new XsltArgumentList();
m_xsltArg.AddParam(szLongString, szEmpty, "Test1");
m_xsltArg.RemoveParam(szLongString, szEmpty);
if ((LoadXSL("showParamLongName.xsl") == 1) && (Transform_ArgList("fruits.xml") == 1))
{
VerifyResult(Baseline, _strOutFile);
return;
}
else
Assert.True(false);
}
示例8: RemoveParam5
public void RemoveParam5(object param)
{
string Baseline = Path.Combine("baseline", (string)param);
m_xsltArg = new XsltArgumentList();
m_xsltArg.RemoveParam(szInvalid, szEmpty);
if ((LoadXSL("showParam.xsl") == 1) && (Transform_ArgList("fruits.xml") == 1))
{
VerifyResult(Baseline, _strOutFile);
return;
}
else
Assert.True(false);
}
示例9: RemoveParam10
public void RemoveParam10(object param)
{
string Baseline = Path.Combine("baseline", (string)param);
m_xsltArg = new XsltArgumentList();
m_xsltArg.AddParam("myArg1", szLongString, "Test1");
m_xsltArg.RemoveParam("myArg1", szLongString);
if ((LoadXSL("showParam.xsl") == 1) && (Transform_ArgList("fruits.xml") == 1))
{
VerifyResult(Baseline, _strOutFile);
return;
}
else
Assert.True(false);
}
示例10: 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);
}
示例11: AddParam16
public void AddParam16(object param)
{
string Baseline = Path.Combine("baseline", (string)param);
m_xsltArg = new XsltArgumentList();
String obj = "Test";
for (int i = 0; i < 200; i++)
{
m_xsltArg.AddParam("myArg2", szEmpty, obj + i);
retObj = m_xsltArg.GetParam("myArg2", szEmpty);
if (retObj.ToString() != ("Test" + i))
{
_output.WriteLine("Failed to add/remove iteration {0}", i);
Assert.True(false);
}
m_xsltArg.RemoveParam("myArg2", szEmpty);
}
for (int i = 0; i < 200; i++)
{
m_xsltArg.AddParam("myArg" + i, szEmpty, obj + i);
retObj = m_xsltArg.GetParam("myArg" + i, szEmpty);
if (retObj.ToString() != (obj + i))
{
_output.WriteLine("Failed in 2nd part to add/remove iteration {0}", i);
Assert.True(false);
}
m_xsltArg.RemoveParam("myArg2", szEmpty);
}
for (int i = 0; i < 200; i++)
{
m_xsltArg.RemoveParam("myArg" + i, szEmpty);
}
m_xsltArg.AddParam("myArg2", szEmpty, obj + "2");
retObj = m_xsltArg.GetParam("myArg2", szEmpty);
if (retObj.ToString() != "Test2")
Assert.True(false);
if ((LoadXSL("showParam.xsl") == 1) && (Transform_ArgList("fruits.xml") == 1))
{
VerifyResult(Baseline, _strOutFile);
return;
}
else
Assert.True(false);
}
示例12: RemoveParam14
public void RemoveParam14()
{
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");
m_xsltArg.RemoveParam("myArg1", szEmpty);
for (int i = 0; i < 500; i++)
m_xsltArg.RemoveParam("myArg1", szEmpty);
if ((LoadXSL("showParam.xsl") == 1) && (Transform_ArgList("fruits.xml") == 1))
{
VerifyResult(expected);
return;
}
else
Assert.True(false);
}
示例13: RemoveParam13
public void RemoveParam13()
{
string expected = @"<?xml version=""1.0"" encoding=""utf-8""?><result>
1.Test
2.Test
3.Test
4.Test
5.Test
6.No Value Specified</result>";
int i = 1;
m_xsltArg = new XsltArgumentList();
foreach (String str in szWhiteSpace)
{
m_xsltArg.AddParam("myArg" + i, szEmpty, "Test" + str);
m_xsltArg.RemoveParam("myArg" + i, szEmpty);
retObj = m_xsltArg.GetParam("myArg" + i, szEmpty);
if (retObj != null)
{
_output.WriteLine("Error removing case #{0} from this test", i);
Assert.True(false);
}
i++;
}
i = 1;
foreach (String str in szWhiteSpace)
{
m_xsltArg.AddParam("myArg" + i, szEmpty, "Test"); // dont add whitespace to name here since addparam would throw
m_xsltArg.RemoveParam("myArg" + str, szEmpty);
retObj = m_xsltArg.GetParam("myArg" + str, szEmpty);
if (retObj != null)
{
_output.WriteLine("Error removing case #{0} in the second batch from this test", i);
Assert.True(false);
}
i++;
}
// perform a transform for kicks and ensure all is ok.
if ((LoadXSL("showParam.xsl") == 1) && (Transform_ArgList("fruits.xml") == 1))
{
VerifyResult(expected);
return;
}
else
Assert.True(false);
}
示例14: RemoveParam12
public void RemoveParam12()
{
string expected = @"<?xml version=""1.0"" encoding=""utf-8""?><result>
1.Test1
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");
m_xsltArg.RemoveParam("myarg1", szEmpty);
m_xsltArg.RemoveParam("MYARG1", szEmpty);
m_xsltArg.RemoveParam("myArg1 ", szEmpty);
// perform a transform for kicks and ensure all is ok.
if ((LoadXSL("showParam.xsl") == 1) && (Transform_ArgList("fruits.xml") == 1))
{
VerifyResult(expected);
return;
}
else
Assert.True(false);
}
示例15: RemoveParam14
public void RemoveParam14()
{
m_xsltArg = new XsltArgumentList();
m_xsltArg.AddParam("myArg1", szEmpty, "Test1");
m_xsltArg.RemoveParam("myArg1", szEmpty);
for (int i = 0; i < 500; i++)
m_xsltArg.RemoveParam("myArg1", szEmpty);
if ((LoadXSL("showParam.xsl") == 1) && (Transform_ArgList("fruits.xml") == 1) &&
(CheckResult(466.5112789241) == 1))
return;
else
Assert.True(false);
}