Class ContentSourceServiceFactory
- Assembly
- FoundationaLLM.Vectorization.Engine.dll
Manages content sources registered for use in the vectorization pipelines.
public class ContentSourceServiceFactory : IVectorizationServiceFactory<IContentSourceService>
- Inheritance
-
ContentSourceServiceFactory
- Implements
- Inherited Members
- Extension Methods
Constructors
ContentSourceServiceFactory(IEnumerable<IResourceProviderService>, IConfiguration, ILoggerFactory)
Manages content sources registered for use in the vectorization pipelines.
public ContentSourceServiceFactory(IEnumerable<IResourceProviderService> resourceProviderServices, IConfiguration configuration, ILoggerFactory loggerFactory)
Parameters
resourceProviderServices
IEnumerable<IResourceProviderService>The resource provider services registered with the dependency injection container.
configuration
IConfigurationThe global configuration provider.
loggerFactory
ILoggerFactoryThe logger factory used to create loggers.
Methods
GetService(string, UnifiedUserIdentity)
Retrieves a service instance of type T specified by name.
public Task<IContentSourceService> GetService(string serviceName, UnifiedUserIdentity userIdentity)
Parameters
serviceName
stringThe name of the service instance to create.
userIdentity
UnifiedUserIdentityThe UnifiedUserIdentity providing information about the calling user identity.
Returns
- Task<IContentSourceService>
The service instance created by name.
GetServiceWithResource(string, UnifiedUserIdentity)
Retrieves a service instance of type T specified by name and its associated resource object (if any).
public Task<(IContentSourceService Service, ResourceBase Resource)> GetServiceWithResource(string serviceName, UnifiedUserIdentity userIdentity)
Parameters
serviceName
stringThe name of the service instance to create.
userIdentity
UnifiedUserIdentityThe UnifiedUserIdentity providing information about the calling user identity.
Returns
- Task<(IContentSourceService Service, ResourceBase Resource)>
The service instance and its associated resource object (if any).