Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DynamoDBReminderTable"/> class.
 /// </summary>
 /// <param name="grainReferenceConverter">The grain factory.</param>
 /// <param name="loggerFactory">logger factory to use</param>
 public DynamoDBReminderTable(IGrainReferenceConverter grainReferenceConverter, ILoggerFactory loggerFactory, IOptions <SiloOptions> siloOptions, IOptions <DynamoDBReminderTableOptions> storageOptions)
 {
     this.grainReferenceConverter = grainReferenceConverter;
     this.logger         = loggerFactory.CreateLogger <DynamoDBReminderTable>();
     this.loggerFactory  = loggerFactory;
     this.serviceId      = siloOptions.Value.ServiceId;
     this.storageOptions = storageOptions.Value;
 }
        protected override IReminderTable CreateRemindersTable()
        {
            if (!AWSTestConstants.IsDynamoDbAvailable)
            {
                throw new SkipException("Unable to connect to AWS DynamoDB simulator");
            }

            var options = new DynamoDBReminderTableOptions
            {
                ConnectionString = this.connectionStringFixture.ConnectionString
            };

            return(new DynamoDBReminderTable(
                       this.ClusterFixture.Services.GetRequiredService <IGrainReferenceConverter>(),
                       this.loggerFactory,
                       this.siloOptions,
                       Options.Create(options)));
        }