• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IContentDefinitionManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IContentDefinitionManager的典型用法代码示例。如果您正苦于以下问题:C# IContentDefinitionManager类的具体用法?C# IContentDefinitionManager怎么用?C# IContentDefinitionManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IContentDefinitionManager类属于命名空间,在下文中一共展示了IContentDefinitionManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: AdminController

 public AdminController(IContentManager contentManager,
     IOrchardServices services,
     IShapeFactory shapeFactory,
     IContentDefinitionManager contentDefinitionManager,
     IRemoteContentFetchService remoteContentFetchService,
     ISynchronisationMapFactory synchronisationMapFactory,
     IRepository<ContentSyncSettings> contentSyncSettingsRepository,
     ISignals signals,
     ILoggerFactory loggerFactory,
     ICacheManager cacheManager,
     IImportExportService importExportService,
     IRecipeParser recipeParser,
     IRemoteImportService remoteImportService,
     IEnumerable<IHardComparer> hardComparers, 
     IEnumerable<ISoftComparer> softComparers) {
     _contentManager = contentManager;
     _services = services;
     _shapeFactory = shapeFactory;
     _contentDefinitionManager = contentDefinitionManager;
     _remoteContentFetchService = remoteContentFetchService;
     _synchronisationMapFactory = synchronisationMapFactory;
     _contentSyncSettingsRepository = contentSyncSettingsRepository;
     _signals = signals;
     _loggerFactory = loggerFactory;
     _cacheManager = cacheManager;
     _importExportService = importExportService;
     _recipeParser = recipeParser;
     _remoteImportService = remoteImportService;
     _hardComparers = hardComparers;
     _softComparers = softComparers;
     Logger = loggerFactory.CreateLogger(typeof (AdminController));
     }
开发者ID:andrewmyhre,项目名称:Tad.ContentSync,代码行数:32,代码来源:AdminController.cs


示例2: ContentTypesFilterForms

 public ContentTypesFilterForms(
     IShapeFactory shapeFactory,
     IContentDefinitionManager contentDefinitionManager) {
     _contentDefinitionManager = contentDefinitionManager;
     Shape = shapeFactory;
     T = NullLocalizer.Instance;
 }
开发者ID:anycall,项目名称:Orchard,代码行数:7,代码来源:ContentTypesFilter.cs


示例3: DefaultContentTypeDisplayDriver

 public DefaultContentTypeDisplayDriver(
     IContentDefinitionManager contentDefinitionManager,
     IStringLocalizer<DefaultContentDefinitionDisplayManager> localizer)
 {
     _contentDefinitionManager = contentDefinitionManager;
     T = localizer;
 }
开发者ID:rodpl,项目名称:Orchard2,代码行数:7,代码来源:DefaultContentTypeDisplayDriver.cs


示例4: ContentController

 public ContentController(IAuthorizer authorizer, IContentManager contentManager, INotifier notifier, IContentDefinitionManager contentDefinitionManager) {
     _authorizer = authorizer;
     _contentManager = contentManager;
     _notifier = notifier;
     _contentDefinitionManager = contentDefinitionManager;
     T = NullLocalizer.Instance;
 }
开发者ID:RasterImage,项目名称:Orchard,代码行数:7,代码来源:ContentController.cs


示例5: NotificationsPartHandler

        public NotificationsPartHandler(
            IRepository<NotificationsPartRecord> repository, 
            IContentManager contentManager, 
            IContentDefinitionManager contentDefinitionManager, 
            INotificationsService notificationsService) {

            _contentManager = contentManager;
            _contentDefinitionManager = contentDefinitionManager;

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

            OnActivated<NotificationsPart>(LazyLoadHandlers);
            OnUpdated<NotificationsPart>((ctx, part) => notificationsService.UpdateScheduleTasks(part));
            OnUnpublished<NotificationsPart>((ctx, part) => notificationsService.DeleteExistingScheduleTasks(part.ContentItem));

            OnRemoved<NotificationsPart>((ctx, part) => {
                // Also delete all subscriptions
                var subscriptions = notificationsService.GetSubscriptionsForEvent(part.Id);
                foreach (var subscription in subscriptions) {
                    notificationsService.DeleteSubscription(subscription);
                }
                // And the scheduled tasks
                notificationsService.DeleteExistingScheduleTasks(part.ContentItem);
            });
        }
开发者ID:Devqon,项目名称:DQ.Scheduling,代码行数:25,代码来源:NotificationsPartHandler.cs


