public PageByFieldTemplateCache(
            FieldTemplateService fieldTemplateService,
            DataService dataService,
            EventBroker eventBroker,
            MemoryCacheService memoryCacheService,
            AuthorizationService authorizationService,
            PageService pageService,
            IServiceProvider serviceProvider,
            RouteRequestLookupInfoAccessor routeRequestLookupInfoAccessor)
        {
            var fieldType = ActivatorUtilities.CreateInstance <T>(serviceProvider);

            _fieldTemplateService = fieldTemplateService;
            _dataService          = dataService;
            _memoryCacheService   = memoryCacheService;
            _authorizationService = authorizationService;
            _pageService          = pageService;
            _fieldTemplateName    = fieldType.Name;

            _cacheKey = GetType().FullName + ":" + _fieldTemplateName;

            eventBroker.Subscribe <FieldTemplateCreated>(_ => _memoryCacheService.Remove(_cacheKey));
            eventBroker.Subscribe <FieldTemplateDeleted>(_ => _memoryCacheService.Remove(_cacheKey));
            eventBroker.Subscribe <DraftPageCreated>(_ => _memoryCacheService.Remove(_cacheKey));
            eventBroker.Subscribe <PageCreated>(_ => _memoryCacheService.Remove(_cacheKey));
            eventBroker.Subscribe <PageDeleted>(_ => _memoryCacheService.Remove(_cacheKey));
            eventBroker.Subscribe <PageUpdated>(x =>
            {
                if (x.OriginalFieldTemplateSystemId != null)
                {
                    _memoryCacheService.Remove(_cacheKey);
                }
            });
            _routeRequestLookupInfoAccessor = routeRequestLookupInfoAccessor;
        }
Beispiel #2
0
 public AcceleratorPackage(
     AssortmentService assortmentService,
     FieldTemplateService fieldTemplateService,
     StructureInfoService structureInfoService,
     MarketService marketService,
     ChannelService channelService,
     CurrencyService currencyService,
     WebsiteService websiteService,
     InventoryService inventoryService,
     PriceListService priceListService,
     DomainNameService domainNameService,
     GroupService groupService,
     FolderService folderService,
     PersonService personService,
     LanguageService languageService,
     SlugifyService slugifyService)
 {
     _assortmentService    = assortmentService;
     _fieldTemplateService = fieldTemplateService;
     _structureInfoService = structureInfoService;
     _marketService        = marketService;
     _channelService       = channelService;
     _currencyService      = currencyService;
     _websiteService       = websiteService;
     _inventoryService     = inventoryService;
     _priceListService     = priceListService;
     _domainNameService    = domainNameService;
     _groupService         = groupService;
     _folderService        = folderService;
     _personService        = personService;
     _languageService      = languageService;
     _slugifyService       = slugifyService;
 }
Beispiel #3
0
 public RequestModelActionFilter(
     RouteRequestLookupInfoAccessor routeRequestLookupInfoAccessor,
     RequestModelAccessor requestModelAccessor,
     RouteRequestInfoAccessor routeRequestInfoAccessor,
     ISecureConnectionResolver secureConnectionResolver,
     ChannelService channelService,
     DomainNameService domainNameService,
     LanguageService languageService,
     PageService pageService,
     FieldTemplateService fieldTemplateService,
     UrlService urlService,
     CountryService countryService)
 {
     _routeRequestLookupInfoAccessor = routeRequestLookupInfoAccessor;
     _requestModelAccessor           = requestModelAccessor;
     _routeRequestInfoAccessor       = routeRequestInfoAccessor;
     _secureConnectionResolver       = secureConnectionResolver;
     _channelService       = channelService;
     _domainNameService    = domainNameService;
     _languageService      = languageService;
     _pageService          = pageService;
     _fieldTemplateService = fieldTemplateService;
     _urlService           = urlService;
     _countryService       = countryService;
 }
Beispiel #4
0
 public ProductDemoService(BaseProductService baseProductService, FieldTemplateService fieldTemplateService, VariantService variantService, CategoryService categoryService)
 {
     _baseProductService   = baseProductService;
     _fieldTemplateService = fieldTemplateService;
     _variantService       = variantService;
     _categoryService      = categoryService;
 }
