private FreeswitchModuleConfiguration(string filename)
 {
     _fsmf = FreeSwitchModuleFile.Load(filename);
     if (_fsmf.Data == null)
         _configurationSection = null;
     else
         _configurationSection = _fsmf.File.ConfigurationSectionString;
 }
        public static FreeSwitchModuleFile Load(string name)
        {
            FreeSwitchModuleFile ret  = null;
            Connection           conn = ConnectionPoolManager.GetConnection(typeof(FreeSwitchModuleFile));
            List <Org.Reddragonit.Dbpro.Structure.Table> tmp = conn.Select(typeof(FreeSwitchModuleFile),
                                                                           new SelectParameter[] { new EqualParameter("FileName", name) });

            conn.CloseConnection();
            if (tmp.Count > 0)
            {
                ret = (FreeSwitchModuleFile)tmp[0];
            }
            return(ret);
        }
 public static FreeSwitchModuleFile Create(string name, string content)
 {
     FreeSwitchModuleFile ret = new FreeSwitchModuleFile();
     ret.FileName = name;
     XmlDocument doc = new XmlDocument();
     doc.LoadXml(content);
     ret.File = new sFreeSwitchModuleFile(name,
         doc.ChildNodes[1].Attributes["description"].Value,
         doc.ChildNodes[1].OuterXml);
     Connection conn = ConnectionPoolManager.GetConnection(typeof(FreeSwitchModuleFile));
     ret = (FreeSwitchModuleFile)conn.Save(ret);
     conn.CloseConnection();
     return ret;
 }
        public static FreeSwitchModuleFile Create(string name, string content)
        {
            FreeSwitchModuleFile ret = new FreeSwitchModuleFile();

            ret.FileName = name;
            XmlDocument doc = new XmlDocument();

            doc.LoadXml(content);
            ret.File = new sFreeSwitchModuleFile(name,
                                                 doc.ChildNodes[1].Attributes["description"].Value,
                                                 doc.ChildNodes[1].OuterXml);
            Connection conn = ConnectionPoolManager.GetConnection(typeof(FreeSwitchModuleFile));

            ret = (FreeSwitchModuleFile)conn.Save(ret);
            conn.CloseConnection();
            return(ret);
        }