Exemplo n.º 1
0
        public void can_build_custom_instance()
        {
            var counter = _builder.Build(() => new CustomCounter());

            counter.Should().NotBeNull();
            counter.Should().BeOfType <CustomCounter>();
        }
Exemplo n.º 2
0
        public void Can_build_custom_instance()
        {
            // Arrange
            CustomCounter Builder() => new CustomCounter();

            // Act
            var counter = _builder.Build(Builder);

            // Assert
            counter.Should().NotBeNull();
            counter.Should().BeOfType <CustomCounter>();
        }
Exemplo n.º 3
0
 public void ResolveCounterFromRegistry()
 {
     // ReSharper disable UnusedVariable
     var metric = _registry.Counter(
         // ReSharper restore UnusedVariable
         CounterOptions,
         () => CounterBuilder.Build());
 }
Exemplo n.º 4
0
 public void ResolveCounterFromRegistry()
 {
     _registry.Counter(
         CounterOptions,
         () => CounterBuilder.Build());
 }
 /// <inheritdoc />
 public void Decrement(CounterOptions options, long amount)
 {
     _registry.Counter(options, () => _counterBuilder.Build()).Decrement(amount);
 }
Exemplo n.º 6
0
 /// <inheritdoc />
 public ICounter Instance(CounterOptions options)
 {
     return(Instance(options, () => _counterBuilder.Build()));
 }
Exemplo n.º 7
0
 /// <inheritdoc />
 public void Decrement(CounterOptions options, MetricTags tags)
 {
     _registry.Counter(options, tags, () => _counterBuilder.Build()).Decrement();
 }