hrz_sv / 01.Manager / 00.Program / Manager / WebServer.cs
이력 | 보기 | 이력해설 | 다운로드 (827 Bytes)
| 1 | 37 | HKM | using System; | 
|---|---|---|---|
| 2 | using System.Collections.Generic; | ||
| 3 | using System.Linq; | ||
| 4 | using System.Text; | ||
| 5 | using System.Threading.Tasks; | ||
| 6 | |||
| 7 | namespace Manager | ||
| 8 | {
 | ||
| 9 | class WebServer : Process_Cmd | ||
| 10 |     {
 | ||
| 11 | #region [ Variable ] | ||
| 12 | public string path = @"C:\Program Files\MongoDB\Server\3.6\bin\mongod.exe"; | ||
| 13 | public string arguments = " --dbpath C:/Users/spboy/test"; | ||
| 14 | #endregion | ||
| 15 | |||
| 16 | public WebServer() | ||
| 17 |         {
 | ||
| 18 | SetProcess(path, arguments); | ||
| 19 | } | ||
| 20 | |||
| 21 | public void Connect_DBServer() | ||
| 22 |         {
 | ||
| 23 | // 기존 연결을 끊어준다. | ||
| 24 | if (isProcessAlive) | ||
| 25 |             {
 | ||
| 26 | ExitProcess(); | ||
| 27 | } | ||
| 28 | // 새 연결을 해준다. | ||
| 29 | else | ||
| 30 |             {
 | ||
| 31 | StartProcess(); | ||
| 32 | } | ||
| 33 | } | ||
| 34 | |||
| 35 | } | ||
| 36 | } |