예제 #1
0
        private DaoProxyRegistration RegisterCommonDaoDll(FileInfo daoDll)
        {
            DaoProxyRegistration reg = DaoProxyRegistration.Register(daoDll);

            CommonDaoProxyRegistrations[reg.ContextName.ToLowerInvariant()] = reg;

            return(reg);
        }
예제 #2
0
        private void RegisterNewAppDaoDll(string appName, FileInfo dbJs, DirectoryInfo daoBin, SchemaResult result)
        {
            FileInfo             daoDll = new FileInfo(Path.Combine(daoBin.FullName, "{0}.dll"._Format(result.Namespace)));
            DaoProxyRegistration reg    = DaoProxyRegistration.Register(daoDll);
            string name = appName.ToLowerInvariant();

            AppDaoProxyRegistrations[name].Add(reg);
        }
예제 #3
0
 internal void RegisterCommonDaoFromDirectory(DirectoryInfo daoBinDir)
 {
     try
     {
         OnRegisteringCommonDaoFromDirectory(daoBinDir);
         DaoProxyRegistration[] daoRegistrations = DaoProxyRegistration.Register(daoBinDir, BamConf.DaoSearchPattern);
         daoRegistrations.Each(daoReg =>
         {
             CommonDaoProxyRegistrations[daoReg.ContextName.ToLowerInvariant()] = daoReg;
         });
         OnRegisteredCommonDaoFromDirectory(daoBinDir);
     }
     catch (Exception ex)
     {
         OnRegisterCommonDaoFromDirectoryFailed(daoBinDir, ex);
     }
 }
예제 #4
0
 internal void RegisterAppDaoFromDirectory(string appName, DirectoryInfo daoDir)
 {
     try
     {
         OnRegisteringAppDaoFromDirectory(daoDir);
         string name = appName.ToLowerInvariant();
         DaoProxyRegistration[] daoRegistrations = DaoProxyRegistration.Register(daoDir, BamConf.DaoSearchPattern);
         daoRegistrations.Each(daoReg =>
         {
             List <DaoProxyRegistration> list = AppDaoProxyRegistrations[name];
             if (!list.Contains(daoReg))
             {
                 AppDaoProxyRegistrations[name].Add(daoReg);
             }
         });
         OnRegisteredAppDaoFromDirectory(daoDir);
     }
     catch (Exception ex)
     {
         OnRegisterAppDaoDirectoryFailed(daoDir, ex);
     }
 }