Exemple #1
0
 public static ICachePosts GetPostsService()
 {
     if (iCachePosts == null)
     {
         lock (lockHelper)
         {
             if (iCachePosts == null)
             {
                 try
                 {
                     if (EntLibConfigs.GetConfig().Cacheposts.Enable)
                     {
                         iCachePosts = (ICachePosts)Activator.CreateInstance(Type.GetType(
                                                                                 "Discuz.EntLib.MongoDB.Data.Posts, Discuz.EntLib.MongoDB", false, true));
                     }
                 }
                 catch
                 {
                     throw new Exception("请检查 Discuz.EntLib.MongoDB.dll 文件是否被放置到了bin目录下!");
                 }
             }
         }
     }
     return(iCachePosts);
 }
Exemple #2
0
 public static ICachePosts GetPostsService()
 {
     if (iCachePosts == null)
     {
         lock (lockHelper)
         {
             if (iCachePosts == null)
             {
                 try
                 {
                     if (EntLibConfigs.GetConfig().Cacheposts.Enable)
                     {
                         iCachePosts = (ICachePosts)Activator.CreateInstance(Type.GetType(
                               "Discuz.EntLib.MongoDB.Data.Posts, Discuz.EntLib.MongoDB", false, true));
                     }
                 }
                 catch
                 {
                     throw new Exception("请检查 Discuz.EntLib.MongoDB.dll 文件是否被放置到了bin目录下!");
                 }
             }
         }
     }
     return iCachePosts;
 }