public CreateContentDatabase(ExposureContentDbContext dbContextProvider, IUtcDateTimeProvider dateTimeProvider, IContentSigner signer, IJsonSerializer jsonSerializer)
 {
     _DbContextProvider = dbContextProvider;
     _DateTimeProvider  = dateTimeProvider;
     _Formatter         = new StandardContentEntityFormatter(new ZippedSignedContentFormatter(signer), new StandardPublishingIdFormatter());
     _JsonSerializer    = jsonSerializer;
 }
Example #2
0
        public CreateContentDatabase(IConfiguration configuration, IUtcDateTimeProvider dateTimeProvider, IContentSigner signer)
        {
            var config  = new StandardEfDbConfig(configuration, "Content");
            var builder = new SqlServerDbContextOptionsBuilder(config);

            _DbContextProvider = new ExposureContentDbContext(builder.Build());
            _DateTimeProvider  = dateTimeProvider;
            _Formatter         = new StandardContentEntityFormatter(new ZippedSignedContentFormatter(signer), new StandardPublishingIdFormatter());
        }
        public async Task <ManifestEntity?> Execute(string _)
        {
            var e = new ManifestEntity
            {
                Release = _DateTimeProvider.Now(),
            };
            var content   = _ManifestBuilder.Execute();
            var formatter = new StandardContentEntityFormatter(new ZippedSignedContentFormatter(_Signer), new StandardPublishingIdFormatter(_Signer));
            await formatter.Fill(e, content);

            return(e);
        }