예제 #1
0
        /// <summary>
        /// Gets the example descriptor.
        /// </summary>
        private static Example GetExample(string projFile)
        {
            var name       = Path.GetFileNameWithoutExtension(projFile);
            var path       = Path.GetDirectoryName(projFile);
            var asmFile    = ExamplePaths.GetAssemblyPath(projFile);
            var sourceFile = Path.Combine(path, "Program.cs");
            var sourceCode = File.ReadAllText(sourceFile);

            return(new Example(name, projFile, asmFile, sourceCode));
        }
예제 #2
0
        public void FixtureSetUp()
        {
            var ignite = Ignition.Start(TestUtils.GetTestConfiguration());

            // Init default services.
            var asmFile = ExamplePaths.GetAssemblyPath(ExamplePaths.SharedProjFile);
            var asm     = Assembly.LoadFrom(asmFile);
            var utils   = asm.GetType("Apache.Ignite.Examples.Shared.Utils");

            Assert.IsNotNull(utils);

            utils.InvokeMember(
                "DeployDefaultServices",
                BindingFlags.Static | BindingFlags.Public | BindingFlags.InvokeMethod,
                null,
                null,
                new object[] { ignite });
        }