/// <inheritdoc />
 public override async Task ProcessHttpRequestAsync(HttpRequestMessage request, CancellationToken cancellationToken)
 {
     InternalContract.RequireNotNull(request, nameof(request));
     request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", _token.AccessToken);
     await base.ProcessHttpRequestAsync(request, cancellationToken);
 }
 public ProductFunctionality(IProductPersistance productPersistance)
 {
     InternalContract.RequireNotNull(productPersistance, nameof(productPersistance));
     _productPersistance = productPersistance;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 public ClientCredentials(AuthenticationToken token)
 {
     InternalContract.RequireNotNull(token, nameof(token));
     InternalContract.Require(token.Type == "Bearer", $"Parameter {nameof(token)} must be of type Bearer.");
     _token = token;
 }
 /// <summary>
 /// The constructor
 /// </summary>
 /// <param name="options">How to connect to the database.</param>
 public Database(IDatabaseOptions options) : this(options?.ConnectionString)
 {
     InternalContract.RequireNotNull(options, nameof(options));
     Options = options;
 }
 /// <inheritdoc />
 public void SetValue <T>(string name, T data)
 {
     InternalContract.RequireNotNullOrWhitespace(name, nameof(name));
     InternalContract.RequireNotNull(data, nameof(data));
     Dictionary[name] = data;
 }
Beispiel #6
0
 internal AzureBlockBlob(CloudBlockBlob blockBlob)
 {
     InternalContract.RequireNotNull(blockBlob, nameof(blockBlob));
     CloudBlockBlob = blockBlob;
 }
Beispiel #7
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="correlationIdValueProvider">A provider that knows how to save correlations id on the execution context.</param>
 public SaveCorrelationId(ICorrelationIdValueProvider correlationIdValueProvider)
 {
     InternalContract.RequireNotNull(correlationIdValueProvider, nameof(correlationIdValueProvider));
     _correlationIdValueProvider = correlationIdValueProvider;
 }