Nexus.Client.Games.Morrowind.PluginManagement.Boss.BossSorter.CreateBossDb C# (CSharp) Метод

CreateBossDb() приватный Метод

Creates the BOSS DB.
Explicitly manage database lifetime. Allows clients to free memory when they want/need to. This function also checks that plugins.txt and loadorder.txt (if they both exist) are in sync.
Thrown if the BOSS DB could not be created.
private CreateBossDb ( ) : IntPtr
Результат System.IntPtr
		private IntPtr CreateBossDb()
		{
			IntPtr ptrBossDb = IntPtr.Zero;
			UInt32 uintClientGameId = 0;
			switch (GameMode.ModeId)
			{
				case "Oblivion":
					uintClientGameId = 1;
					break;
				case "Fallout3":
					uintClientGameId = 4;
					break;
				case "FalloutNV":
					uintClientGameId = 5;
					break;
				case "Nehrim":
					uintClientGameId = 2;
					break;
				case "Skyrim":
					uintClientGameId = 3;
					break;
				case "Morrowind":
					uintClientGameId = 6;
					break;
				default:
					throw new BossException(String.Format("Unsupported game: {0} ({1})", GameMode.Name, GameMode.ModeId));
			}
			UInt32 uintStatus = m_dlgCreateBossDb(ref ptrBossDb, uintClientGameId, GameMode.InstallationPath);
			HandleStatusCode(uintStatus);
			if (ptrBossDb == IntPtr.Zero)
				throw new BossException("Could not create BOSS DB.");
			return ptrBossDb;
		}