Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MasterDataService"/> class.
 /// </summary>
 /// <param name="odataService">The odataService<see cref="IOdataService"/></param>
 /// <param name="executeDynamicsServiceCall">The executeDynamicsServiceCall<see cref="IExecuteDynamicsServiceCall"/></param>
 /// <param name="logger">The logger<see cref="ILogger{MasterDataService}"/></param>
 /// <param name="optionSetDataService">The optionSetDataService<see cref="IOptionSetDataService"/></param>
 public MasterDataService(IOdataService odataService, IExecuteDynamicsServiceCall executeDynamicsServiceCall, ILogger <MasterDataService> logger, IOptionSetDataService optionSetDataService)
 {
     this.client = odataService.GetDynamicsCEClient();
     this.executeDynamicsServiceCall = executeDynamicsServiceCall;
     this.logger = logger;
     this.optionSetDataService = optionSetDataService;
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ExecuteDynamicsServiceCall"/> class.
 /// </summary>
 /// <param name="logger">The logger<see cref="ILogger{ExecuteDynamicsServiceCall}"/></param>
 /// <param name="odataService">The odataService<see cref="IOdataService"/></param>
 public ExecuteDynamicsServiceCall(ILogger <ExecuteDynamicsServiceCall> logger, IOdataService odataService)
 {
     this.logger                          = logger;
     this.odataService                    = odataService;
     circuitBreakerStateCollection        = new ConcurrentDictionary <string, CircuitBreakerState>();
     defaultCircuitBreakerStateCollection = new CircuitBreakerState
     {
         ExceptionsCounter      = 0,
         ODataExceptionsCounter = 0,
         IsClosed = true,
         LastExceptionOccuredTime            = DateTime.MinValue.Ticks,
         TimespanDifferenceBetweenExceptions = CircuitBreakerPatternConstants.InitialTimespanDifference
     };
 }