-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPBioConfigurationService.cs
More file actions
57 lines (48 loc) · 1.58 KB
/
PBioConfigurationService.cs
File metadata and controls
57 lines (48 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Configuration;
namespace PBioSvc
{
[Serializable]
public class PBioServiceConfiguration
{
private String _ConnectionString;
private int _PortSvc; // Puerto en el que escucha el servicio Windows
private int _PortDaemon; // Puerto en el que escucha el demonio Linux
private String _IpDaemon; // IP del servicio en Windows
private int _MaxUsers; // Máximo de simulaciones por usuario ejecutándose simultaneamente
private const String DEFAULT_PATH = "config.xml";
public PBioServiceConfiguration()
{
this._PortSvc = int.Parse(ConfigurationManager.AppSettings["service_port"].ToString());
this._PortDaemon = int.Parse(ConfigurationManager.AppSettings["daemon_port"].ToString());
this._IpDaemon = ConfigurationManager.AppSettings["daemon_ip"].ToString();
this._MaxUsers = int.Parse(ConfigurationManager.AppSettings["max_by_user"].ToString());
}
public String ConnectionString
{
get { return _ConnectionString; }
set { _ConnectionString = value; }
}
public String IpDaemon {
get { return _IpDaemon; }
set { _IpDaemon = value; }
}
public int PortSvc {
get { return _PortSvc;}
set { _PortSvc = value; }
}
public int PortDaemon {
get { return _PortDaemon;}
set { _PortDaemon = value; }
}
public int MaxUsers
{
get { return _MaxUsers; }
set { _MaxUsers = value; }
}
}
}