BotSharp/src/Infrastructure/BotSharp.Core/Conversations/SessionService.cs

37 lines
890 B
C#
Raw Normal View History

2023-06-03 02:07:30 +00:00
using BotSharp.Abstraction.Conversations;
using BotSharp.Abstraction.Conversations.Models;
2023-06-03 14:57:08 +00:00
using BotSharp.Core.Repository;
using Microsoft.Extensions.DependencyInjection;
2023-06-03 02:07:30 +00:00
namespace BotSharp.Core.Conversations;
public class SessionService : ISessionService
{
2023-06-03 14:57:08 +00:00
private readonly IServiceProvider _services;
2023-06-03 02:07:30 +00:00
2023-06-03 14:57:08 +00:00
public SessionService(IServiceProvider services)
2023-06-03 02:07:30 +00:00
{
2023-06-03 14:57:08 +00:00
_services = services;
2023-06-03 02:07:30 +00:00
}
public void DeleteSession(string sessionId)
{
throw new NotImplementedException();
}
public List<string> GetAllSessions(string userId)
{
throw new NotImplementedException();
}
public SessionModel NewSession(string userId)
{
2023-06-03 14:57:08 +00:00
var mongo = _services.CreateScope().ServiceProvider.GetRequiredService<MongoDbContext>();
2023-06-03 02:07:30 +00:00
return new SessionModel
{
SessionId = Guid.NewGuid().ToString()
};
}
}