示例6: NotificationsSubscriptionPartHandler

        public NotificationsSubscriptionPartHandler(IRepository<NotificationsSubscriptionPartRecord> repository, IContentDefinitionManager contentDefinitionManager) {
            Filters.Add(StorageFilter.For(repository));
            Filters.Add(new ActivatingFilter<NotificationsSubscriptionPart>(Constants.NotificationsSubscriptionType));

            OnUpdated<NotificationsSubscriptionPart>(TriggerNotificationsSubscriptionUpdatedEvents);
            OnUnpublished<NotificationsSubscriptionPart>(TriggerNotificationsSubscriptionUnpublishedEvents);
        }
开发者ID:Devqon,项目名称:DQ.Scheduling,代码行数:7,代码来源:NotificationsSubscriptionPartHandler.cs


示例7: MarkdownSiteSettingsPartHandler

        public MarkdownSiteSettingsPartHandler(IContentDefinitionManager contentDefinitionManager) {
            _contentDefinitionManager = contentDefinitionManager;
            Filters.Add(new ActivatingFilter<MarkdownSiteSettingsPart>("Site"));
            Filters.Add(new TemplateFilterForPart<MarkdownSiteSettingsPart>("MarkdownSiteSettings", "Parts/Markdown.MarkdownSiteSettings", "markdown"));
            OnInitializing<MarkdownSiteSettingsPart>((context, part) => {
                part.UseMarkdownForBlogs = false;
            });

            OnUpdated<MarkdownSiteSettingsPart>((context, part) => {
                var blogPost = _contentDefinitionManager.GetTypeDefinition("BlogPost");
                if (blogPost == null) {
                        return;
                }

                var bodyPart = blogPost.Parts.FirstOrDefault(x => x.PartDefinition.Name == "BodyPart");
                if (bodyPart == null) {
                    return;
                }

                _contentDefinitionManager.AlterTypeDefinition("BlogPost", build => build
                    .WithPart("BodyPart", cfg => cfg
                        .WithSetting("BodyTypePartSettings.Flavor", part.UseMarkdownForBlogs ? "markdown" : "html")
                    )
                );
            });

            T = NullLocalizer.Instance;
        }
开发者ID:jdages,项目名称:AndrewsHouse,代码行数:28,代码来源:MarkdownSiteSettingsPartHandler.cs


示例8: AdminController

        public AdminController(
            IContentManager contentManager,
            IContentItemDisplayManager contentItemDisplayManager,
            IContentDefinitionManager contentDefinitionManager,
            ISiteService siteService,
            INotifier notifier,
            ISession session,
            IShapeFactory shapeFactory,
            ILogger<AdminController> logger,
            IHtmlLocalizer<AdminController> localizer,
            IAuthorizationService authorizationService,
            IEnumerable<IContentAdminFilter> contentAdminFilters
            )
        {
            _contentAdminFilters = contentAdminFilters;
            _authorizationService = authorizationService;
            _notifier = notifier;
            _contentItemDisplayManager = contentItemDisplayManager;
            _session = session;
            _siteService = siteService;
            _contentManager = contentManager;
            _contentDefinitionManager = contentDefinitionManager;

            T = localizer;
            New = shapeFactory;
            Logger = logger;
        }
开发者ID:geertdoornbos,项目名称:Orchard2,代码行数:27,代码来源:AdminController.cs


示例9: AdminController

        public AdminController(
            IContentDefinitionDisplayManager contentDefinitionDisplayManager,
            IContentDefinitionService contentDefinitionService,
            IContentDefinitionManager contentDefinitionManager,
            ShellSettings settings,
            IAuthorizationService authorizationService,
            ISession session,
            ILogger<AdminController> logger,
            IHtmlLocalizer<AdminMenu> htmlLocalizer,
            IStringLocalizer<AdminMenu> stringLocalizer,
            INotifier notifier
            )
        {
            _notifier = notifier;
            _contentDefinitionDisplayManager = contentDefinitionDisplayManager;
            _session = session;
            _authorizationService = authorizationService;
            _contentDefinitionService = contentDefinitionService;
            _contentDefinitionManager = contentDefinitionManager;
            _settings = settings;

            Logger = logger;
            T = htmlLocalizer;
            S = stringLocalizer;
        }
开发者ID:rodpl,项目名称:Orchard2,代码行数:25,代码来源:AdminController.cs


示例10: ContentPickerFieldHandler

 public ContentPickerFieldHandler(
     IContentManager contentManager, 
     IContentDefinitionManager contentDefinitionManager) {
     
     _contentManager = contentManager;
     _contentDefinitionManager = contentDefinitionManager;
 }
开发者ID:kerrjon,项目名称:MNFathers,代码行数:7,代码来源:ContentPickerFieldHandler.cs


