Exemple #1
0
 private FlexiSectionBlockFactory CreateFlexiSectionBlockFactory(IOptionsService <IFlexiSectionBlockOptions, IFlexiSectionBlocksExtensionOptions> optionsService = default,
                                                                 IFlexiSectionHeadingBlockFactory flexiSectionHeadingBlockFactory = default)
 {
     return(new FlexiSectionBlockFactory(optionsService ?? _mockRepository.Create <IOptionsService <IFlexiSectionBlockOptions, IFlexiSectionBlocksExtensionOptions> >().Object,
                                         flexiSectionHeadingBlockFactory ?? _mockRepository.Create <IFlexiSectionHeadingBlockFactory>().Object));
 }
Exemple #2
0
 /// <summary>
 /// Creates a <see cref="FlexiSectionBlockFactory"/>.
 /// </summary>
 /// <param name="optionsService">The service for creating <see cref="IFlexiSectionBlockOptions"/> and <see cref="IFlexiSectionBlocksExtensionOptions"/>.</param>
 /// <param name="flexiSectionHeadingBlockFactory">The factory for building <see cref="FlexiSectionHeadingBlock"/>s.</param>
 /// <exception cref="ArgumentNullException">Thrown if <paramref name="optionsService"/>is <c>null</c>.</exception>
 /// <exception cref="ArgumentNullException">Thrown if <paramref name="flexiSectionHeadingBlockFactory"/> is <c>null</c>.</exception>
 public FlexiSectionBlockFactory(IOptionsService <IFlexiSectionBlockOptions, IFlexiSectionBlocksExtensionOptions> optionsService,
                                 IFlexiSectionHeadingBlockFactory flexiSectionHeadingBlockFactory)
 {
     _optionsService = optionsService ?? throw new ArgumentNullException(nameof(optionsService));
     _flexiSectionHeadingBlockFactory = flexiSectionHeadingBlockFactory ?? throw new ArgumentNullException(nameof(flexiSectionHeadingBlockFactory));
 }