public PatchConferenceRequestHandler(IConferenceRepo conferenceRepo, IMediator mediator, IOptions <ConcurrencyOptions> options, ILogger <PatchConferenceRequestHandler> logger) { _conferenceRepo = conferenceRepo; _mediator = mediator; _options = options.Value; _logger = logger; }
private void InitializeFakeObjects() { _storageStub = new Mock <IStorage>(); var options = new ConcurrencyOptions { Storage = _storageStub.Object }; _concurrencyManager = new ConcurrencyManager(options); }
public void GetMessageReceiveCount_DynamicConcurrencyEnabled_ReturnsExpectedValue() { var concurrencyOptions = new ConcurrencyOptions { DynamicConcurrencyEnabled = true }; var throttleStatus = new ConcurrencyThrottleAggregateStatus { State = ThrottleState.Disabled }; var optionsWrapper = new OptionsWrapper <ConcurrencyOptions>(concurrencyOptions); var mockConcurrencyThrottleManager = new Mock <IConcurrencyThrottleManager>(MockBehavior.Strict); mockConcurrencyThrottleManager.Setup(p => p.GetStatus()).Returns(() => throttleStatus); var concurrencyManager = new ConcurrencyManager(optionsWrapper, _loggerFactory, mockConcurrencyThrottleManager.Object); var localListener = new QueueListener(_mockQueue.Object, null, _mockTriggerExecutor.Object, _mockExceptionDispatcher.Object, _loggerFactory, null, _queuesOptions, _mockQueueProcessor.Object, new FunctionDescriptor { Id = TestFunctionId }, concurrencyManager); int result = localListener.GetMessageReceiveCount(); Assert.AreEqual(1, result); }
/// <summary> /// Initializes a new instance of the <see cref="Product"/> class, loading a /// row from the database that matches the given primary key and explicitly /// enabling or disabling the concurrency option. /// </summary> /// <param name="id">The primary key of the row that gets loaded from the database.</param> /// <param name="concurrency">A <see cref="BusinessLayer.FooEnterprises.Product.ConcurrencyOptions"/> value indicating the level of concurrency.</param> public Product(int id, ConcurrencyOptions concurrency) : base(id, concurrency) { }
/// <summary> /// Initializes a new instance of the <see cref="CustomerProduct"/> class, explicitly enabling /// or disabling the concurrency option. /// </summary> /// <param name="connectionString">Sets the connection string to use to connect to the database.</param> /// <param name="concurrency">A <see cref="BusinessLayer.FooEnterprises.CustomerProduct.ConcurrencyOptions"/> value indicating the level of concurrency.</param> public CustomerProduct(LayerGenConnectionString connectionString, ConcurrencyOptions concurrency) : base(connectionString, concurrency) { }
/// <summary> /// Initializes a new instance of the <see cref="Product"/> class, loading a /// row from the given DataRow and explicitly enabling or disabling the /// concurrency option. You can also specify if you want data access to be /// done with stored procedures or Sql text. /// </summary> /// <param name="dr">The DataRow that contains the data to be loaded into the instance.</param> /// <param name="concurrency">A <see cref="BusinessLayer.FooEnterprises.Product.ConcurrencyOptions"/> value indicating the level of concurrency.</param> /// <param name="useStoredProcedures">If true, then all data access will be done using stored procedures. Otherwise, data access will be done using Sql text.</param> protected internal Product(DataRow dr, ConcurrencyOptions concurrency, bool useStoredProcedures) : base(dr, concurrency, useStoredProcedures) { }
/// <summary> /// Initializes a new instance of the <see cref="Product"/> class, loading a /// row from the given DataRow and explicitly enabling or disabling the /// concurrency option. /// </summary> /// <param name="dr">The DataRow that contains the data to be loaded into the instance.</param> /// <param name="concurrency">A <see cref="BusinessLayer.FooEnterprises.Product.ConcurrencyOptions"/> value indicating the level of concurrency.</param> protected internal Product(DataRow dr, ConcurrencyOptions concurrency) : base(dr, concurrency) { }
/// <summary> /// Initializes a new instance of the <see cref="Product"/> class, loading a /// row from the database that matches the given primary key and loading /// only the fields specified and explicitly enabling or disabling the /// concurrency option. You can also specify if you want data access to be /// done with stored procedures or Sql text. /// </summary> /// <param name="id">The primary key of the row that gets loaded from the database.</param> /// <param name="fields">The list of <see cref="BusinessLayer.FooEnterprises.Product.Fields"/> to pull from the database.</param> /// <param name="concurrency">A <see cref="BusinessLayer.FooEnterprises.Product.ConcurrencyOptions"/> value indicating the level of concurrency.</param> /// <param name="useStoredProcedures">If true, then all data access will be done using stored procedures. Otherwise, data access will be done using Sql text.</param> public Product(int id, List <Fields> fields, ConcurrencyOptions concurrency, bool useStoredProcedures) : base(id, fields, concurrency, useStoredProcedures) { }
/// <summary> /// Initializes a new instance of the <see cref="Product"/> class, loading a /// row from the database that matches the given primary key and loading /// only the fields specified and explicitly enabling or disabling the /// concurrency option. /// </summary> /// <param name="id">The primary key of the row that gets loaded from the database.</param> /// <param name="fields">The list of <see cref="BusinessLayer.FooEnterprises.Product.Fields"/> to pull from the database.</param> /// <param name="concurrency">A <see cref="BusinessLayer.FooEnterprises.Product.ConcurrencyOptions"/> value indicating the level of concurrency.</param> public Product(int id, List <Fields> fields, ConcurrencyOptions concurrency) : base(id, fields, concurrency) { }
/// <summary> /// Initializes a new instance of the <see cref="Customer"/> class, loading a /// row from the database that matches the given primary key and explicitly /// enabling or disabling the concurrency option. You can also specify if you want data /// access to be done with stored procedures or Sql text. /// </summary> /// <param name="id">The primary key of the row that gets loaded from the database.</param> /// <param name="concurrency">A <see cref="BusinessLayer.Customer.ConcurrencyOptions"/> value indicating the level of concurrency.</param> /// <param name="useStoredProcedures">If true, then all data access will be done using stored procedures. Otherwise, data access will be done using Sql text.</param> public Customer(int id, ConcurrencyOptions concurrency, bool useStoredProcedures) : base(id, concurrency, useStoredProcedures) { }
/// <summary> /// Initializes a new instance of the <see cref="Customer"/> class, loading a /// row from the database that matches the given primary key and explicitly /// enabling or disabling the concurrency option. /// </summary> /// <param name="connectionString">Sets the connection string to use to connect to the database.</param> /// <param name="id">The primary key of the row that gets loaded from the database.</param> /// <param name="concurrency">A <see cref="BusinessLayer.Customer.ConcurrencyOptions"/> value indicating the level of concurrency.</param> public Customer(LayerGenConnectionString connectionString, int id, ConcurrencyOptions concurrency) : base(connectionString, id, concurrency) { }
/// <summary> /// Initializes a new instance of the <see cref="Customer"/> class, loading a /// row from the database that matches the given primary key and explicitly /// enabling or disabling the concurrency option. /// </summary> /// <param name="id">The primary key of the row that gets loaded from the database.</param> /// <param name="concurrency">A <see cref="BusinessLayer.Customer.ConcurrencyOptions"/> value indicating the level of concurrency.</param> public Customer(int id, ConcurrencyOptions concurrency) : base(id, concurrency) { }
/// <summary> /// Initializes a new instance of the <see cref="Customer"/> class, explicitly enabling /// or disabling the concurrency option. /// </summary> /// <param name="concurrency">A <see cref="BusinessLayer.Customer.ConcurrencyOptions"/> value indicating the level of concurrency.</param> public Customer(ConcurrencyOptions concurrency) : base(concurrency) { }
/// <summary> /// Initializes a new instance of the <see cref="CustomerProduct"/> class, explicitly enabling /// or disabling the concurrency option. You can also specify if you want data access /// to be done with stored procedures or Sql text. /// </summary> /// <param name="concurrency">A <see cref="BusinessLayer.FooEnterprises.CustomerProduct.ConcurrencyOptions"/> value indicating the level of concurrency.</param> /// <param name="useStoredProcedures">If true, then all data access will be done using stored procedures. Otherwise, data access will be done using Sql text.</param> public CustomerProduct(ConcurrencyOptions concurrency, bool useStoredProcedures) : base(concurrency, useStoredProcedures) { }
/// <summary> /// Initializes a new instance of the <see cref="Product"/> class, loading a /// row from the database that matches the given primary key and explicitly /// enabling or disabling the concurrency option. /// </summary> /// <param name="connectionString">Sets the connection string to use to connect to the database.</param> /// <param name="id">The primary key of the row that gets loaded from the database.</param> /// <param name="concurrency">A <see cref="BusinessLayer.FooEnterprises.Product.ConcurrencyOptions"/> value indicating the level of concurrency.</param> public Product(LayerGenConnectionString connectionString, int id, ConcurrencyOptions concurrency) : base(connectionString, id, concurrency) { }
/// <summary> /// Initializes a new instance of the <see cref="Product"/> class, loading a /// row from the database that matches the given primary key and explicitly /// enabling or disabling the concurrency option. You can also specify if you want data /// access to be done with stored procedures or Sql text. /// </summary> /// <param name="id">The primary key of the row that gets loaded from the database.</param> /// <param name="concurrency">A <see cref="BusinessLayer.FooEnterprises.Product.ConcurrencyOptions"/> value indicating the level of concurrency.</param> /// <param name="useStoredProcedures">If true, then all data access will be done using stored procedures. Otherwise, data access will be done using Sql text.</param> public Product(int id, ConcurrencyOptions concurrency, bool useStoredProcedures) : base(id, concurrency, useStoredProcedures) { }
/// <summary> /// Initializes a new instance of the <see cref="Customer"/> class, loading a /// row from the database that matches the given primary key and explicitly /// enabling or disabling the concurrency option. You can also specify if you want data /// access to be done with stored procedures or Sql text. /// </summary> /// <param name="connectionString">Sets the connection string to use to connect to the database.</param> /// <param name="id">The primary key of the row that gets loaded from the database.</param> /// <param name="concurrency">A <see cref="BusinessLayer.Customer.ConcurrencyOptions"/> value indicating the level of concurrency.</param> /// <param name="useStoredProcedures">If true, then all data access will be done using stored procedures. Otherwise, data access will be done using Sql text.</param> public Customer(LayerGenConnectionString connectionString, int id, ConcurrencyOptions concurrency, bool useStoredProcedures) : base(connectionString, id, concurrency, useStoredProcedures) { }
/// <summary> /// Initializes a new instance of the <see cref="Product"/> class, loading a /// row from the database that matches the given primary key and loading /// only the fields specified and explicitly enabling or disabling the /// concurrency option. /// </summary> /// <param name="connectionString">Sets the connection string to use to connect to the database.</param> /// <param name="id">The primary key of the row that gets loaded from the database.</param> /// <param name="fields">The list of <see cref="BusinessLayer.FooEnterprises.Product.Fields"/> to pull from the database.</param> /// <param name="concurrency">A <see cref="BusinessLayer.FooEnterprises.Product.ConcurrencyOptions"/> value indicating the level of concurrency.</param> public Product(LayerGenConnectionString connectionString, int id, List <Fields> fields, ConcurrencyOptions concurrency) : base(connectionString, id, fields, concurrency) { }
/// <summary> /// Initializes a new instance of the <see cref="Customer"/> class, loading a /// row from the database that matches the given primary key and loading /// only the fields specified and explicitly enabling or disabling the /// concurrency option. /// </summary> /// <param name="id">The primary key of the row that gets loaded from the database.</param> /// <param name="fields">The list of <see cref="BusinessLayer.Customer.Fields"/> to pull from the database.</param> /// <param name="concurrency">A <see cref="BusinessLayer.Customer.ConcurrencyOptions"/> value indicating the level of concurrency.</param> public Customer(int id, List <Fields> fields, ConcurrencyOptions concurrency) : base(id, fields, concurrency) { }
/// <summary> /// Initializes a new instance of the <see cref="Product"/> class, loading a /// row from the database that matches the given primary key and loading /// only the fields specified and explicitly enabling or disabling the /// concurrency option. You can also specify if you want data access to be /// done with stored procedures or Sql text. /// </summary> /// <param name="connectionString">Sets the connection string to use to connect to the database.</param> /// <param name="id">The primary key of the row that gets loaded from the database.</param> /// <param name="fields">The list of <see cref="BusinessLayer.FooEnterprises.Product.Fields"/> to pull from the database.</param> /// <param name="concurrency">A <see cref="BusinessLayer.FooEnterprises.Product.ConcurrencyOptions"/> value indicating the level of concurrency.</param> /// <param name="useStoredProcedures">If true, then all data access will be done using stored procedures. Otherwise, data access will be done using Sql text.</param> public Product(LayerGenConnectionString connectionString, int id, List <Fields> fields, ConcurrencyOptions concurrency, bool useStoredProcedures) : base(connectionString, id, fields, concurrency, useStoredProcedures) { }
/// <summary> /// Initializes a new instance of the <see cref="Customer"/> class, loading a /// row from the given DataRow and explicitly enabling or disabling the /// concurrency option. /// </summary> /// <param name="dr">The DataRow that contains the data to be loaded into the instance.</param> /// <param name="concurrency">A <see cref="BusinessLayer.Customer.ConcurrencyOptions"/> value indicating the level of concurrency.</param> protected internal Customer(DataRow dr, ConcurrencyOptions concurrency) : base(dr, concurrency) { }
/// <summary> /// Initializes a new instance of the <see cref="Product"/> class, loading a /// row from the given DataRow and explicitly enabling or disabling the /// concurrency option. /// </summary> /// <param name="connectionString">Sets the connection string to use to connect to the database.</param> /// <param name="dr">The DataRow that contains the data to be loaded into the instance.</param> /// <param name="concurrency">A <see cref="BusinessLayer.FooEnterprises.Product.ConcurrencyOptions"/> value indicating the level of concurrency.</param> protected internal Product(LayerGenConnectionString connectionString, DataRow dr, ConcurrencyOptions concurrency) : base(connectionString, dr, concurrency) { }
public BatchExecuteTargetBlock(Func <TInput[], Task> action, ConcurrencyOptions options, CancellationToken cancellationToken = default) : base(action, options, cancellationToken) { }
/// <summary> /// Initializes a new instance of the <see cref="Product"/> class, loading a /// row from the given DataRow and explicitly enabling or disabling the /// concurrency option. You can also specify if you want data access to be /// done with stored procedures or Sql text. /// </summary> /// <param name="connectionString">Sets the connection string to use to connect to the database.</param> /// <param name="dr">The DataRow that contains the data to be loaded into the instance.</param> /// <param name="concurrency">A <see cref="BusinessLayer.FooEnterprises.Product.ConcurrencyOptions"/> value indicating the level of concurrency.</param> /// <param name="useStoredProcedures">If true, then all data access will be done using stored procedures. Otherwise, data access will be done using Sql text.</param> protected internal Product(LayerGenConnectionString connectionString, DataRow dr, ConcurrencyOptions concurrency, bool useStoredProcedures) : base(connectionString, dr, concurrency, useStoredProcedures) { }
/// <summary> /// Initializes a new instance of the <see cref="Product"/> class, explicitly enabling /// or disabling the concurrency option. /// </summary> /// <param name="concurrency">A <see cref="BusinessLayer.FooEnterprises.Product.ConcurrencyOptions"/> value indicating the level of concurrency.</param> public Product(ConcurrencyOptions concurrency) : base(concurrency) { }
/// <summary> /// Initializes a new instance of the <see cref="Product"/> class, explicitly enabling /// or disabling the concurrency option. You can also specify if you want data access /// to be done with stored procedures or Sql text. /// </summary> /// <param name="connectionString">Sets the connection string to use to connect to the database.</param> /// <param name="concurrency">A <see cref="BusinessLayer.FooEnterprises.Product.ConcurrencyOptions"/> value indicating the level of concurrency.</param> /// <param name="useStoredProcedures">If true, then all data access will be done using stored procedures. Otherwise, data access will be done using Sql text.</param> public Product(LayerGenConnectionString connectionString, ConcurrencyOptions concurrency, bool useStoredProcedures) : base(connectionString, concurrency, useStoredProcedures) { }
/// <summary> /// Initializes a new instance of the <see cref="CustomerProduct"/> class, explicitly enabling /// or disabling the concurrency option. /// </summary> /// <param name="concurrency">A <see cref="BusinessLayer.FooEnterprises.CustomerProduct.ConcurrencyOptions"/> value indicating the level of concurrency.</param> public CustomerProduct(ConcurrencyOptions concurrency) : base(concurrency) { }