Beispiel #5
0
 public ProductCatalogStructurePackage(BaseProductService baseProductService, ProductListService productListService,
                                       RelationshipTypeService relationshipTypeService, CategoryService categoryService,
                                       UnitOfMeasurementService unitOfMeasurementService, DataService dataService,
                                       FieldTemplateService fieldTemplateService,
                                       LanguageService languageService, VariantService variantService,
                                       InventoryService inventoryService,
                                       PriceListService priceListService,
                                       StructureInfoService structureInfoService,
                                       CurrencyService currencyService,
                                       FilterService filterService,
                                       InventoryItemService inventoryItemService,
                                       PriceListItemService priceListItemService,
                                       ProductListItemService productListItemService)
 {
     _baseProductService        = baseProductService;
     _categoryService           = categoryService;
     _dataService               = dataService;
     _fieldTemplateService      = fieldTemplateService;
     _languageService           = languageService;
     _variantService            = variantService;
     _inventoryService          = inventoryService;
     _priceListService          = priceListService;
     _structureInfoService      = structureInfoService;
     _currencyService           = currencyService;
     _filterService             = filterService;
     _productListService        = productListService;
     _relationshipTypeService   = relationshipTypeService;
     _unitOfMeasurementService  = unitOfMeasurementService;
     _bidirectionalRelationList = new List <ImportBidirectionalRelation>();
     _inventoryItemService      = inventoryItemService;
     _priceListItemService      = priceListItemService;
     _productListItemService    = productListItemService;
 }
Beispiel #6
0
 public RequestModelHandler(
     ISecureConnectionResolver secureConnectionResolver,
     ChannelService channelService,
     DomainNameService domainNameService,
     LanguageService languageService,
     RouteRequestLookupInfoAccessor routeRequestLookupInfoAccessor,
     RouteRequestInfoAccessor routeRequestInfoAccessor,
     CartAccessor cartAccessor,
     RequestModelAccessor requestModelAccessor,
     PageService pageService,
     FieldTemplateService fieldTemplateService,
     UrlService urlService)
 {
     _secureConnectionResolver       = secureConnectionResolver;
     _channelService                 = channelService;
     _domainNameService              = domainNameService;
     _languageService                = languageService;
     _routeRequestLookupInfoAccessor = routeRequestLookupInfoAccessor;
     _routeRequestInfoAccessor       = routeRequestInfoAccessor;
     _cartAccessor         = cartAccessor;
     _requestModelAccessor = requestModelAccessor;
     _pageService          = pageService;
     _fieldTemplateService = fieldTemplateService;
     _urlService           = urlService;
 }
Beispiel #7
0
 public BannersResolver(FieldTemplateService fieldTemplateService,
                        RouteRequestLookupInfoAccessor routeRequestLookupInfoAccessor,
                        UrlService urlService)
 {
     _fieldTemplateService           = fieldTemplateService;
     _routeRequestLookupInfoAccessor = routeRequestLookupInfoAccessor;
     _urlService = urlService;
 }
Beispiel #8
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="T:System.Object" /> class.
 /// </summary>
 public MediaArchiveStructurePackage(FileService fileService, FolderService folderService, DataService dataService, FileMetadataExtractorService fileMetadataExtractorService, BlobService blobService, FieldTemplateService fieldTemplateService, GroupService groupService)
 {
     _folderService = folderService;
     _fileService   = fileService;
     _dataService   = dataService;
     _fileMetadataExtractorService = fileMetadataExtractorService;
     _blobService          = blobService;
     _fieldTemplateService = fieldTemplateService;
     _groupService         = groupService;
 }
Beispiel #9
0
 public MediaArchiveImpl(FolderService folderService,
                         FieldTemplateService fieldTemplateService,
                         FileService fileService,
                         DataService dataService)
 {
     _folderService        = folderService;
     _fieldTemplateService = fieldTemplateService;
     _fileService          = fileService;
     _dataService          = dataService;
     _rootFolder           = new RootFolder(fieldTemplateService, DefaultFolderTemplate);
 }
 public CategoryDemoService(CategoryService categoryService,
                            FieldTemplateService fieldTemplateService, ISuggestionService suggestionService,
                            VariantService variantService, ChannelService channelService)
 {
     _categoryService      = categoryService;
     _fieldTemplateService = fieldTemplateService;
     _suggestionService    = suggestionService;
     _variantService       = variantService;
     _channelService       = channelService;
     _categoryLookup       = new Dictionary <string, Category>();
 }
 public WebsiteStructurePackage(PageService pageService, DataService dataService, ChannelService channelService, WebsiteService websiteService, FieldTemplateService fieldTemplateService, DomainNameService domainNameService, CountryService countryService, MarketService marketService, TaxClassService taxClassService, BlockService blockService, StructureInfoService structureInfoService, BlobService blobService)
 {
     _pageService          = pageService;
     _dataService          = dataService;
     _channelService       = channelService;
     _fieldTemplateService = fieldTemplateService;
     _countryService       = countryService;
     _marketService        = marketService;
     _taxClassService      = taxClassService;
     _blockService         = blockService;
     _structureInfoService = structureInfoService;
     _blobService          = blobService;
 }
