示例#1
0
        public static BeatPulseContext AddDocumentDb(this BeatPulseContext context, Action <DocumentDbOptions> options)
        {
            var documentDbOptions = new DocumentDbOptions();

            options(documentDbOptions);
            context.Add(new DocumentDbLiveness(documentDbOptions));
            return(context);
        }
示例#2
0
        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);
        }
示例#3
0
 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;
 }
示例#5
0
 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));
 }