Exemple #1
0
 /// <summary>
 /// Initializes an instance of the <see cref="Embedding" /> class.
 /// </summary>
 /// <param name="embeddingId">The identifier for this embedding.</param>
 /// <param name="dispatcher">The reverse call dispatcher to use to dispatch update and delete calls to the client.</param>
 /// <param name="requestFactory">The factory to use to create requests to the client.</param>
 /// <param name="logger">The logger to use for logging.</param>
 public Embedding(
     EmbeddingId embeddingId,
     ReverseCallDispatcherType dispatcher,
     IEmbeddingRequestFactory requestFactory,
     ILogger logger)
 {
     _embeddingId    = embeddingId;
     _dispatcher     = dispatcher;
     _requestFactory = requestFactory;
     _logger         = logger;
 }
 /// <summary>
 /// Initializes an instance of the <see cref="EmbeddingsService" /> class.
 /// </summary>
 /// <param name="hostApplicationLifetime"></param>
 /// <param name="executionContextCreator"></param>
 /// <param name="reverseCallServices"></param>
 /// <param name="protocol"></param>
 /// <param name="getEmbeddingProcessorFactoryFor"></param>
 /// <param name="embeddingProcessors"></param>
 /// <param name="embeddingRequestFactory"></param>
 /// <param name="embeddingDefinitionComparer"></param>
 /// <param name="embeddingDefinitionPersister"></param>
 /// <param name="logger"></param>
 public EmbeddingsService(
     IHostApplicationLifetime hostApplicationLifetime,
     ICreateExecutionContexts executionContextCreator,
     IInitiateReverseCallServices reverseCallServices,
     IEmbeddingsProtocol protocol,
     Func <TenantId, IEmbeddingProcessorFactory> getEmbeddingProcessorFactoryFor,
     IEmbeddingProcessors embeddingProcessors,
     ICompareEmbeddingDefinitionsForAllTenants embeddingDefinitionComparer,
     IPersistEmbeddingDefinitionForAllTenants embeddingDefinitionPersister,
     IEmbeddingRequestFactory embeddingRequestFactory,
     ILoggerFactory loggerFactory)
 {
     _hostApplicationLifetime = hostApplicationLifetime;
     _executionContextCreator = executionContextCreator;
     _reverseCallServices     = reverseCallServices;
     _protocol = protocol;
     _getEmbeddingProcessorFactoryFor = getEmbeddingProcessorFactoryFor;
     _embeddingProcessors             = embeddingProcessors;
     _embeddingDefinitionComparer     = embeddingDefinitionComparer;
     _embeddingDefinitionPersister    = embeddingDefinitionPersister;
     _embeddingRequestFactory         = embeddingRequestFactory;
     _loggerFactory = loggerFactory;
     _logger        = loggerFactory.CreateLogger <EmbeddingsService>();
 }