-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTextkernelParserExtension.cs
More file actions
22 lines (21 loc) · 1.06 KB
/
TextkernelParserExtension.cs
File metadata and controls
22 lines (21 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
namespace Microsoft.Extensions.DependencyInjection
{
using Evolution.Textkernel;
using Microsoft.Extensions.Logging;
public static class TextkernelParserExtension
{
/// <summary>Add Textkernel as a CV parsing service.</summary>
/// <param name="services">The services to extend.</param>
/// <param name="address">The Textkernel service endpoint address.</param>
/// <param name="account">The Textkernel account name.</param>
/// <param name="username">The Textkernel user.</param>
/// <param name="password">The password for the Textkernel user.</param>
/// <returns>The extended service.</returns>
public static IServiceCollection AddTextkernelParser(this IServiceCollection services, string address, string account, string username, string password)
{
// Add Companies House API service
return services.AddSingleton<ITextkernelParser>(
sp => new TextkernelParser(sp.GetService<ILoggerFactory>(), address, account, username, password));
}
}
}