Beispiel #12
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="T:System.Object" /> class.
 /// </summary>
 public PackageService(IStructurePackage <StructureInfo.WebsiteStructure> websiteStructurePackage,
                       IStructurePackage <StructureInfo.MediaArchiveStructure> mediaStructurePackage,
                       IStructurePackage <StructureInfo.ProductCatalogStructure> productStructurePackage,
                       IStructurePackage <StructureInfo.ECommerceStructure> ecommerceStructurePackage,
                       GroupService groupService, LanguageService languageService, CurrencyService currencyService, FieldTemplateService fieldTemplateService)
 {
     _websiteStructurePackage   = websiteStructurePackage;
     _mediaStructurePackage     = mediaStructurePackage;
     _productStructurePackage   = productStructurePackage;
     _ecommerceStructurePackage = ecommerceStructurePackage;
     _groupService         = groupService;
     _languageService      = languageService;
     _currencyService      = currencyService;
     _fieldTemplateService = fieldTemplateService;
 }
Beispiel #13
0
 public DefinitionSetup(
     FieldDefinitionService fieldDefinitionService,
     FieldTemplateService fieldTemplateService,
     SettingService settingService,
     SecurityContextService securityContextService,
     RelationshipTypeService relationshipTypeService,
     DisplayTemplateService displayTemplateService,
     Block.CategoryService categoryService,
     AddressTypeService addressTypeService,
     RoleService roleService,
     TemplateSettingService templateSettingService,
     IEnumerable <FieldDefinitionSetup> fieldDefinitonSetups,
     IEnumerable <FieldTemplateSetup> fieldTemplateSetups,
     IEnumerable <DisplayTemplateSetup> displayTemplateSetups,
     IEnumerable <RelationshipTypeSetup> relationshipTypeSetups,
     IEnumerable <BlockCategorySetup> categorySetup,
     IEnumerable <AddressTypeSetup> addressTypeSetup,
     IEnumerable <RoleSetup> roleSetups,
     FieldFrameworkSetupLocalizationService fieldFrameworkSetupLocalizationService,
     FilterService filterService,
     ILogger <DefinitionSetup> logger,
     IEnumerable <IDefinitionSetup> extraSetup)
 {
     _fieldDefinitionService  = fieldDefinitionService;
     _fieldTemplateService    = fieldTemplateService;
     _settingService          = settingService;
     _definitionSetups        = fieldDefinitonSetups;
     _fieldTemplateSetups     = fieldTemplateSetups;
     _securityContextService  = securityContextService;
     _relationshipTypeService = relationshipTypeService;
     _displayTemplateService  = displayTemplateService;
     _categoryService         = categoryService;
     _templateSettingService  = templateSettingService;
     _displayTemplateSetups   = displayTemplateSetups;
     _relationshipTypeSetups  = relationshipTypeSetups;
     _categorySetups          = categorySetup;
     _addressTypeService      = addressTypeService;
     _addressTypeSetups       = addressTypeSetup;
     _roleSetups  = roleSetups;
     _roleService = roleService;
     _fieldFrameworkSetupLocalizationService = fieldFrameworkSetupLocalizationService;
     _filterService = filterService;
     _logger        = logger;
     _extraSetup    = extraSetup;
 }
 public ProductIndexDocumentBuilder(
     IndexDocumentBuilderDependencies dependencies,
     BaseProductService baseProductService,
     DisplayTemplateService displayTemplateService,
     FieldTemplateService fieldTemplateService,
     VariantService variantService,
     TemplateSettingService templateSettingService,
     ProductIndexingContext productIndexingContext,
     CategoryService categoryService,
     MostSoldDataHolder mostSoldDataHolder,
     CampaignDataHolder campaignDataHolder,
     CountryService countryService,
     PriceListService priceListService,
     PriceListItemService priceListItemService,
     ProductListService productListService,
     ProductListItemService productListItemService,
     FilterService filterService,
     FieldDefinitionService fieldDefinitionService,
     SearchPermissionService searchPermissionService,
     ContentBuilderService contentBuilderService,
     ChannelService channelService,
     LanguageService languageService)
     : base(dependencies)
 {
     _baseProductService      = baseProductService;
     _displayTemplateService  = displayTemplateService;
     _fieldTemplateService    = fieldTemplateService;
     _variantService          = variantService;
     _templateSettingService  = templateSettingService;
     _productIndexingContext  = productIndexingContext;
     _categoryService         = categoryService;
     _mostSoldDataHolder      = mostSoldDataHolder;
     _campaignDataHolder      = campaignDataHolder;
     _countryService          = countryService;
     _priceListService        = priceListService;
     _priceListItemService    = priceListItemService;
     _productListService      = productListService;
     _productListItemService  = productListItemService;
     _filterService           = filterService;
     _fieldDefinitionService  = fieldDefinitionService;
     _searchPermissionService = searchPermissionService;
     _contentBuilderService   = contentBuilderService;
     _channelService          = channelService;
     _languageService         = languageService;
 }
