本文整理汇总了C#中ITaxonomyService类的典型用法代码示例。如果您正苦于以下问题:C# ITaxonomyService类的具体用法?C# ITaxonomyService怎么用?C# ITaxonomyService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ITaxonomyService类属于命名空间,在下文中一共展示了ITaxonomyService类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: TaxonomyNavigationProvider
public TaxonomyNavigationProvider(
IContentManager contentManager,
ITaxonomyService taxonomyService)
{
_contentManager = contentManager;
_taxonomyService = taxonomyService;
}
开发者ID:polynomicworks,项目名称:coevery-docs,代码行数:7,代码来源:TaxonomyNavigationProvider.cs
示例2: TermsPartHandler
public TermsPartHandler(
IContentDefinitionManager contentDefinitionManager,
IRepository<TermsPartRecord> repository,
ITaxonomyService taxonomyService,
IContentManager contentManager,
IProcessingEngine processingEngine,
ShellSettings shellSettings,
IShellDescriptorManager shellDescriptorManager) {
_contentDefinitionManager = contentDefinitionManager;
_contentManager = contentManager;
Filters.Add(StorageFilter.For(repository));
OnPublished<TermsPart>((context, part) => RecalculateCount(processingEngine, shellSettings, shellDescriptorManager, part));
OnUnpublished<TermsPart>((context, part) => RecalculateCount(processingEngine, shellSettings, shellDescriptorManager, part));
OnRemoved<TermsPart>((context, part) => RecalculateCount(processingEngine, shellSettings, shellDescriptorManager, part));
// Tells how to load the field terms on demand, when a content item it loaded or when it has been created
OnInitialized<TermsPart>((context, part) => InitializerTermsLoader(part));
OnLoading<TermsPart>((context, part) => InitializerTermsLoader(part));
OnUpdating<TermsPart>((context, part) => InitializerTermsLoader(part));
OnIndexing<TermsPart>(
(context, part) => {
foreach (var term in part.Terms) {
var termContentItem = context.ContentManager.Get(term.TermRecord.Id);
context.DocumentIndex.Add(term.Field, termContentItem.As<TitlePart>().Title).Analyze();
context.DocumentIndex.Add(term.Field + "-id", termContentItem.Id).Store();
// tag the current content item with all parent terms
foreach (var parent in taxonomyService.GetParents(termContentItem.As<TermPart>())) {
context.DocumentIndex.Add(term.Field + "-id", parent.Id).Store();
}
}
});
}
开发者ID:mikmakcar,项目名称:orchard_fork_learning,代码行数:35,代码来源:TermsPartHandler.cs
示例3: TaxonomyImportService
public TaxonomyImportService(ISiteService siteService, IContentManager contentManager, ITaxonomyService taxonomyService, IMembershipService membershipService)
{
_siteService = siteService;
_contentManager = contentManager;
_taxonomyService = taxonomyService;
_membershipService = membershipService;
}
开发者ID:Trifectgaming,项目名称:Trifect-CMS,代码行数:7,代码来源:TaxonomyImportService.cs
示例4: TermPartHandler
public TermPartHandler(
IRepository<TermPartRecord> repository,
ITaxonomyService taxonomyService,
ITermPathConstraint termPathConstraint ) {
Filters.Add(StorageFilter.For(repository));
OnRemoved<IContent>(
(context, tags) =>
taxonomyService.DeleteAssociatedTerms(context.ContentItem)
);
OnInitializing<TermPart>(
(context, part) =>
part.Selectable = true
);
OnPublished<TermPart>(
(context, part) => {
termPathConstraint.AddPath(part.Slug);
foreach (var child in taxonomyService.GetChildren(part)) {
termPathConstraint.AddPath(child.Slug);
}
});
OnUnpublishing<TermPart>(
(context, part) =>
termPathConstraint.RemovePath(part.Slug)
);
}
开发者ID:dminik,项目名称:voda_code,代码行数:29,代码来源:TermPartHandler.cs
示例5: TermsPartHandler
public TermsPartHandler(
IContentDefinitionManager contentDefinitionManager,
IRepository<TermsPartRecord> repository,
ITaxonomyService taxonomyService,
IContentManager contentManager) {
_contentDefinitionManager = contentDefinitionManager;
_contentManager = contentManager;
Filters.Add(StorageFilter.For(repository));
OnPublished<TermsPart>((context, part) => RecalculateCount(contentManager, taxonomyService, part));
OnUnpublished<TermsPart>((context, part) => RecalculateCount(contentManager, taxonomyService, part));
OnRemoved<TermsPart>((context, part) => RecalculateCount(contentManager, taxonomyService, part));
// tells how to load the field terms on demand
OnLoaded<TermsPart>((context, part) => {
foreach(var field in part.ContentItem.Parts.SelectMany(p => p.Fields).OfType<TaxonomyField>()) {
var tempField = field.Name;
var fieldTermRecordIds = part.Record.Terms.Where(t => t.Field == tempField).Select(tci => tci.TermRecord.Id);
field.Terms.Loader(value => fieldTermRecordIds.Select(id => _contentManager.Get<TermPart>(id)));
}
});
OnIndexing<TermsPart>(
(context, part) => {
foreach (var term in part.Terms) {
var value = context.ContentManager.Get(term.TermRecord.Id).As<TitlePart>().Title;
context.DocumentIndex.Add(term.Field, value).Analyze();
context.DocumentIndex.Add(term.Field + "-id", term.Id).Store();
}
});
}
开发者ID:dminik,项目名称:voda_code,代码行数:32,代码来源:TermsPartHandler.cs
示例6: SameTermsFilter
public SameTermsFilter(ITaxonomyService taxonomyService,
IWorkContextAccessor workContextAccessor)
{
_taxonomyService = taxonomyService;
_workContextAccessor = workContextAccessor;
T = NullLocalizer.Instance;
}
开发者ID:Codinlab,项目名称:SameTermsFilter,代码行数:7,代码来源:SameTermsFilter.cs
示例7: CodeSamplesFilterController
public CodeSamplesFilterController(ICommonDataService commonDataService, ITaxonomyService taxonomyService, IContentManager contentManager)
{
_commonDataService = commonDataService;
_taxonomyService = taxonomyService;
_contentManager = contentManager;
Logger = NullLogger.Instance;
}
开发者ID:ShuanWang,项目名称:devoffice.com-shuanTestRepo,代码行数:7,代码来源:CodeSamplesFilterController.cs
示例8: TermsFilterForms
public TermsFilterForms(
IShapeFactory shapeFactory,
ITaxonomyService taxonomyService) {
_taxonomyService = taxonomyService;
Shape = shapeFactory;
T = NullLocalizer.Instance;
}
开发者ID:Higea,项目名称:Orchard,代码行数:7,代码来源:TermsFilterForms.cs
示例9: TermFeedQuery
public TermFeedQuery(
IContentManager contentManager,
ITaxonomyService taxonomyService)
{
_contentManager = contentManager;
_taxonomyService = taxonomyService;
}
开发者ID:ryankeeter,项目名称:Orchard-Theme,代码行数:7,代码来源:TermFeedQuery.cs
示例10: DefaultTaxonomyUpdater
public DefaultTaxonomyUpdater(ITaxonomyService taxonomyService,
ITaxonomyImportService taxonomyImportService)
{
_taxonomyService = taxonomyService;
_taxonomyImportService = taxonomyImportService;
Logger = NullLogger.Instance;
}
开发者ID:Trifectgaming,项目名称:Trifect-CMS,代码行数:8,代码来源:DefaultTaxonomyUpdater.cs
示例11: OEmbedController
public OEmbedController(
ITaxonomyService taxonomyService,
IMediaLibraryService mediaManagerService,
IOrchardServices services) {
_taxonomyService = taxonomyService;
_mediaLibraryService = mediaManagerService;
Services = services;
}
开发者ID:bigfont,项目名称:CertifiedOverheadCrane,代码行数:8,代码来源:OEmbedController.cs
示例12: WallViewModel
/// <summary>
/// Constructor to inject the view model dependencies
/// </summary>
/// <param name="wallPostRepository">Wall post data access</param>
/// <param name="wallReplyRepository">Wall reply data access</param>
/// <param name="taxonomyService">Taxonomy service</param>
/// <param name="resourceLocator">Resource utility</param>
/// <param name="log">Logging utility</param>
public WallViewModel(IWallPostRepository wallPostRepository, IWallReplyRepository wallReplyRepository, ITaxonomyService taxonomyService, IResourceLocator resourceLocator, ILogger log)
{
this._wallPostRepository = wallPostRepository;
this._wallReplyRepository = wallReplyRepository;
this._taxonomyService = taxonomyService;
this._resourceLocator = resourceLocator;
this._log = log;
}
开发者ID:GAlexandreBastien,项目名称:Dynamite-2010,代码行数:16,代码来源:WallViewModel.cs
示例13: TermRuleProvider
public TermRuleProvider(
IWorkContextAccessor workContextAccessor,
ITaxonomyService taxonomyService
)
{
_workContextAccessor = workContextAccessor;
_taxonomyService = taxonomyService;
}
开发者ID:Codinlab,项目名称:SameTermsFilter,代码行数:8,代码来源:TermRuleProvider.cs
示例14: GalleryFeatureHandler
public GalleryFeatureHandler(ITaxonomyService taxonomyService, IOrchardServices services, IContentDefinitionManager contentDefinitionManager,
IMembershipService membershipService, IUserkeyService userkeyService) {
_taxonomyService = taxonomyService;
_userkeyService = userkeyService;
_membershipService = membershipService;
_services = services;
_contentDefinitionManager = contentDefinitionManager;
}
开发者ID:NickAndersonX,项目名称:xodb,代码行数:8,代码来源:GalleryFeatureHandler.cs
示例15: ProductService
public ProductService(IContentManager contentManager,
IContentDefinitionManager contentDefinitionManager,
ITaxonomyService taxonomyService, IAuthorizationService authorizationService, IOrchardServices orchardServices) {
_contentManager = contentManager;
_contentDefinitionManager = contentDefinitionManager;
_taxonomyService = taxonomyService;
_authorizationService = authorizationService;
_orchardServices = orchardServices;
}
开发者ID:Devqon,项目名称:Devq.Sellit,代码行数:9,代码来源:ProductService.cs
示例16: TargetingProfileTaxonomySyncService
/// <summary>
/// Initializes a new instance of the <see cref="TargetingProfileTaxonomySyncService" /> class.
/// </summary>
/// <param name="taxonomyService">The taxonomy service.</param>
/// <param name="userProfilePropertyHelper">The user profile property helper.</param>
/// <param name="logger">The logger.</param>
public TargetingProfileTaxonomySyncService(
ITaxonomyService taxonomyService,
IUserProfilePropertyHelper userProfilePropertyHelper,
ILogger logger)
{
this.taxonomyService = taxonomyService;
this.userProfilePropertyHelper = userProfilePropertyHelper;
this.logger = logger;
}
开发者ID:GSoft-SharePoint,项目名称:Dynamite-Components,代码行数:15,代码来源:TargetingProfileTaxonomySyncService.cs
示例17: RecalculateCount
private static void RecalculateCount(IContentManager contentManager, ITaxonomyService taxonomyService, TermsPart part) {
// submits any change to the db so that GetContentItemsCount is accurate
contentManager.Flush();
foreach (var term in part.Terms) {
var termPart = taxonomyService.GetTerm(term.TermRecord.Id);
term.TermRecord.Count = (int)taxonomyService.GetContentItemsCount(termPart);
}
}
开发者ID:dminik,项目名称:voda_code,代码行数:9,代码来源:TermsPartHandler.cs
示例18: MediaLibraryService
public MediaLibraryService(
ITaxonomyService taxonomyService,
IContentManager contentManager,
IMimeTypeProvider mimeTypeProvider,
IEnumerable<IMediaFactorySelector> mediaFactorySelectors ) {
_taxonomyService = taxonomyService;
_contentManager = contentManager;
_mimeTypeProvider = mimeTypeProvider;
_mediaFactorySelectors = mediaFactorySelectors;
}
开发者ID:bigfont,项目名称:CertifiedOverheadCrane,代码行数:10,代码来源:MediaLibraryService.cs
示例19: TagsController
public TagsController(
ITaxonomyService taxonomyService,
IContentManager contentManager,
IAuthorizer authorizer) {
_taxonomyService = taxonomyService;
T = NullLocalizer.Instance;
_contentManager = contentManager;
_authorizer = authorizer;
Logger = NullLogger.Instance;
}
开发者ID:Higea,项目名称:Orchard,代码行数:10,代码来源:TagsController.cs
示例20: TaxonomyTreeNodeProvider
public TaxonomyTreeNodeProvider(
ITaxonomyService taxonomyService,
IContentManager contentManager,
UrlHelper urlHelper)
{
_taxonomyService = taxonomyService;
_contentManager = contentManager;
_url = urlHelper;
T = NullLocalizer.Instance;
}
开发者ID:dminik,项目名称:voda,代码行数:10,代码来源:TaxonomyTreeNodeProvider.cs
注:本文中的ITaxonomyService类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论