58 instantiations of DataClassification
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (3)
Microsoft.Extensions.Compliance.Abstractions (2)
Microsoft.Extensions.Compliance.Abstractions.Tests (15)
Classification\DataClassificationTests.cs (10)
16var dc = new DataClassification(TaxonomyName, Value);
20Assert.True(dc == new DataClassification(TaxonomyName, Value));
21Assert.False(dc != new DataClassification(TaxonomyName, Value));
23Assert.True(dc != new DataClassification(TaxonomyName + "x", Value));
24Assert.False(dc == new DataClassification(TaxonomyName + "x", Value));
26Assert.True(dc != new DataClassification(TaxonomyName, Value + 1));
27Assert.False(dc == new DataClassification(TaxonomyName, Value + 1));
33Assert.NotEqual(dc.GetHashCode(), new DataClassification(TaxonomyName + "X", Value).GetHashCode());
34Assert.NotEqual(dc.GetHashCode(), new DataClassification(TaxonomyName, Value + 1).GetHashCode());
45var dc = new DataClassification(TaxonomyName, Value);
Microsoft.Extensions.Compliance.Redaction.Tests (18)
RedactorProviderTests.cs (14)
26var dc = new DataClassification("Foo", "0x2");
36private static readonly DataClassification _dataClassification1 = new("TAX", "1");
37private static readonly DataClassification _dataClassification2 = new("TAX", "2");
38private static readonly DataClassification _dataClassification3 = new("TAX", "4");
65var dc1 = new DataClassificationSet(new DataClassification("DummyTaxonomy", "Classification"));
66var dc2 = new DataClassificationSet(new DataClassification("DummyTaxonomy", "Classification2"));
67var dc3 = new DataClassificationSet(new DataClassification("DummyTaxonomy", "Classification3"));
68var dc4 = new DataClassificationSet(new DataClassification("DummyTaxonomy", "Classification4"));
69var dc5 = new DataClassificationSet(new DataClassification("DummyTaxonomy", "Classification5"));
70var dc6 = new DataClassificationSet(new DataClassification("DummyTaxonomy", "Classification6"));
71var dc7 = new DataClassificationSet(new DataClassification("DummyTaxonomy", "Classification7"));
72var dc8 = new DataClassificationSet(new DataClassification("DummyTaxonomy", "Classification8"));
74var dc9 = new DataClassification("DummyTaxonomy", "Classification9");
76var dc1LogicalCopy = new DataClassificationSet(new[] { new DataClassification("DummyTaxonomy", "Classification") });
Microsoft.Extensions.Compliance.Testing (2)
Microsoft.Extensions.Compliance.Testing.Tests (18)
RedactionFakesAcceptanceTests.cs (12)
17var dc = new DataClassification("Foo", "0x1");
37var dc = new DataClassification("TAX", "1");
56var dc = new DataClassification("Foo", "0x1");
76var dc = new DataClassification("TAX", "1");
95var dc = new DataClassification("Foo", "0x1");
115var dc = new DataClassification("TAX", "1");
135var dc = new DataClassification("TAX", "1");
155var dc = new DataClassification("TAX", "1");
175var dc = new DataClassification("TAX", "1");
207var dc = new DataClassification("TAX", "1");
229var dc = new DataClassification("TAX", "1");
248var dc = new DataClassification("TAX", "1");
264 references to DataClassification
Microsoft.AspNetCore.Diagnostics.Middleware (22)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (31)
Logging\IncomingHttpRouteUtilityTests.cs (11)
57var sensitiveParameters = routeUtility.GetSensitiveParameters(httpRoute, mockHttpRequest.Object, new Dictionary<string, DataClassification>(StringComparer.Ordinal));
95var sensitiveParameters = routeUtility.GetSensitiveParameters(httpRoute, mockHttpRequest.Object, new Dictionary<string, DataClassification>(StringComparer.Ordinal));
135var sensitiveParameters = routeUtility.GetSensitiveParameters(httpRoute, mockHttpRequest.Object, new Dictionary<string, DataClassification>(StringComparer.Ordinal));
177var d = new Dictionary<string, DataClassification>
220var d = new Dictionary<string, DataClassification>
267var sensitiveParameters = routeUtility.GetSensitiveParameters(httpRoute, mockHttpRequest.Object, new Dictionary<string, DataClassification>(StringComparer.Ordinal));
306var d = new Dictionary<string, DataClassification>
354var d = new Dictionary<string, DataClassification>
399var d = new Dictionary<string, DataClassification>();
438var d = new Dictionary<string, DataClassification>
460var d = new Dictionary<string, DataClassification>
Microsoft.Extensions.Compliance.Abstractions (26)
Microsoft.Extensions.Compliance.Abstractions.Tests (11)
Microsoft.Extensions.Compliance.Redaction (2)
Microsoft.Extensions.Compliance.Redaction.Tests (13)
Microsoft.Extensions.Compliance.Testing (2)
Microsoft.Extensions.Compliance.Testing.Tests (15)
RedactionFakesAcceptanceTests.cs (12)
17var dc = new DataClassification("Foo", "0x1");
37var dc = new DataClassification("TAX", "1");
56var dc = new DataClassification("Foo", "0x1");
76var dc = new DataClassification("TAX", "1");
95var dc = new DataClassification("Foo", "0x1");
115var dc = new DataClassification("TAX", "1");
135var dc = new DataClassification("TAX", "1");
155var dc = new DataClassification("TAX", "1");
175var dc = new DataClassification("TAX", "1");
207var dc = new DataClassification("TAX", "1");
229var dc = new DataClassification("TAX", "1");
248var dc = new DataClassification("TAX", "1");
Microsoft.Extensions.Http.Diagnostics (18)
Microsoft.Extensions.Http.Diagnostics.Tests (64)
Logging\AcceptanceTests.cs (10)
453options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test1", FakeTaxonomy.PrivateData } };
460options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test2", FakeTaxonomy.PrivateData } };
489options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test1", FakeTaxonomy.PrivateData } };
496options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test2", FakeTaxonomy.PrivateData } };
523options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test1", FakeTaxonomy.PrivateData } };
529options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test2", FakeTaxonomy.PrivateData } };
535options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test3", FakeTaxonomy.PrivateData } };
541options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test4", FakeTaxonomy.PrivateData } };
547options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test5", FakeTaxonomy.PrivateData } };
552options.ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { "test6", FakeTaxonomy.PrivateData } };
Logging\HttpClientLoggerTest.cs (21)
93mockHeadersRedactor.Setup(r => r.Redact(It.IsAny<IEnumerable<string>>(), It.IsAny<DataClassification>()))
204ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.PrivateData }, { "Header3", FakeTaxonomy.PrivateData } },
205RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.PrivateData }, { "Header3", FakeTaxonomy.PrivateData } },
216mockHeadersRedactor.Setup(r => r.Redact(It.IsAny<IEnumerable<string>>(), It.IsAny<DataClassification>()))
296ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.PrivateData } },
297RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.PrivateData } },
314.Setup(r => r.Redact(It.IsAny<IEnumerable<string>>(), It.IsAny<DataClassification>()))
403ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.PrivateData } },
404RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.PrivateData } },
419mockHeadersRedactor.Setup(r => r.Redact(It.IsAny<IEnumerable<string>>(), It.IsAny<DataClassification>()))
499ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.PrivateData } },
500RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.PrivateData } },
516.Setup(r => r.Redact(It.IsAny<IEnumerable<string>>(), It.IsAny<DataClassification>()))
613ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.PrivateData } },
614RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.PrivateData } },
627mockHeadersRedactor.Setup(r => r.Redact(It.IsAny<IEnumerable<string>>(), It.IsAny<DataClassification>()))
669mockHeadersRedactor.Setup(r => r.Redact(It.IsAny<IEnumerable<string>>(), It.IsAny<DataClassification>()))
713mockHeadersRedactor.Setup(r => r.Redact(It.IsAny<IEnumerable<string>>(), It.IsAny<DataClassification>()))
883ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { TestResponseHeader, FakeTaxonomy.PrivateData } },
884RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { TestRequestHeader, FakeTaxonomy.PrivateData } },
897mockHeadersRedactor.Setup(r => r.Redact(It.IsAny<IEnumerable<string>>(), It.IsAny<DataClassification>()))
Logging\HttpHeadersReaderTest.cs (6)
48.Returns<IEnumerable<string>, DataClassification>((x, _) => string.Join(",", x));
52RequestHeadersDataClasses = new Dictionary<string, DataClassification>
57ResponseHeadersDataClasses = new Dictionary<string, DataClassification>
110.Returns<IEnumerable<string>, DataClassification>((x, _) => string.Join(",", x));
114RequestHeadersDataClasses = new Dictionary<string, DataClassification>
120ResponseHeadersDataClasses = new Dictionary<string, DataClassification>
Logging\HttpRequestReaderTest.cs (21)
61RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData }, { header3.Key, FakeTaxonomy.PrivateData } },
62ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData }, { header3.Key, FakeTaxonomy.PrivateData } },
70mockHeadersRedactor.Setup(r => r.Redact(It.IsAny<IEnumerable<string>>(), It.IsAny<DataClassification>()))
134mockHeadersRedactor.Setup(r => r.Redact(It.IsAny<IEnumerable<string>>(), It.IsAny<DataClassification>()))
187RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } },
188ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData } },
197mockHeadersRedactor.Setup(r => r.Redact(It.IsAny<IEnumerable<string>>(), It.IsAny<DataClassification>()))
261RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } },
262ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData } },
272mockHeadersRedactor.Setup(r => r.Redact(It.IsAny<IEnumerable<string>>(), It.IsAny<DataClassification>()))
335RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } },
344mockHeadersRedactor.Setup(r => r.Redact(It.IsAny<IEnumerable<string>>(), It.IsAny<DataClassification>()))
392RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } },
393ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData } },
402mockHeadersRedactor.Setup(r => r.Redact(It.IsAny<IEnumerable<string>>(), It.IsAny<DataClassification>()))
463RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } },
464ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData } },
473mockHeadersRedactor.Setup(r => r.Redact(It.IsAny<IEnumerable<string>>(), It.IsAny<DataClassification>()))
530RequestHeadersDataClasses = new Dictionary<string, DataClassification> { { header1.Key, FakeTaxonomy.PrivateData } },
531ResponseHeadersDataClasses = new Dictionary<string, DataClassification> { { header2.Key, FakeTaxonomy.PrivateData } },
540mockHeadersRedactor.Setup(r => r.Redact(It.IsAny<IEnumerable<string>>(), It.IsAny<DataClassification>()))
Microsoft.Extensions.Telemetry (25)
Http\HttpRouteFormatter.cs (14)
35public string Format(string httpRoute, string httpPath, HttpRouteParameterRedactionMode redactionMode, IReadOnlyDictionary<string, DataClassification> parametersToRedact)
45IReadOnlyDictionary<string, DataClassification> parametersToRedact)
117in ParsedRouteSegments routeSegments, HttpRouteParameterRedactionMode redactionMode, IReadOnlyDictionary<string, DataClassification> parametersToRedact)
135if ((!parametersToRedact.TryGetValue(segment.ParamName, out DataClassification classification) &&
137classification != DataClassification.None)
145if (parametersToRedact.TryGetValue(segment.ParamName, out DataClassification classification) && classification != DataClassification.None)
178IReadOnlyDictionary<string, DataClassification> parametersToRedact,
198IReadOnlyDictionary<string, DataClassification> parametersToRedact,
201if (parametersToRedact.TryGetValue(httpRouteSegment.ParamName, out var classification))
203if (classification != DataClassification.None)
240IReadOnlyDictionary<string, DataClassification> parametersToRedact,
243if (parametersToRedact.TryGetValue(httpRouteSegment.ParamName, out DataClassification classification)
244&& classification != DataClassification.None)
Http\HttpRouteParser.cs (8)
36IReadOnlyDictionary<string, DataClassification> parametersToRedact,
252IReadOnlyDictionary<string, DataClassification> parametersToRedact,
269IReadOnlyDictionary<string, DataClassification> parametersToRedact,
272if (parametersToRedact.TryGetValue(segment.ParamName, out DataClassification classification))
274if (classification != DataClassification.None)
300IReadOnlyDictionary<string, DataClassification> parametersToRedact,
303if (parametersToRedact.TryGetValue(segment.ParamName, out DataClassification classification)
304&& classification != DataClassification.None)
Microsoft.Extensions.Telemetry.Tests (30)
Http\HttpParserTests.cs (13)
21Dictionary<string, DataClassification> parametersToRedact = new() { { "chatId", FakeTaxonomy.PrivateData } };
38Dictionary<string, DataClassification> parametersToRedact = new() { { "chatId", FakeTaxonomy.PrivateData } };
57Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } };
77Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } };
123Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } };
155Dictionary<string, DataClassification> parametersToRedact = new() { { "chatId", FakeTaxonomy.PrivateData } };
226Dictionary<string, DataClassification> parametersToRedact = new() { { "chatId", FakeTaxonomy.PrivateData } };
251parametersToRedact.Add("routeId", DataClassification.None);
262parametersToRedact.Add("chatId", DataClassification.None);
280Dictionary<string, DataClassification> parametersToRedact = new() { { "filter", FakeTaxonomy.PrivateData } };
347Dictionary<string, DataClassification> parametersToRedact = new()
391Dictionary<string, DataClassification> parametersToRedact = new()
437Dictionary<string, DataClassification> parametersToRedact = new()
Http\HttpRouteFormatterTests.cs (17)
20var parametersToRedact = new Dictionary<string, DataClassification>();
93Dictionary<string, DataClassification> parametersToRedact = new()
136Dictionary<string, DataClassification> parametersToRedact = new()
157Dictionary<string, DataClassification> parametersToRedact = new()
218Dictionary<string, DataClassification> parametersToRedact = new()
220{ "userId", DataClassification.None },
221{ "routeId", DataClassification.None },
222{ "chatId", DataClassification.None },
239Dictionary<string, DataClassification> parametersToRedact = new()
242{ "routeId", DataClassification.None },
257Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } };
324Dictionary<string, DataClassification> parametersToRedact = new() { { "chatId", FakeTaxonomy.PrivateData } };
353Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } };
373Dictionary<string, DataClassification> parametersToRedact = new() { { "filter", FakeTaxonomy.PrivateData } };
415Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } };
435Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } };
451Dictionary<string, DataClassification> parametersToRedact = new() { { "routeId", FakeTaxonomy.PrivateData } };
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
Microsoft.Gen.Logging.Unit.Tests (4)