public static BeatPulseContext AddDocumentDb(this BeatPulseContext context, Action <DocumentDbOptions> options) { var documentDbOptions = new DocumentDbOptions(); options(documentDbOptions); context.Add(new DocumentDbLiveness(documentDbOptions)); return(context); }
public static BeatPulseContext AddDocumentDb(this BeatPulseContext context, Action <DocumentDbOptions> options, string defaultPath = "documentdb") { var documentDbOptions = new DocumentDbOptions(); options(documentDbOptions); context.AddLiveness(new DocumentDbLiveness(documentDbOptions, defaultPath)); return(context); }
public DocumentDbLiveness(DocumentDbOptions documentDbOptions) { _documentDbOptions.UriEndpoint = documentDbOptions.UriEndpoint ?? throw new ArgumentNullException(nameof(documentDbOptions.UriEndpoint)); _documentDbOptions.PrimaryKey = documentDbOptions.PrimaryKey ?? throw new ArgumentNullException(nameof(documentDbOptions.PrimaryKey)); }
public DocumentDbLiveness(DocumentDbOptions documentDbOptions, ILogger <DocumentDbLiveness> logger = null) { _documentDbOptions.UriEndpoint = documentDbOptions.UriEndpoint ?? throw new ArgumentNullException(nameof(documentDbOptions.UriEndpoint)); _documentDbOptions.PrimaryKey = documentDbOptions.PrimaryKey ?? throw new ArgumentNullException(nameof(documentDbOptions.PrimaryKey)); _logger = logger; }
public DocumentDbLiveness(DocumentDbOptions documentDbOptions, string defaultPath) { _documentDbOptions.UriEndpoint = documentDbOptions.UriEndpoint ?? throw new ArgumentNullException(nameof(documentDbOptions.UriEndpoint)); _documentDbOptions.PrimaryKey = documentDbOptions.PrimaryKey ?? throw new ArgumentNullException(nameof(documentDbOptions.PrimaryKey)); Path = defaultPath ?? throw new ArgumentNullException(nameof(defaultPath)); }