コード例 #1
0
        static PatchTests()
        {
            var currentDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            MainLibPath      = Path.GetFullPath(Path.Combine(currentDirectory, @"..\..\..\..\..\..\.."));
            LibTestsPath     = Path.Combine(MainLibPath, "tests");
            RepositoriesPath = Path.GetFullPath(Path.Combine(MainLibPath, @".."));

            foreach (var pack in Packs)
            {
                AssemblyLoader.AddPackageRepositories(pack);
            }

            // Also add the "vl-libs" folder. The folder that contains our library.
            AssemblyLoader.AddPackageRepositories(RepositoriesPath);


            if (SynchronizationContext.Current == null)
            {
                SynchronizationContext.SetSynchronizationContext(new WindowsFormsSynchronizationContext());
            }


            Session = new VLSession("gamma", SynchronizationContext.Current, includeUserPackages: false)
            {
                CheckSolution           = false,
                IgnoreDynamicEnumErrors = true,
                NoCache        = true,
                KeepTargetCode = false
            };
        }
コード例 #2
0
        public Host()
        {
            //setup session
            Session = new VLSession("beta", SynchronizationContext.Current);
            // Use our own implementation
            var platform = Session.TargetPlatform as Platform;

            platform.RuntimeHost.Dispose();
            platform.RuntimeHost = new RuntimeHost(platform);
        }