예제 #1
0
 public GraphQLAwareRenderingContentsResolver(
     IConfigurationResolver configurationResolver,
     IGraphQLEndpointManager graphQLEndpointManager,
     IDocumentWriter documentWriter,
     BaseLog log,
     IAsyncHelpers asyncHelpers)
 {
     Sitecore.Diagnostics.Assert.ArgumentNotNull((object)configurationResolver, nameof(configurationResolver));
     Sitecore.Diagnostics.Assert.ArgumentNotNull((object)graphQLEndpointManager, nameof(graphQLEndpointManager));
     Sitecore.Diagnostics.Assert.ArgumentNotNull((object)documentWriter, nameof(documentWriter));
     Sitecore.Diagnostics.Assert.ArgumentNotNull((object)log, nameof(log));
     Sitecore.Diagnostics.Assert.ArgumentNotNull((object)asyncHelpers, nameof(asyncHelpers));
     this._configurationResolver = configurationResolver;
     this._documentWriter        = documentWriter;
     this._log              = log;
     this._asyncHelpers     = asyncHelpers;
     this._graphQLEndpoints = graphQLEndpointManager.GetEndpoints().ToDictionary <IGraphQLEndpoint, string, IGraphQLEndpoint>((Func <IGraphQLEndpoint, string>)(endpoint => endpoint.Url), (Func <IGraphQLEndpoint, IGraphQLEndpoint>)(endpoint => endpoint), (IEqualityComparer <string>)StringComparer.OrdinalIgnoreCase);
 }
예제 #2
0
        public AddNavBarContent(IConfigurationResolver configurationResolver, IGraphQLEndpointManager graphQLEndpointManager, IPlaceholderRenderingService placeholderService, IConfiguration layoutServiceConfiguration, BaseLog log, IAsyncHelpers asyncHelpers)
        {
            Assert.ArgumentNotNull(asyncHelpers, nameof(asyncHelpers));

            _configurationResolver      = configurationResolver;
            _placeholderService         = placeholderService;
            _layoutServiceConfiguration = layoutServiceConfiguration;
            _log          = log;
            _asyncHelpers = asyncHelpers;

            _graphQLEndpoints = graphQLEndpointManager
                                .GetEndpoints()
                                .ToDictionary(
                endpoint => endpoint.Url,
                endpoint => endpoint,
                StringComparer.OrdinalIgnoreCase
                );
        }