Ejemplo n.º 1
0
        /// <summary>
        /// Constructor fed from DI
        /// </summary>
        /// <param name="db"></param>
        /// <param name="clusterOptions"></param>
        /// <param name="logger"></param>
        public OrleansEFMembershipTable(
            OrleansEFContext db,
            IOptions <ClusterOptions> clusterOptions,
            ILogger <OrleansEFMembershipTable> logger
            )
        {
            if (db == null)
            {
                throw new ArgumentNullException(nameof(db));
            }

            if (clusterOptions == null)
            {
                throw new ArgumentNullException(nameof(clusterOptions));
            }

            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }

            _db             = db;
            _clusterOptions = clusterOptions.Value;
            _logger         = logger;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="db"></param>
        /// <param name="clusterOptions"></param>
        /// <param name="logger"></param>
        public OrleansEFGatewayListProvider(
            OrleansEFContext db,
            IOptions <ClusterOptions> clusterOptions,
            IOptions <GatewayOptions> gatewayOptions,
            ILogger <OrleansEFGatewayListProvider> logger
            )
        {
            _db             = db;
            _clusterOptions = clusterOptions.Value;
            _logger         = logger;

            MaxStaleness = gatewayOptions.Value.GatewayListRefreshPeriod;
        }
        public OrleansEFReminderGrain(
            IOptions <ClusterOptions> clusterOptions,
            IGrainReferenceConverter grainReferenceConverter,
            OrleansEFContext db
            )
        {
            _clusterOptions = clusterOptions ??
                              throw new ArgumentNullException(nameof(clusterOptions));

            _grainReferenceConverter = grainReferenceConverter ??
                                       throw new ArgumentNullException(nameof(grainReferenceConverter));

            _db = db ??
                  throw new ArgumentNullException(nameof(db));
        }
        public OrleansEFStorageGrain(
            ILogger <OrleansEFStorageGrain> logger,
            OrleansEFContext db,
            SerializationManager serializationManager
            )
        {
            _db = db ??
                  throw new ArgumentNullException(nameof(db));

            _serializationManager = serializationManager ??
                                    throw new ArgumentNullException(nameof(serializationManager));

            _logger = logger ??
                      throw new ArgumentNullException(nameof(logger));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Constructor fed from DI
        /// </summary>
        /// <param name="db"></param>
        /// <param name="clusterOptions"></param>
        /// <param name="logger"></param>
        public OrleansEFMembershipTable(
            IOptions <ClusterOptions> clusterOptions,
            ILogger <OrleansEFMembershipTable> logger,
            IServiceProvider services,
            OrleansEFContext orleansEfContext
            )
        {
            _clusterOptions = clusterOptions?.Value ??
                              throw new ArgumentNullException(nameof(clusterOptions));

            _logger = logger ??
                      throw new ArgumentNullException(nameof(logger));

            _services = services ??
                        throw new ArgumentNullException(nameof(services));

            _orleansEfContext = orleansEfContext ??
                                throw new ArgumentNullException(nameof(orleansEfContext));
        }
 public OrleansEFReminderTable(OrleansEFContext db, IOptions <ClusterOptions> clusterOptions)
 {
     _db             = db;
     _clusterOptions = clusterOptions.Value;
 }