Beispiel #15
0
        public BlockType(BlockService blockService, FieldTemplateService fieldTemplateService,
                         NamedServiceFactory <IBlockDataBuilder> blockDataBuilderFactory,
                         RouteInfoService routeInfoService)
        {
            Name        = "Block";
            Description = "Block data";
            Field(p => p.SystemId, type: typeof(IdGraphType)).Description("The block Id");

            Field <StringGraphType>(nameof(BlockModel.BlockType), "The block type",
                                    resolve: context =>
            {
                var block    = blockService.Get(context.Source.SystemId);
                var template = fieldTemplateService.Get <BlockFieldTemplate>(block.FieldTemplateSystemId);
                return(template.Id);
            });

            FieldAsync <StringGraphType>(nameof(BlockModel.ValueAsJSON), "Value as JSON string",
                                         arguments: new QueryArguments(
                                             new QueryArgument <GlobalInputType> {
                Name = "global", Description = "The global object"
            }
                                             ),
                                         resolve: async context =>
            {
                var block    = blockService.Get(context.Source.SystemId);
                var template = fieldTemplateService.Get <BlockFieldTemplate>(block.FieldTemplateSystemId);
                // Special treatment for scoped services https://graphql-dotnet.github.io/docs/getting-started/dependency-injection/#scoped-services-with-a-singleton-schema-lifetime
                // and make sure it is thread safe https://graphql-dotnet.github.io/docs/getting-started/dependency-injection/#thread-safety-with-scoped-services
                using var scope = context.RequestServices.CreateScope();
                var builder     = scope.ServiceProvider.GetNamedService <IBlockDataBuilder>(template.Id);
                if (builder == null)
                {
                    return(null);
                }
                var globalModel = context.GetArgument <GlobalModel>("global");
                routeInfoService.Setup(globalModel, context.Source.PageSystemId);
                var buildMethod = builder.GetType().GetMethod(nameof(IBlockDataBuilder <IViewModel> .BuildAsync));
                var value       = await(dynamic) buildMethod.Invoke(builder,
                                                                    new object[] { scope, new Web.Models.Blocks.BlockModel(block, block.Fields) });
                var jsonSerializerSettings = ApplicationConverter.JsonSerializerSettings();
                // jsonSerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;
                return(JsonConvert.SerializeObject(value, jsonSerializerSettings));
            });
        }
Beispiel #16
0
 public PageIndexDocumentBuilder(
     IndexDocumentBuilderDependencies dependencies,
     ChannelService channelService,
     LanguageService languageService,
     PageService pageService,
     SearchPermissionService searchPermissionService,
     ContentBuilderService contentBuilderService,
     BlockService blockService,
     KeyLookupService keyLookupService,
     FieldTemplateService fieldTemplateService)
     : base(dependencies)
 {
     _channelService          = channelService;
     _languageService         = languageService;
     _pageService             = pageService;
     _searchPermissionService = searchPermissionService;
     _contentBuilderService   = contentBuilderService;
     _blockService            = blockService;
     _keyLookupService        = keyLookupService;
     _fieldTemplateService    = fieldTemplateService;
 }
