本文整理汇总了C#中ExecutionContext.GetStringOf方法的典型用法代码示例。如果您正苦于以下问题:C# ExecutionContext.GetStringOf方法的具体用法?C# ExecutionContext.GetStringOf怎么用?C# ExecutionContext.GetStringOf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ExecutionContext
的用法示例。
在下文中一共展示了ExecutionContext.GetStringOf方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Execute
public override string Execute(ExecutionContext context)
{
var ret = Evaluate(context);
return context.GetStringOf(ret);
}
示例2: TestGetStringOfBool
public void TestGetStringOfBool()
{
var context = new ExecutionContext();
Assert.AreEqual("1", context.GetStringOf(true));
Assert.AreEqual("0", context.GetStringOf(false));
}
示例3: TestGetStringOfArray
public void TestGetStringOfArray()
{
var context = new ExecutionContext();
Assert.AreEqual("(1,2,3)", context.GetStringOf(new[] { 1, 2, 3 }));
Assert.AreEqual("(5325326430000000000000000000000)", context.GetStringOf(new[] { 5325326430000000000000000000000.0 }));
}
示例4: TestGetStringOfString
public void TestGetStringOfString()
{
var context = new ExecutionContext();
Assert.AreEqual("1,2,3", context.GetStringOf("1,2,3"));
Assert.AreEqual("this is a really lame string", context.GetStringOf("this is a really lame string"));
}
示例5: TestGetStringOfInt
public void TestGetStringOfInt()
{
var context = new ExecutionContext();
Assert.AreEqual("1234", context.GetStringOf(1234));
Assert.AreEqual("532532643", context.GetStringOf(532532643));
}
示例6: TestGetStringOfDouble
public void TestGetStringOfDouble()
{
var context = new ExecutionContext();
Assert.AreEqual("1234", context.GetStringOf(1234.0));
Assert.AreEqual("5325326430000000000000000000000", context.GetStringOf(5325326430000000000000000000000.0));
Assert.AreEqual("0.000000000532532643", context.GetStringOf(0.000000000532532643));
}