private static bool RequiresFullRestart(IEnumerable <string> reloadPluginPaths)
        {
            Assembly[] allPluginAssemblies =
                DualityApp.LoadedPlugins.Select(p => p.PluginAssembly).Concat(
                    DualityEditorApp.Plugins.Select(p => p.PluginAssembly)).ToArray();

            // If there is any editor plugin to be reloaded, we need a full restart.
            if (reloadPluginPaths.Any(asmFile => asmFile.EndsWith(".editor.dll", StringComparison.InvariantCultureIgnoreCase)))
            {
                return(true);
            }
            // If any plugin dependency needs to be reloaded, do a full restart. Due to the way, bindings between
            // different assemblies are resolved, it is impossible to prevent any plugin from still binding the old
            // version of the dependency in question. Any source code referring to the disposed dependency may
            // result in undefined behavior. A full restart is necessary.
            else if (reloadPluginPaths.Any(asmFile => DualityApp.IsDependencyPlugin(asmFile, allPluginAssemblies)))
            {
                return(true);
            }

            return(false);
        }