23 references to TagProviderAttribute
Microsoft.Extensions.Telemetry.Abstractions.Tests (6)
Logging\TagProviderAttributeTests.cs (6)
16
var attr = new
TagProviderAttribute
(typeof(DateTime), ProviderMethod);
26
Assert.Throws<ArgumentNullException>(() => new
TagProviderAttribute
(null!, "test"));
27
Assert.Throws<ArgumentNullException>(() => new
TagProviderAttribute
(typeof(object), null!));
33
Assert.Throws<ArgumentException>(() => new
TagProviderAttribute
(typeof(object), string.Empty));
34
Assert.Throws<ArgumentException>(() => new
TagProviderAttribute
(typeof(object), new string(' ', 3)));
42
var attr = new
TagProviderAttribute
(typeof(DateTime), ProviderMethod);
Microsoft.Gen.Logging.Generated.Tests (17)
test\Generators\Microsoft.Gen.Logging\TestClasses\LogPropertiesOmitParameterNameExtensions.cs (2)
23
[
TagProvider
(typeof(MyPropsProvider), nameof(MyPropsProvider.ProvideProperties), OmitReferenceName = true)] MyProps p);
35
[
TagProvider
(typeof(MyPropsProvider), nameof(MyPropsProvider.ProvideProperties), OmitReferenceName = true)] MyProps p);
test\Generators\Microsoft.Gen.Logging\TestClasses\NonStaticTestClass.cs (2)
37
[
TagProvider
(typeof(CustomProvider), nameof(CustomProvider.ProvideTags))] ClassToLog p1);
48
[
TagProvider
(typeof(CustomProvider), nameof(CustomProvider.ProvideTags))] ClassToLog p1);
test\Generators\Microsoft.Gen.Logging\TestClasses\TagProviderExtensions.cs (10)
17
[
TagProvider
(typeof(CustomProvider), nameof(CustomProvider.ProvideTags))] ClassToLog param);
22
[
TagProvider
(typeof(CustomProvider), nameof(CustomProvider.ProvideForStruct))] StructToLog param);
27
[
TagProvider
(typeof(CustomProvider), nameof(CustomProvider.ProvideForInterface))] IInterfaceToLog param);
33
[
TagProvider
(typeof(CustomProvider), nameof(CustomProvider.ProvideTags))] ClassToLog param,
34
[
TagProvider
(typeof(CustomProvider), nameof(CustomProvider.ProvideOtherTags))] ClassToLog param2);
40
[
TagProvider
(typeof(CustomProvider), nameof(CustomProvider.ProvideTags))] ClassToLog param2);
46
[
TagProvider
(typeof(CustomProvider), nameof(CustomProvider.ProvideTags))] ClassToLog param);
52
[
TagProvider
(typeof(CustomProvider), nameof(CustomProvider.ProvideTags))] int? param);
58
[
TagProvider
(typeof(CustomProvider), nameof(CustomProvider.ProvideForEnumerable))] IEnumerable<string> things);
123
[
TagProvider
(typeof(CustomProvider), nameof(CustomProvider.ProvideTags))]
test\Generators\Microsoft.Gen.Logging\TestClasses\TagProviderWithObjectExtensions.cs (3)
15
[
TagProvider
(typeof(CustomProviderWithObject), nameof(CustomProviderWithObject.ProvideProperties))] object param);
21
[
TagProvider
(typeof(CustomProviderWithObject), nameof(CustomProviderWithObject.ProvideProperties))] object param,
22
[
TagProvider
(typeof(CustomProviderWithObject), nameof(CustomProviderWithObject.ProvideOtherProperties))] object param2);