19 namespace erminas.SmartAPI.CMS.ServerManagement
24 bool IsCreateAllowed {
get;
set; }
25 Guid ProductGuid {
get; }
31 internal class DatabaseServer : PartialRedDotObject, IDatabaseServer
35 private bool _isCreateAllowed;
36 private Guid _productGuid;
38 public DatabaseServer(
ISession session, Guid guid) : base(session, guid)
42 internal DatabaseServer(ISession session, XmlElement xmlElement) : base(session, xmlElement)
49 get {
return LazyLoad(ref _dBType); }
52 public bool IsCreateAllowed
54 get {
return LazyLoad(ref _isCreateAllowed); }
55 set { _isCreateAllowed = value; }
58 public Guid ProductGuid
60 get {
return LazyLoad(ref _productGuid); }
63 protected override void LoadWholeObject()
68 protected override XmlElement RetrieveWholeObject()
70 return ((DatabaseServer) Session.ServerManager.DatabaseServers.GetByGuid(Guid)).XmlElement;
73 private void LoadXml()
75 InitIfPresent(ref _isCreateAllowed,
"createallowed", BoolConvert);
76 InitIfPresent(ref _productGuid,
"productguid", GuidConvert);
77 InitIfPresent(ref _dBType,
"dbtypeid", x => (
DbTypeId)
int.Parse(x));