public TaxonomyPartHandler(
            IRepository<TaxonomyPartRecord> repository,
            ITaxonomySlugConstraint taxonomySlugConstraint,
            ITaxonomyService taxonomyService
            ) {

            Filters.Add(StorageFilter.For(repository));

            OnPublished<TaxonomyPart>(
                (context, part) => {
                    taxonomySlugConstraint.AddSlug(part.Slug);
                    taxonomyService.CreateTermContentType(part);
                });

            OnUnpublishing<TaxonomyPart>(
                (context, part) =>
                    taxonomySlugConstraint.RemoveSlug(part.Slug)
                );
        }
        public TaxonomyPartHandler(
            IRepository <TaxonomyPartRecord> repository,
            ITaxonomySlugConstraint taxonomySlugConstraint,
            ITaxonomyService taxonomyService
            )
        {
            Filters.Add(StorageFilter.For(repository));

            OnPublished <TaxonomyPart>(
                (context, part) => {
                taxonomySlugConstraint.AddSlug(part.Slug);
                taxonomyService.CreateTermContentType(part);
            });

            OnUnpublishing <TaxonomyPart>(
                (context, part) =>
                taxonomySlugConstraint.RemoveSlug(part.Slug)
                );
        }
Exemple #3
0
 public Routes(ITaxonomySlugConstraint taxonomySlugConstraint, ITermPathConstraint termPathConstraint)
 {
     _taxonomySlugConstraint = taxonomySlugConstraint;
     _termPathConstraint = termPathConstraint;
 }
Exemple #4
0
 public Routes(ITaxonomySlugConstraint taxonomySlugConstraint, ITermPathConstraint termPathConstraint)
 {
     _taxonomySlugConstraint = taxonomySlugConstraint;
     _termPathConstraint     = termPathConstraint;
 }
 public TaxonomySlugConstraintUpdator(
     ITaxonomySlugConstraint taxonomySlugConstraint, ITaxonomyService taxonomyService)
 {
     _taxonomySlugConstraint = taxonomySlugConstraint;
     _taxonomyService = taxonomyService;
 }
Exemple #6
0
 public TaxonomySlugConstraintUpdator(ITaxonomySlugConstraint taxonomySlugConstraint, ITaxonomyService taxonomyService)
 {
     _taxonomySlugConstraint = taxonomySlugConstraint;
     _taxonomyService        = taxonomyService;
 }