Confluence
This commit is contained in:
23
LazyBear.MCP/Services/Confluence/ConfluenceClientProvider.cs
Normal file
23
LazyBear.MCP/Services/Confluence/ConfluenceClientProvider.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using RestSharp;
|
||||
|
||||
namespace LazyBear.MCP.Services.Confluence;
|
||||
|
||||
public sealed class ConfluenceClientProvider
|
||||
{
|
||||
public RestClient? Client { get; }
|
||||
|
||||
public string? InitializationError { get; }
|
||||
|
||||
public ConfluenceClientProvider(IConfiguration configuration)
|
||||
{
|
||||
try
|
||||
{
|
||||
Client = ConfluenceClientFactory.CreateClient(configuration);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
InitializationError = $"{ex.GetType().Name}: {ex.Message}";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user