예제 #1
0
        protected override void Dispose(bool isDisposing)
        {
            ActivityEnricher = null;

            base.Dispose(isDisposing);
        }
예제 #2
0
 /// <summary>
 /// Registers an <see cref="ActivityEnricher{TState}"/> that will be called to enrich the next <see cref="Activity"/> processed under the current scope if it has been sampled.
 /// </summary>
 /// <typeparam name="TState">State type.</typeparam>
 /// <param name="activityEnricher"><see cref="ActivityEnricher{TState}"/> to be called.</param>
 /// <param name="state">The state to pass to the <see cref="ActivityEnricher{TState}"/>.</param>
 /// <returns><see cref="IDisposable"/> to cancel the enrichment scope.</returns>
 public static IDisposable Begin <TState>(ActivityEnricher <TState> activityEnricher, TState state)
 => new GenericActivityEnrichmentScope <TState>(activityEnricher, state);
예제 #3
0
 public GenericActivityEnrichmentScope(ActivityEnricher <TState> activityEnricher, TState state)
 {
     ActivityEnricher = activityEnricher ?? throw new ArgumentNullException(nameof(activityEnricher));
     _State           = state;
 }
예제 #4
0
        public void Given_When_Then()
        {
            var class1 = new ActivityEnricher();

            Assert.NotNull(class1);
        }