Beispiel #17
0
 public PersonViewModelService(
     PersonService personService,
     SecurityContextService securityContextService,
     LoginService loginService,
     MailService mailService,
     FieldTemplateService templateService,
     RoleService roleService,
     UserValidationService userValidationService,
     WelcomeEmailDefinitionResolver welcomeEmailDefinitionResolver,
     PersonStorage personStorage)
 {
     _personService                  = personService;
     _securityContextService         = securityContextService;
     _loginService                   = loginService;
     _mailService                    = mailService;
     _templateService                = templateService;
     _roleService                    = roleService;
     _userValidationService          = userValidationService;
     _welcomeEmailDefinitionResolver = welcomeEmailDefinitionResolver;
     _personStorage                  = personStorage;
 }
 public CheckoutServiceImpl(
     ModuleECommerce moduleECommerce,
     RequestModelAccessor requestModelAccessor,
     CartService cartService,
     IPaymentInfoFactory paymentInfoFactory,
     LanguageService languageService,
     UserValidationService userValidationService,
     SecurityContextService securityContextService,
     PersonService personService,
     LoginService loginService,
     MailService mailService,
     WelcomeEmailDefinitionResolver welcomeEmailDefinitionResolver,
     FieldTemplateService templateService,
     WebsiteService websiteService,
     AddressTypeService addressTypeService,
     UrlService urlService,
     PageService pageService,
     PersonStorage personStorage,
     CheckoutState checkoutState)
 {
     _moduleECommerce                = moduleECommerce;
     _requestModelAccessor           = requestModelAccessor;
     _cartService                    = cartService;
     _paymentInfoFactory             = paymentInfoFactory;
     _languageService                = languageService;
     _userValidationService          = userValidationService;
     _securityContextService         = securityContextService;
     _personService                  = personService;
     _loginService                   = loginService;
     _mailService                    = mailService;
     _welcomeEmailDefinitionResolver = welcomeEmailDefinitionResolver;
     _templateService                = templateService;
     _addressTypeService             = addressTypeService;
     _websiteService                 = websiteService;
     _pageService                    = pageService;
     _personStorage                  = personStorage;
     _checkoutState                  = checkoutState;
     _urlService = urlService;
 }
        public CheckoutController(
            SecurityContextService securityContextService,
            FieldTemplateService templateService,
            PersonService personService,
            OrganizationService organizationService,
            AddressTypeService addressTypeService,
            ChannelService channelService,
            WebsiteService websiteService,
            PageService pageService,
            UrlService urlService,
            UserValidationService userValidationService,
            LoginService loginService,
            MailService mailService,
            WelcomeEmailDefinitionResolver welcomeEmailDefinitionResolver,
            PaymentOptionViewModelBuilder paymentOptionViewModelBuilder,
            DeliveryMethodViewModelBuilder deliveryMethodViewModelBuilder,
            ILogger <CheckoutController> logger)
        {
            _securityContextService = securityContextService;
            _templateService        = templateService;
            _personService          = personService;
            _organizationService    = organizationService;
            _addressTypeService     = addressTypeService;
            _channelService         = channelService;
            _websiteService         = websiteService;
            _pageService            = pageService;
            _urlService             = urlService;

            _userValidationService          = userValidationService;
            _loginService                   = loginService;
            _mailService                    = mailService;
            _welcomeEmailDefinitionResolver = welcomeEmailDefinitionResolver;
            _paymentOptionViewModelBuilder  = paymentOptionViewModelBuilder;
            _deliveryMethodViewModelBuilder = deliveryMethodViewModelBuilder;
            _logger = logger;
        }
 public SearchIndexingController(FieldTemplateService fieldTemplateService, TemplateSettingService templateSettingService, FieldDefinitionService fieldDefinitionService)
 {
     _fieldTemplateService   = fieldTemplateService;
     _templateSettingService = templateSettingService;
     _fieldDefinitionService = fieldDefinitionService;
 }
Beispiel #21
0
 public BannersResolver(FieldTemplateService fieldTemplateService)
 {
     _fieldTemplateService = fieldTemplateService;
 }
Beispiel #22
0
 public RootFolder(FieldTemplateService fieldTemplateService, string folderTemplateId)
 {
     _fieldTemplateService = fieldTemplateService;
     _folderTemplateId     = folderTemplateId;
 }
