/// <summary> /// Creates a <see cref="FlexiIncludeBlockFactory"/>. /// </summary> /// <param name="contextObjectsService">The service for storing <see cref="FlexiIncludeBlock"/> trees.</param> /// <param name="directoryService">The service for validating cache directories.</param> /// <param name="optionsService">The service for creating <see cref="IFlexiIncludeBlockOptions"/> and <see cref="IFlexiIncludeBlocksExtensionOptions"/>.</param> /// <param name="contentRetrieverService">The service that handles content retrieval.</param> /// <param name="leadingWhitespaceEditorService">The service for editing of leading whitespace.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="contextObjectsService"/> is <c>null</c>.</exception> /// <exception cref="ArgumentNullException">Thrown if <paramref name="directoryService"/> is <c>null</c>.</exception> /// <exception cref="ArgumentNullException">Thrown if <paramref name="optionsService"/> is <c>null</c>.</exception> /// <exception cref="ArgumentNullException">Thrown if <paramref name="contentRetrieverService"/> is <c>null</c>.</exception> /// <exception cref="ArgumentNullException">Thrown if <paramref name="leadingWhitespaceEditorService"/> is <c>null</c>.</exception> public FlexiIncludeBlockFactory(IContextObjectsService contextObjectsService, IDirectoryService directoryService, IOptionsService <IFlexiIncludeBlockOptions, IFlexiIncludeBlocksExtensionOptions> optionsService, IContentRetrieverService contentRetrieverService, ILeadingWhitespaceEditorService leadingWhitespaceEditorService) { _contextObjectsService = contextObjectsService ?? throw new ArgumentNullException(nameof(contextObjectsService)); _directoryService = directoryService ?? throw new ArgumentNullException(nameof(directoryService)); _optionsService = optionsService ?? throw new ArgumentNullException(nameof(optionsService)); _contentRetrieverService = contentRetrieverService ?? throw new ArgumentNullException(nameof(contentRetrieverService)); _leadingWhitespaceEditorService = leadingWhitespaceEditorService ?? throw new ArgumentNullException(nameof(leadingWhitespaceEditorService)); }
/// <summary> /// Creates an <see cref="ExtensionOptionsFactory{TExtensionOptions, TDefaultExtensionOptions, TBlockOptions}"/>. /// </summary> /// <param name="contextObjectService">The service used to try retrieve an <see cref="IExtensionOptions{T}"/> from a <see cref="BlockProcessor"/>.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="contextObjectService"/> is <c>null</c>.</exception> public ExtensionOptionsFactory(IContextObjectsService contextObjectService) { _contextObjectsService = contextObjectService ?? throw new ArgumentNullException(nameof(contextObjectService)); }
private ExtensionOptionsFactory <IDummyExtensionOptions, DummyExtensionOptions, IDummyBlockOptions> CreateExtensionOptionsFactory(IContextObjectsService contextObjectsService = null) { return(new ExtensionOptionsFactory <IDummyExtensionOptions, DummyExtensionOptions, IDummyBlockOptions>(contextObjectsService ?? _mockRepository.Create <IContextObjectsService>().Object)); }
public DummyParser(IContextObjectsService contextObjectsService, Verifier verifier) { _contextObjectsService = contextObjectsService; _verifier = verifier; }