Example #1
0
        public DbConnInfo Clone()
        {
            DbConnInfo result = new DbConnInfo(this.sDbProvider, this.sConnString);

            result.sDbProvider = this.sDbProvider;
            result.sConnString = this.sConnString;

            return(result);
        }
Example #2
0
        public DbConnInfo Clone()
        {
            DbConnInfo result = new DbConnInfo(this.sDbProvider, this.sConnString);

            result.sDbProvider = this.sDbProvider;
            result.sConnString = this.sConnString;

            return result;
        }
Example #3
0
        public static void CreateAppendDbConnInfoElement(DbConnInfo DbConnInfo, ref XmlElement parentElement, out XmlElement DbConnInfoElement)
        {
            DbConnInfoElement = parentElement.OwnerDocument.CreateElement("DbConnectionInfo");

            if (DbConnInfo == null)
                return;

            XmlElement DbProviderEle, DbConnStrEle;

            if (!String.IsNullOrEmpty(DbConnInfo.sDbProvider))
            {
                DbProviderEle = DbConnInfoElement.OwnerDocument.CreateElement("DbProviderName");
                DbProviderEle.InnerXml = DbConnInfo.sDbProvider;
                DbConnInfoElement.AppendChild(DbProviderEle);
            }
            if (!String.IsNullOrEmpty(DbConnInfo.sConnString))
            {
                DbConnStrEle = DbConnInfoElement.OwnerDocument.CreateElement("DbConnectionString");
                DbConnStrEle.InnerXml = DbConnInfo.sConnString;
                DbConnInfoElement.AppendChild(DbConnStrEle);
            }

            parentElement.AppendChild(DbConnInfoElement);
        }
Example #4
0
        public static void DeserializeDbConnInfo(XmlNode node, ref LACTreeNode pluginNode, string nodepath, ref DbConnInfo DbConnInfo)
        {
            XmlNode DbConnnode = node.SelectSingleNode("DbConnectionInfo");

            if (DbConnnode == null) return;

            if (DbConnInfo == null)
                DbConnInfo = new DbConnInfo();

            foreach (XmlNode child in DbConnnode.ChildNodes)
            {
                if (child.Name.Trim().Equals("DbProviderName"))
                {
                    DbConnInfo.sDbProvider = child.InnerXml;
                }
                else if (child.Name.Trim().Equals("DbConnectionString"))
                {
                    DbConnInfo.sConnString = child.InnerXml;
                }
            }
            pluginNode.Tag = DbConnInfo;
        }
Example #5
0
 private bool GetTargetMachineInfoDbConnInfo(IPlugIn requestor, DbConnInfo DbConn, uint fieldsRequested)
 {
     return false;
 }