public DaoFactory(IFileDao fileDao, IFolderDao folderDao, ITagDao tagDao, ISecurityDao securityDao) { FileDao = fileDao; FolderDao = folderDao; TagDao = tagDao; SecurityDao = securityDao; }
private static void UpdateTagsCount(ITagMailDao daoTagMail, ITagDao daoTag, Tag tag) { var count = daoTagMail.CalculateTagCount(tag.Id); tag.Count = count; daoTag.SaveTag(tag); }
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>(); }
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>(); }
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>(); }
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>(); }
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; } }
private TagService() { _daoManager = ServiceConfig.GetInstance().DaoManager; _iTagDao = _daoManager.GetDao(typeof(ITagDao)) as ITagDao; }
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); }
public static void MyClassInitialize(TestContext testContext) { kernel = TestManager.ConfigureNInjectKernel(); tagDao = kernel.Get <ITagDao>(); }
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; }