Beispiel #23
0
        public PageType(PageService pageService, BlockService blockService, UrlService urlService,
                        FieldTemplateService fieldTemplateService, RouteInfoService routeInfoService)
        {
            Name        = "Page";
            Description = "Page data";
            Field(p => p.SystemId, type: typeof(IdGraphType)).Description("The System Id");
            Field(p => p.Slug, nullable: true).Description("The slug")
            .Argument <GlobalInputType>("global")
            .Resolve(context =>
            {
                var globalModel = context.GetArgument <GlobalModel>("global");
                var page        = pageService.Get(context.Source.SystemId);
                return(urlService.GetUrl(page, new PageUrlArgs(globalModel.ChannelSystemId)));
            });

            Field <ListGraphType <BlockAreaType> >(nameof(PageModel.Areas), "Block areas",
                                                   resolve: context =>
            {
                var page = pageService.Get(context.Source.SystemId);
                return(page.Blocks.Items.Select(container =>
                                                new BlockAreaModel()
                {
                    Id = container.Id,
                    Blocks = blockService.Get(container.Items.Select(block => ((BlockItemLink)block).BlockSystemId))
                             .MapEnumerableTo <BlockModel>()
                             .Select(b => { b.PageSystemId = context.Source.SystemId; return b; }).ToList()
                }).ToList());
            });

            Field <StringGraphType>(nameof(PageModel.TemplateId), "Template id",
                                    resolve: context =>
            {
                var page     = pageService.Get(context.Source.SystemId);
                var template = fieldTemplateService.Get <PageFieldTemplate>(page.FieldTemplateSystemId);
                return(template.Id);
            });

            Field <StringGraphType>(nameof(PageModel.Name), "The page name",
                                    arguments: new QueryArguments(
                                        new QueryArgument <GlobalInputType> {
                Name = "global", Description = "The global object"
            }
                                        ),
                                    resolve: context =>
            {
                var page        = pageService.Get(context.Source.SystemId);
                var globalModel = context.GetArgument <GlobalModel>("global");
                return(page.GetEntityName(true, CultureInfo.GetCultureInfo(globalModel.CurrentCulture)) ?? page.Id ?? "general.NameIsMissing".AsAngularResourceString());
            });

            Field <PageInfoPageType>(nameof(PageModel.Children), description: "Sub pages",
                                     arguments: new QueryArguments(
                                         new QueryArgument <IntGraphType> {
                Name = "offset"
            },
                                         new QueryArgument <IntGraphType> {
                Name = "take"
            }
                                         ),
                                     resolve: context =>
                                     new PageInfoModel <Page, PageModel>(pageService.GetChildPages(context.Source.SystemId),
                                                                         context.GetArgument("offset", 0), context.GetArgument("take", 10)));

            FieldAsync <StringGraphType>(nameof(PageModel.ValueAsJSON), "Value as JSON string",
                                         arguments: new QueryArguments(
                                             new QueryArgument <GlobalInputType> {
                Name = "global", Description = "The global object"
            }
                                             ),
                                         resolve: async context =>
            {
                var page     = pageService.Get(context.Source.SystemId);
                var template = fieldTemplateService.Get <PageFieldTemplate>(page.FieldTemplateSystemId);
                // Special treatment for scoped services https://graphql-dotnet.github.io/docs/getting-started/dependency-injection/#scoped-services-with-a-singleton-schema-lifetime
                // and make sure it is thread safe https://graphql-dotnet.github.io/docs/getting-started/dependency-injection/#thread-safety-with-scoped-services
                using var scope = context.RequestServices.CreateScope();
                var builder     = scope.ServiceProvider.GetNamedService <IPageDataBuilder>(template.Id);
                if (builder == null)
                {
                    return(null);
                }
                var globalModel = context.GetArgument <GlobalModel>("global");
                routeInfoService.Setup(globalModel, context.Source.SystemId);
                var buildMethod = builder.GetType().GetMethod(nameof(IPageDataBuilder <IViewModel> .BuildAsync));
                var value       = await(dynamic) buildMethod.Invoke(builder,
                                                                    new object[] { scope, new Web.Models.Websites.PageModel(page, page.Fields) });
                // ((IDictionary<string, object>)value).Remove("blocks");
                var jsonSerializerSettings = ApplicationConverter.JsonSerializerSettings();
                return(JsonConvert.SerializeObject(value, jsonSerializerSettings));
            });
        }
 public ValidateBookAuthor(PageService pageService, FieldTemplateService fieldTemplateService)
 {
     _pageService          = pageService;
     _fieldTemplateService = fieldTemplateService;
 }
Beispiel #25
0
 public FieldDemoDemoService(FieldDefinitionService fieldDefinitionService, FieldTemplateService fieldTemplateService)
 {
     _fieldDefinitionService = fieldDefinitionService;
     _fieldTemplateService = fieldTemplateService;
 }
 public DraftPageRuleNumber(FieldTemplateService fieldTemplateService)
 {
     _fieldTemplateService = fieldTemplateService;
 }
 public SlideshowResolver(FieldTemplateService fieldTemplateService)
 {
     _fieldTemplateService = fieldTemplateService;
 }