public void TestInitialize()
 {
     engine = new V8ScriptEngine(V8ScriptEngineFlags.EnableDebugging);
     engine.AddHostObject("host", new ExtendedHostFunctions());
     engine.AddHostObject("mscorlib", HostItemFlags.GlobalMembers, new HostTypeCollection("mscorlib"));
     engine.AddHostObject("ClearScriptTest", HostItemFlags.GlobalMembers, new HostTypeCollection("ClearScriptTest").GetNamespaceNode("Microsoft.ClearScript.Test"));
     engine.AddHostObject("testObject", testInterface = testObject = new TestObject());
     engine.Execute("var testInterface = host.cast(IExplicitTestInterface, testObject)");
 }
 public void TestCleanup()
 {
     testInterface = null;
     engine.Dispose();
     BaseTestCleanup();
 }
 public void TestInitialize()
 {
     engine = new JScriptEngine(WindowsScriptEngineFlags.EnableDebugging);
     engine.AddHostObject("host", new ExtendedHostFunctions());
     engine.AddHostObject("mscorlib", HostItemFlags.GlobalMembers, new HostTypeCollection("mscorlib"));
     engine.AddHostObject("ClearScriptTest", HostItemFlags.GlobalMembers, new HostTypeCollection("ClearScriptTest").GetNamespaceNode("Microsoft.ClearScript.Test"));
     engine.AddHostObject("testObject", testInterface = testObject = new TestObject());
     engine.Execute("var testInterface = host.cast(IExplicitTestInterface, testObject)");
 }
 public void TestCleanup()
 {
     testInterface = null;
     engine.Dispose();
 }
Ejemplo n.º 5
0
 public static double ExplicitInterfaceExtensionMethod <T>(this IExplicitTestInterface self, string arg1, int arg2, T arg3) where T : struct
 {
     return(TestUtil.CalcTestValue(new Guid("185c7082-c55d-435f-b3eb-418f1c27617c"), self, arg1.Length, arg2, arg3.ToString().Length));
 }
Ejemplo n.º 6
0
 public static double ExplicitInterfaceExtensionMethod(this IExplicitTestInterface self, string arg1, int arg2)
 {
     return(TestUtil.CalcTestValue(new Guid("d758e3b9-52e3-46b5-ae5c-4d0b89bddc78"), self, arg1.Length, arg2));
 }
Ejemplo n.º 7
0
 public static double ExplicitInterfaceExtensionBindTestMethod <T>(this IExplicitTestInterface self, T arg)
 {
     return(TestUtil.CalcTestValue(new Guid("35c244d4-1473-46ce-a9cf-d633034c967d"), self, typeof(T), arg));
 }
Ejemplo n.º 8
0
 public static double ExplicitInterfaceExtensionMethod <T>(this IExplicitTestInterface self, int arg) where T : struct
 {
     return(TestUtil.CalcTestValue(new Guid("768b93c3-0a86-4e45-92ab-4d37613d4e09"), self, typeof(T).Name.Length, arg));
 }