示例11: ContentPickerNavigationProvider

 public ContentPickerNavigationProvider(
     IContentDefinitionManager contentDefinitionManager, 
     IWorkContextAccessor workContextAccessor) {
     _contentDefinitionManager = contentDefinitionManager;
     _workContextAccessor = workContextAccessor;
     T = NullLocalizer.Instance;
 }
开发者ID:anycall,项目名称:Orchard,代码行数:7,代码来源:ContentPickerNavigationProvider.cs


示例12: 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


示例13: 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


示例14: MetadataRecipeHandler

 public MetadataRecipeHandler(IContentDefinitionManager contentDefinitionManager, IContentDefinitionReader contentDefinitionReader)
 {
     _contentDefinitionManager = contentDefinitionManager;
     _contentDefinitionReader = contentDefinitionReader;
     Logger = NullLogger.Instance;
     T = NullLocalizer.Instance;
 }
开发者ID:polynomicworks,项目名称:Coevery-Framework,代码行数:7,代码来源:MetaDataRecipeHandler.cs


示例15: MediaGalleryFieldHandler

 public MediaGalleryFieldHandler(
     IJsonConverter jsonConverter,
     IContentDefinitionManager contentDefinitionManager)
 {
     _jsonConverter = jsonConverter;
     _contentDefinitionManager = contentDefinitionManager;
 }
开发者ID:Timbioz,项目名称:SciGitAzure,代码行数:7,代码来源:MediaGalleryFieldHandler.cs


示例16: DynamicPermissionsProvider

 public DynamicPermissionsProvider(
     IEnumerable<IDynamicPermissionProvider> dynamicProviders,
     IContentDefinitionManager contentDefinitionManager)
 {
     _contentDefinitionManager = contentDefinitionManager;
     _dynamicProviders = dynamicProviders;
 }
开发者ID:akhurst,项目名称:ricealumni,代码行数:7,代码来源:DynamicPermissionsProvider.cs


示例17: WidgetExPartHandler

 public WidgetExPartHandler(IRepository<WidgetExPartRecord> repository, IContentDefinitionManager contentDefinitionManager, IContentManager contentManager)
 {
     Filters.Add(StorageFilter.For(repository));
     _contentDefinitionManager = contentDefinitionManager;
     _contentManager = contentManager;
     OnActivated<WidgetExPart>(SetupFields);
 }
开发者ID:kanujhun,项目名称:myblog,代码行数:7,代码来源:WidgetExPartHandler.cs


示例18: QuickWidgetsSetup

 public QuickWidgetsSetup(
     IQuickPartsManager quickPartsManager,
     IContentDefinitionManager contentDefinitionManager)
 {
     _quickPartsManager = quickPartsManager;
     _contentDefinitionManager = contentDefinitionManager;
 }
开发者ID:Lombiq,项目名称:Orchard-Abstractions,代码行数:7,代码来源:QuickWidgetsSetup.cs


示例19: AdvancedSitemapService

 public AdvancedSitemapService(
     IRepository<SitemapRouteRecord> routeRepository, 
     IRepository<SitemapSettingsRecord> settingsRepository,
     IRepository<SitemapCustomRouteRecord> customRouteRepository,
     IContentManager contentManager,
     ICacheManager cacheManager,
     ISignals signals,
     IClock clock,
     IContentDefinitionManager contentDefinitionManager,
     IEnumerable<ISitemapRouteFilter> routeFilters,
     IEnumerable<ISitemapRouteProvider> routeProviders, 
     ISiteService siteService, 
     IEnumerable<ISpecializedSitemapProvider> specializedSitemapProviders)
 {
     _routeRepository = routeRepository;
     _settingsRepository = settingsRepository;
     _customRouteRepository = customRouteRepository;
     _contentManager = contentManager;
     _cacheManager = cacheManager;
     _signals = signals;
     _clock = clock;
     _contentDefinitionManager = contentDefinitionManager;
     _routeFilters = routeFilters;
     _routeProviders = routeProviders;
     _siteService = siteService;
     _specializedSitemapProviders = specializedSitemapProviders;
 }
开发者ID:jeffolmstead,项目名称:Orchard-SiteMap,代码行数:27,代码来源:AdvancedSitemapService.cs


示例20: MediaLibraryPickerFieldHandler

 public MediaLibraryPickerFieldHandler(
     IContentManager contentManager, 
     IContentDefinitionManager contentDefinitionManager) {
     
     _contentManager = contentManager;
     _contentDefinitionManager = contentDefinitionManager;
 }
开发者ID:jgtaveras,项目名称:Coevery,代码行数:7,代码来源:MediaLibraryPickerFieldHandler.cs



注:本文中的IContentDefinitionManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IContentLoader类代码示例发布时间:2022-05-24
下一篇:
C# IContent类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap