Пример #1
0
 public DaoFactory(IFileDao fileDao, IFolderDao folderDao, ITagDao tagDao, ISecurityDao securityDao)
 {
     FileDao     = fileDao;
     FolderDao   = folderDao;
     TagDao      = tagDao;
     SecurityDao = securityDao;
 }
Пример #2
0
        private static void UpdateTagsCount(ITagMailDao daoTagMail, ITagDao daoTag, Tag tag)
        {
            var count = daoTagMail.CalculateTagCount(tag.Id);

            tag.Count = count;

            daoTag.SaveTag(tag);
        }
Пример #3
0
 public static void MyClassInitialize(TestContext testContext)
 {
     kernel      = TestManager.ConfigureNInjectKernel();
     categoryDao = kernel.Get <ICategoryDao>();
     productDao  = kernel.Get <IProductDao>();
     tagDao      = kernel.Get <ITagDao>();
     tagService  = kernel.Get <ITagService>();
 }
Пример #4
0
 public static void MyClassInitialize(TestContext testContext)
 {
     container = TestManager.ConfigureUnityContainer("unity");
     UserService = container.Resolve<IUserService>();
     CommentService = container.Resolve<ICommentService>();
     commentDao = container.Resolve<ICommentDao>();
     tagDao = container.Resolve<ITagDao>();
     userDao = container.Resolve<IUserDao>();
 }
Пример #5
0
 public static void MyClassInitialize(TestContext testContext)
 {
     kernel         = TestManager.ConfigureNInjectKernel();
     productDao     = kernel.Get <IProductDao>();
     categoryDao    = kernel.Get <ICategoryDao>();
     tagDao         = kernel.Get <ITagDao>();
     userProfileDao = kernel.Get <IUserProfileDao>();
     commentDao     = kernel.Get <ICommentDao>();
 }
Пример #6
0
        public static void MyClassInitialize(TestContext testContext)
        {
            kernel = TestManager.ConfigureNInjectKernel();

            sportEventService = kernel.Get <ISportEventService>();
            FavoritesDao      = kernel.Get <IFavoritesDao>();
            userService       = kernel.Get <IUserService>();
            FavoritesDao      = kernel.Get <IFavoritesDao>();
            commentDao        = kernel.Get <ICommentDao>();
            TagDao            = kernel.Get <ITagDao>();
        }
Пример #7
0
 public static void MyClassInitialize(TestContext testContext)
 {
     Console.WriteLine(Assembly.GetExecutingAssembly().ToString());
     container = TestManager.ConfigureUnityContainer("unity");
     eventDao = container.Resolve<IEventDao>();
     eventService = container.Resolve<IEventService>();
     categoryDao = container.Resolve<ICategoryDao>();
     userProfileDao = container.Resolve<IUserProfileDao>();
     userService = container.Resolve<IUserService>();
     commentDao = container.Resolve<ICommentDao>();
     commentService = container.Resolve<ICommentService>();
     tagDao = container.Resolve<ITagDao>();
 }
        protected void btnDeleteTag_Click(object sender, EventArgs e)
        {
            long        tagId      = Convert.ToInt32(Request.Params.Get("tagId"));
            IIoCManager iocManager = (IIoCManager)HttpContext.Current.Application["managerIoC"];
            ITagDao     tagDao     = (ITagDao)iocManager.Resolve <ITagDao>();

            if (SessionManager.IsUserAuthenticated(Context))
            {
                tagDao.Remove(tagId);
                Response.Redirect(Response.ApplyAppPathModifier("~/Pages/MainPage.aspx"));
            }
            else
            {
                lblAutenticated.Visible = true;
            }
        }
Пример #9
0
 private TagService()
 {
     _daoManager = ServiceConfig.GetInstance().DaoManager;
     _iTagDao    = _daoManager.GetDao(typeof(ITagDao)) as ITagDao;
 }
Пример #10
0
 public TagEngine(IDaoFactory daoFactory)
 {
     _tagDao = daoFactory.GetTagDao();
 }
        public static Guid FileLockedBy(object fileId, ITagDao tagDao)
        {
            var tagLock = tagDao.GetTags(fileId, FileEntryType.File, TagType.Locked).FirstOrDefault();

            return(tagLock != null ? tagLock.Owner : Guid.Empty);
        }
Пример #12
0
 public TagEngine(IDaoFactory daoFactory)
 {
     _tagDao = daoFactory.GetTagDao();
 }
Пример #13
0
 private TagService()
 {
     _daoManager = ServiceConfig.GetInstance().DaoManager;
     _iTagDao = _daoManager.GetDao(typeof(ITagDao)) as ITagDao;
 }
Пример #14
0
 public static void MyClassInitialize(TestContext testContext)
 {
     kernel = TestManager.ConfigureNInjectKernel();
     tagDao = kernel.Get <ITagDao>();
 }
Пример #15
0
 public static Guid FileLockedBy(object fileId, ITagDao tagDao)
 {
     var tagLock = tagDao.GetTags(fileId, FileEntryType.File, TagType.Locked).FirstOrDefault();
     return tagLock != null ? tagLock.Owner : Guid.Empty;
 }