-
Notifications
You must be signed in to change notification settings - Fork 730
/
ITagCollector.cs
39 lines (35 loc) · 1.68 KB
/
ITagCollector.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using Microsoft.Extensions.Compliance.Classification;
namespace Microsoft.Extensions.Logging;
/// <summary>
/// Represents a custom tag provider and enables it to emit tags.
/// </summary>
/// <remarks>
/// See <see cref="TagProviderAttribute"/> for details on how this interface is used.
/// </remarks>
public interface ITagCollector
{
/// <summary>
/// Adds a tag.
/// </summary>
/// <param name="tagName">The name of the tag to add.</param>
/// <param name="tagValue">The value of the tag to add.</param>
/// <exception cref="ArgumentNullException"><paramref name="tagName"/> is <see langword="null"/>.</exception>
/// <exception cref="ArgumentException"><paramref name="tagName" /> is empty or contains exclusively whitespace,
/// or a tag of the same name has already been added.
/// </exception>
void Add(string tagName, object? tagValue);
/// <summary>
/// Adds a tag.
/// </summary>
/// <param name="tagName">The name of the tag to add.</param>
/// <param name="tagValue">The value of the tag to add.</param>
/// <param name="classifications">The data classifications of the tag value.</param>
/// <exception cref="ArgumentNullException"><paramref name="tagName"/> is <see langword="null"/>.</exception>
/// <exception cref="ArgumentException"><paramref name="tagName" /> is empty or contains exclusively whitespace,
/// or a tag of the same name has already been added.
/// </exception>
void Add(string tagName, object? tagValue, DataClassificationSet classifications);
}