ALFA.SystemInfo.GetNWNX4InstallationDirectory C# (CSharp) Метод

GetNWNX4InstallationDirectory() публичный статический Метод

This method gets the directory where NWNX4 is installed. The path has a trailing path separator.
public static GetNWNX4InstallationDirectory ( ) : string
Результат string
        public static string GetNWNX4InstallationDirectory()
        {
            ProcessModule NWScriptPluginModule = null;

            foreach (ProcessModule Module in Process.GetCurrentProcess().Modules)
            {
                if (Module.ModuleName == "xp_AuroraServerNWScript.dll")
                {
                    NWScriptPluginModule = Module;
                    break;
                }
            }

            if (NWScriptPluginModule == null)
                throw new ApplicationException("Couldn't locate xp_AuroraServerNWScript.dll in loaded module list!");

            return Path.GetDirectoryName(NWScriptPluginModule.FileName) + Path.DirectorySeparatorChar;
        }