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
resourceProviderServicesIEnumerable<IResourceProviderService>The resource provider services registered with the dependency injection container.
configurationIConfigurationThe global configuration provider.
loggerFactoryILoggerFactoryThe 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
serviceNamestringThe name of the service instance to create.
userIdentityUnifiedUserIdentityThe 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
serviceNamestringThe name of the service instance to create.
userIdentityUnifiedUserIdentityThe UnifiedUserIdentity providing information about the calling user identity.
Returns
- Task<(IContentSourceService Service, ResourceBase Resource)>
The service instance and its associated resource object (if any).