Exemplo n.º 1
0
        public override void XmlLoad(XmlNode node)
        {
            try
            {
                this.Key         = XmlHelper.GetAttributeValue(node, "key", string.Empty);
                this.ProjectName = XmlHelper.GetAttributeValue(node, "projectName", string.Empty);
                this.EnableCustomChangeEvents  = XmlHelper.GetAttributeValue(node, "enableCustomChangeEvents", _def_enableCustomChangeEvents);
                this.SupportLegacySearchObject = XmlHelper.GetAttributeValue(node, "supportLegacySearchObject", _def_supportLegacySearchObject);
                _version                   = XmlHelper.GetAttributeValue(node, "version", _def_version);
                this.UseUTCTime            = XmlHelper.GetAttributeValue(node, "useUTCTime", this.UseUTCTime);
                this.StoredProcedurePrefix = XmlHelper.GetAttributeValue(node, "storedProcedurePrefix", _def_storedProcedurePrefix);
                this.TenantColumnName      = XmlHelper.GetAttributeValue(node, "tenantColumnName", _def_tenantColumnName);
                this.TenantPrefix          = XmlHelper.GetAttributeValue(node, "tenantPrefix", _def_tenantPrefix);
                this.CompanyName           = XmlHelper.GetAttributeValue(node, "companyName", this.CompanyName);
                this.EmitSafetyScripts     = XmlHelper.GetAttributeValue(node, "emitSafetyScripts", this.EmitSafetyScripts);

                //There is a message box in the property set to DO NOT use the property, use the member variable
                DefaultNamespace = XmlHelper.GetAttributeValue(node, "defaultNamespace", _def_defaultNamespace);

                var databaseNode = node.SelectSingleNode("database");
                if (databaseNode != null)
                {
                    this.Database.XmlLoad(databaseNode);
                }

                var versionHistoryListNode = node.SelectSingleNode("versionHistoryList");
                if (versionHistoryListNode != null)
                {
                    _versionHistoryList.XmlLoad(versionHistoryListNode);
                }
            }
            catch (Exception ex)
            {
                throw;
            }
        }
Exemplo n.º 2
0
        public override void XmlLoad(XmlNode node)
        {
            try
            {
                _key                           = XmlHelper.GetAttributeValue(node, "key", string.Empty);
                this.ProjectName               = XmlHelper.GetAttributeValue(node, "projectName", string.Empty);
                this.TransformNames            = XmlHelper.GetAttributeValue(node, "transformNames", _def_transformNames);
                this.EnableCustomChangeEvents  = XmlHelper.GetAttributeValue(node, "enableCustomChangeEvents", _def_enableCustomChangeEvents);
                this.SupportLegacySearchObject = XmlHelper.GetAttributeValue(node, "supportLegacySearchObject", _def_supportLegacySearchObject);
                _version                       = XmlHelper.GetAttributeValue(node, "version", _def_version);
                this.UseUTCTime                = XmlHelper.GetAttributeValue(node, "useUTCTime", this.UseUTCTime);
                this.SQLServerType             = (SQLServerTypeConstants)Enum.Parse(typeof(SQLServerTypeConstants), XmlHelper.GetAttributeValue(node, "sqlType", _def_sQLServerType.ToString()));
                this.EFVersion                 = (EFVersionConstants)Enum.Parse(typeof(EFVersionConstants), XmlHelper.GetAttributeValue(node, "efversion", _def_efVersion.ToString()));
                this.FrameworkVersion          = (FrameworkVersionConstants)Enum.Parse(typeof(FrameworkVersionConstants), XmlHelper.GetAttributeValue(node, "frameworkVersion", _def_frameworkVersion.ToString()));
                this.StoredProcedurePrefix     = XmlHelper.GetAttributeValue(node, "storedProcedurePrefix", _def_storedProcedurePrefix);
                this.TenantColumnName          = XmlHelper.GetAttributeValue(node, "tenantColumnName", _def_tenantColumnName);
                this.TenantPrefix              = XmlHelper.GetAttributeValue(node, "tenantPrefix", _def_tenantPrefix);
                this.AllowMocks                = XmlHelper.GetAttributeValue(node, "allowMocks", _def_allowMocks);

                var uiNode = node.SelectSingleNode("userInterface");
                if (uiNode != null)
                {
                    this.UserInterface.XmlLoad(uiNode);
                }

                this.CompanyName         = XmlHelper.GetAttributeValue(node, "companyName", this.CompanyName);
                this.EmitSafetyScripts   = XmlHelper.GetAttributeValue(node, "emitSafetyScripts", this.EmitSafetyScripts);
                this.CompanyAbbreviation = XmlHelper.GetAttributeValue(node, "companyAbbreviation", this.CompanyAbbreviation);
                this.ModuleName          = XmlHelper.GetAttributeValue(node, "moduleName", this.ModuleName);

                //There is a messagebox in the property set to DO NOT use the property, use the member variable
                _defaultNamespace = XmlHelper.GetAttributeValue(node, "defaultNamespace", _def_defaultNamespace);

                var databaseNode = node.SelectSingleNode("database");
                if (databaseNode != null)
                {
                    this.Database.XmlLoad(databaseNode);
                }

                //_createdDate = DateTime.ParseExact(XmlHelper.GetAttributeValue(node, "createdDate", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture)), "yyyy-MM-dd HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture);

                var copyrightNode = node.SelectSingleNode("copyright");
                if (copyrightNode != null)
                {
                    _copyright = copyrightNode.InnerText;
                }

                var versionHistoryListNode = node.SelectSingleNode("versionHistoryList");
                if (versionHistoryListNode != null)
                {
                    _versionHistoryList.XmlLoad(versionHistoryListNode);
                }

                var metadataNode = node.SelectSingleNode("metadata");
                if (metadataNode != null)
                {
                    this.MetaData.XmlLoad(metadataNode);
                }

                this.Dirty = false;
            }
            catch (Exception ex)
            {
                throw;
            }
        }