SeemGen/Services/ScopedContentService.cs

58 lines
1.8 KiB
C#

using BLAIzor.Data;
using BLAIzor.Models;
using Google.Cloud.Speech.V1;
using Microsoft.EntityFrameworkCore;
namespace BLAIzor.Services
{
public class ScopedContentService
{
//private readonly ApplicationDbContext _context;
private readonly IServiceScopeFactory _serviceScopeFactory;
public ScopedContentService(ApplicationDbContext context, IServiceScopeFactory serviceScopeFactory)
{
//_context = context;
SessionId = Guid.NewGuid().ToString();
_serviceScopeFactory = serviceScopeFactory;
}
public string CurrentDOM { get; set; }
public string currentLocale { get; set; }
public string SelectedDocument { get; set; } = "Poppixel.docx";
private string _selectedBrandName;
public string SelectedBrandName
{
get => _selectedBrandName;
set
{
if (_selectedBrandName != value)
{
_selectedBrandName = value;
OnBrandNameChanged?.Invoke();
}
}
}
public event Action OnBrandNameChanged;
public int SelectedSiteId { get; set; } = 1;
public WebsiteContentModel WebsiteContentModel { get; set; }
public List<HtmlSnippet> AvailableTemplateSnippets { get; set; }
//public List<WebPageContent> AvailableSiteContent { get; set; }
//public string SelectedDocument { get; set; } = "Poppixel.docx";
//public string SelectedBrandName
//{
// get { return SelectedDocument.Split('.')[0]; }
// set { }
//}
public string? WebsiteDefaultLanguage { get; set; }
public string SelectedLanguage { get; set; } = "English";
public string SessionId { get; }
}
}