コード例 #1
0
        /// <inheritdoc/>
        public bool AssemblyUpdate(List <DebugAssembly> assembliesToUnregister, List <DebugAssembly> assembliesToRegister)
        {
            Log.Info("Reloading assemblies and updating scripts");

            // Unload and load assemblies in assemblyContainer, serialization, etc...
            lock (loadedAssemblies)
            {
                if (game != null)
                {
                    lock (game.TickLock)
                    {
                        LiveAssemblyReloader.Reload(game, assemblyContainer,
                                                    assembliesToUnregister.Select(x => loadedAssemblies[x]).ToList(),
                                                    assembliesToRegister.Select(x => loadedAssemblies[x]).ToList());
                    }
                }
                else
                {
                    LiveAssemblyReloader.Reload(game, assemblyContainer,
                                                assembliesToUnregister.Select(x => loadedAssemblies[x]).ToList(),
                                                assembliesToRegister.Select(x => loadedAssemblies[x]).ToList());
                }
            }
            return(true);
        }
コード例 #2
0
        /// <inheritdoc/>
        public bool AssemblyUpdate(List<DebugAssembly> assembliesToUnregister, List<DebugAssembly> assembliesToRegister)
        {
            Log.Info("Reloading assemblies and updating scripts");

            // Unload and load assemblies in assemblyContainer, serialization, etc...
            lock (loadedAssemblies)
            {
                var assemblyReloader = new LiveAssemblyReloader(
                    game,
                    assemblyContainer,
                    assembliesToUnregister.Select(x => loadedAssemblies[x]).ToList(),
                    assembliesToRegister.Select(x => loadedAssemblies[x]).ToList());

                if (game != null)
                {
                    lock (game.TickLock)
                    {
                        assemblyReloader.Reload();
                    }
                }
                else
                {
                    assemblyReloader.Reload();
                }
            }
            return true;
        }