Skip to content

Commit 4fb22c5

Browse files
committed
Introduced global using directives for OnTopic
The two most commonly referenced namespaces in `OnTopic` are `System.Diagnostics.CodeAnalysis` (for annotations) and `OnTopic.Internal.Diagnostics` (for e.g. `Contract.Require()`), each with over 45 references. These have been added as `global using` directives (in the `AssemblyInfo`) and removed from the individual files.
1 parent 3b17bcc commit 4fb22c5

File tree

67 files changed

+10
-95
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+10
-95
lines changed

OnTopic/Associations/TopicReferenceCollection.cs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
| Project Topics Library
55
\=============================================================================================================================*/
66
using OnTopic.Collections.Specialized;
7-
using OnTopic.Internal.Diagnostics;
87
using OnTopic.Repositories;
98

109
namespace OnTopic.Associations {

OnTopic/Associations/TopicRelationshipMultiMap.cs

-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using System.Diagnostics.CodeAnalysis;
76
using OnTopic.Collections.Specialized;
8-
using OnTopic.Internal.Diagnostics;
97
using OnTopic.Querying;
108
using OnTopic.Repositories;
119

OnTopic/Attributes/AttributeCollectionExtensions.cs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
\=============================================================================================================================*/
66
using System.Globalization;
77
using OnTopic.Collections.Specialized;
8-
using OnTopic.Internal.Diagnostics;
98
using OnTopic.Repositories;
109

1110
namespace OnTopic.Attributes {

OnTopic/Collections/KeyedTopicCollection{T}.cs

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
| Project Topics Library
55
\=============================================================================================================================*/
66
using System.Collections.ObjectModel;
7-
using System.Diagnostics.CodeAnalysis;
8-
using OnTopic.Internal.Diagnostics;
97

108
namespace OnTopic.Collections {
119

OnTopic/Collections/ReadOnlyKeyedTopicCollection{T}.cs

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
| Project Topics Library
55
\=============================================================================================================================*/
66
using System.Collections.ObjectModel;
7-
using System.Diagnostics.CodeAnalysis;
8-
using OnTopic.Internal.Diagnostics;
97

108
namespace OnTopic.Collections {
119

OnTopic/Collections/ReadOnlyTopicCollection.cs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
| Project Topics Library
55
\=============================================================================================================================*/
66
using System.Collections.ObjectModel;
7-
using System.Diagnostics.CodeAnalysis;
87

98
namespace OnTopic.Collections {
109

OnTopic/Collections/Specialized/KeyValuesPair{TKey,TValue}.cs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using OnTopic.Internal.Diagnostics;
76

87
namespace OnTopic.Collections.Specialized {
98

OnTopic/Collections/Specialized/ReadOnlyTopicMultiMap.cs

-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
\=============================================================================================================================*/
66
using System.Collections;
77
using System.Collections.ObjectModel;
8-
using System.Diagnostics.CodeAnalysis;
9-
using OnTopic.Internal.Diagnostics;
108

119
namespace OnTopic.Collections.Specialized {
1210

OnTopic/Collections/Specialized/TopicMultiMap.cs

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
| Project Topics Library
55
\=============================================================================================================================*/
66
using System.Collections.ObjectModel;
7-
using System.Diagnostics.CodeAnalysis;
8-
using OnTopic.Internal.Diagnostics;
97

108
namespace OnTopic.Collections.Specialized {
119

OnTopic/Collections/Specialized/TrackedRecordCollection{TItem,TValue,TAttribute}.cs

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
| Project Topics Library
55
\=============================================================================================================================*/
66
using System.Collections.ObjectModel;
7-
using System.Diagnostics.CodeAnalysis;
8-
using OnTopic.Internal.Diagnostics;
97
using OnTopic.Internal.Reflection;
108
using OnTopic.Repositories;
119

OnTopic/Collections/Specialized/TrackedRecord{T}.cs

-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using System.Diagnostics.CodeAnalysis;
76
using OnTopic.Attributes;
8-
using OnTopic.Internal.Diagnostics;
97
using OnTopic.Repositories;
108

119
namespace OnTopic.Collections.Specialized {

OnTopic/Collections/TopicCollection.cs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
| Project Topics Library
55
\=============================================================================================================================*/
66
using System.Collections.ObjectModel;
7-
using System.Diagnostics.CodeAnalysis;
87

98
namespace OnTopic.Collections {
109

OnTopic/Internal/Diagnostics/Contract.cs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using System.Diagnostics.CodeAnalysis;
76
using System.Reflection;
87
using Microsoft;
98

OnTopic/Internal/Reflection/MemberAccessor.cs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
\=============================================================================================================================*/
66
using System.Reflection;
77
using OnTopic.Attributes;
8-
using OnTopic.Internal.Diagnostics;
98

109
namespace OnTopic.Internal.Reflection {
1110

OnTopic/Internal/Reflection/TopicPropertyDispatcher{TItem,TValue,TAttributeType}.cs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using System.Diagnostics.CodeAnalysis;
76
using System.Reflection;
87
using System.Runtime.ExceptionServices;
98
using OnTopic.Attributes;

OnTopic/Internal/Reflection/TypeAccessor.cs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
\=============================================================================================================================*/
66
using System.Reflection;
77
using OnTopic.Attributes;
8-
using OnTopic.Internal.Diagnostics;
98

109
namespace OnTopic.Internal.Reflection {
1110

OnTopic/Internal/Reflection/TypeAccessorCache.cs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
| Project Topics Library
55
\=============================================================================================================================*/
66
using System.Collections.Concurrent;
7-
using OnTopic.Internal.Diagnostics;
87

98
namespace OnTopic.Internal.Reflection {
109

OnTopic/InvalidKeyException.cs

-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using System.Diagnostics.CodeAnalysis;
76
using System.Runtime.Serialization;
8-
using OnTopic.Internal.Diagnostics;
97

108
namespace OnTopic {
119

OnTopic/Lookup/StaticTypeLookupService.cs

-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using System.Diagnostics.CodeAnalysis;
76
using System.Reflection;
8-
using OnTopic.Internal.Diagnostics;
97

108
namespace OnTopic.Lookup {
119

OnTopic/Lookup/TypeCollection.cs

-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
\=============================================================================================================================*/
66
using System.Collections;
77
using System.Collections.ObjectModel;
8-
using System.Diagnostics.CodeAnalysis;
98
using System.Reflection;
10-
using OnTopic.Internal.Diagnostics;
119

1210
namespace OnTopic.Lookup {
1311

OnTopic/Mapping/Annotations/AttributeKeyAttribute.cs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using System.Diagnostics.CodeAnalysis;
76
using OnTopic.Collections.Specialized;
87

98
namespace OnTopic.Mapping.Annotations {

OnTopic/Mapping/Annotations/FilterByAttributeAttribute.cs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using OnTopic.Internal.Diagnostics;
76

87
namespace OnTopic.Mapping.Annotations {
98

OnTopic/Mapping/CachedTopicMappingService.cs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
| Project Topics Library
55
\=============================================================================================================================*/
66
using System.Collections.Concurrent;
7-
using OnTopic.Internal.Diagnostics;
87
using OnTopic.Mapping.Annotations;
98

109
namespace OnTopic.Mapping {

OnTopic/Mapping/Hierarchical/HierarchicalTopicMappingService{T}.cs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using OnTopic.Internal.Diagnostics;
76
using OnTopic.Mapping.Annotations;
87
using OnTopic.Models;
98
using OnTopic.Repositories;

OnTopic/Mapping/Internal/ItemConfiguration.cs

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using System.ComponentModel;
88
using System.Reflection;
99
using OnTopic.Collections.Specialized;
10-
using OnTopic.Internal.Diagnostics;
1110
using OnTopic.Mapping.Annotations;
1211

1312
namespace OnTopic.Mapping.Internal {

OnTopic/Mapping/Internal/MappedTopicCache.cs

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
| Project Topics Library
55
\=============================================================================================================================*/
66
using System.Collections.Concurrent;
7-
using System.Diagnostics.CodeAnalysis;
8-
using OnTopic.Internal.Diagnostics;
97
using OnTopic.Mapping.Annotations;
108

119
namespace OnTopic.Mapping.Internal {

OnTopic/Mapping/Reverse/BindingModelValidator.cs

-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
\=============================================================================================================================*/
66
using System.Collections;
77
using System.Collections.Concurrent;
8-
using System.Diagnostics.CodeAnalysis;
98
using System.Reflection;
10-
using OnTopic.Internal.Diagnostics;
119
using OnTopic.Internal.Reflection;
1210
using OnTopic.Mapping.Annotations;
1311
using OnTopic.Mapping.Internal;

OnTopic/Mapping/Reverse/ReverseTopicMappingService.cs

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
using System.Reflection;
1010
using OnTopic.Attributes;
1111
using OnTopic.Collections;
12-
using OnTopic.Internal.Diagnostics;
1312
using OnTopic.Internal.Reflection;
1413
using OnTopic.Mapping.Internal;
1514
using OnTopic.Metadata;

OnTopic/Mapping/TopicMappingService.cs

-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
| Project Topics Library
55
\=============================================================================================================================*/
66
using System.Collections;
7-
using System.Diagnostics.CodeAnalysis;
87
using System.Reflection;
98
using OnTopic.Attributes;
109
using OnTopic.Collections.Specialized;
11-
using OnTopic.Internal.Diagnostics;
1210
using OnTopic.Internal.Reflection;
1311
using OnTopic.Lookup;
1412
using OnTopic.Mapping.Annotations;

OnTopic/Mapping/_exceptions/InvalidTypeException.cs

-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using System.Diagnostics.CodeAnalysis;
76
using System.Runtime.Serialization;
8-
using OnTopic.Internal.Diagnostics;
97
using OnTopic.Lookup;
108

119
namespace OnTopic.Mapping {

OnTopic/Mapping/_exceptions/MappingModelValidationException.cs

-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using System.Diagnostics.CodeAnalysis;
76
using System.Runtime.Serialization;
8-
using OnTopic.Internal.Diagnostics;
97
using OnTopic.Mapping.Reverse;
108
using OnTopic.Metadata;
119

OnTopic/Mapping/_exceptions/TopicMappingException.cs

-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using System.Diagnostics.CodeAnalysis;
76
using System.Runtime.Serialization;
8-
using OnTopic.Internal.Diagnostics;
97

108
namespace OnTopic.Mapping {
119

OnTopic/Metadata/AttributeDescriptor.cs

-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using System.Diagnostics.CodeAnalysis;
76
using OnTopic.Attributes;
87
using OnTopic.Collections.Specialized;
9-
using OnTopic.Internal.Diagnostics;
108

119
namespace OnTopic.Metadata {
1210

OnTopic/Metadata/ContentTypeDescriptor.cs

-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
using OnTopic.Attributes;
77
using OnTopic.Collections;
88
using OnTopic.Collections.Specialized;
9-
using OnTopic.Internal.Diagnostics;
109
using OnTopic.Associations;
11-
using System.Diagnostics.CodeAnalysis;
1210

1311
namespace OnTopic.Metadata {
1412

OnTopic/Metadata/ContentTypeDescriptorCollection.cs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
| Project Topics Library
55
\=============================================================================================================================*/
66
using OnTopic.Collections;
7-
using OnTopic.Internal.Diagnostics;
87
using OnTopic.Querying;
98
using OnTopic.Repositories;
109

OnTopic/Models/IAssociatedTopicBindingModel.cs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
| Project Topics Library
55
\=============================================================================================================================*/
66
using System.ComponentModel.DataAnnotations;
7-
using System.Diagnostics.CodeAnalysis;
87
using OnTopic.Mapping.Reverse;
98

109
namespace OnTopic.Models {

OnTopic/Models/ICoreTopicViewModel.cs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
\=============================================================================================================================*/
66
using System.Collections.ObjectModel;
77
using System.ComponentModel.DataAnnotations;
8-
using System.Diagnostics.CodeAnalysis;
98
using OnTopic.Mapping;
109
using OnTopic.Metadata;
1110

OnTopic/Models/INavigableTopicViewModel.cs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
| Project Website
55
\=============================================================================================================================*/
66
using System.ComponentModel.DataAnnotations;
7-
using System.Diagnostics.CodeAnalysis;
87

98
namespace OnTopic.Models {
109

OnTopic/Models/ITopicViewModel.cs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
| Project Topics Library
55
\=============================================================================================================================*/
66
using System.ComponentModel.DataAnnotations;
7-
using System.Diagnostics.CodeAnalysis;
87
using OnTopic.Mapping;
98

109
namespace OnTopic.Models {

OnTopic/Obsolete/Attributes/AttributeValue.cs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
| Client Ignia, LLC
44
| Project Topics Library
55
\=============================================================================================================================*/
6-
using System.Diagnostics.CodeAnalysis;
76
using OnTopic.Collections;
87
using OnTopic.Metadata;
98
using OnTopic.Repositories;

OnTopic/Obsolete/Collections/AttributeValueCollection.cs

-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
| Project Topics Library
55
\=============================================================================================================================*/
66
using System.Collections.ObjectModel;
7-
using System.Diagnostics.CodeAnalysis;
87
using OnTopic.Attributes;
9-
using OnTopic.Internal.Diagnostics;
108
using OnTopic.Repositories;
119

1210
#pragma warning disable IDE0060 // Remove unused parameter

OnTopic/Obsolete/Collections/NamedTopicCollection.cs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
| Project Topics Library
55
\=============================================================================================================================*/
66
using System.Collections.ObjectModel;
7-
using System.Diagnostics.CodeAnalysis;
87
using OnTopic.Associations;
98
using OnTopic.Collections.Specialized;
109

OnTopic/Obsolete/Collections/ReadOnlyTopicCollection{T}.cs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
| Project Topics Library
55
\=============================================================================================================================*/
66
using System.Collections.ObjectModel;
7-
using System.Diagnostics.CodeAnalysis;
87

98
#pragma warning disable IDE0060 // Remove unused parameter
109

OnTopic/Obsolete/Collections/RelatedTopicCollection.cs

-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
| Project Topics Library
55
\=============================================================================================================================*/
66
using System.Collections.ObjectModel;
7-
using System.Diagnostics.CodeAnalysis;
87
using OnTopic.Associations;
9-
using OnTopic.Internal.Diagnostics;
108

119
#pragma warning disable IDE0060 // Remove unused parameter
1210

OnTopic/Obsolete/Collections/TopicCollection{T}.cs

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
| Project Topics Library
55
\=============================================================================================================================*/
66
using System.Collections.ObjectModel;
7-
using System.Diagnostics.CodeAnalysis;
8-
using OnTopic.Internal.Diagnostics;
97

108
#pragma warning disable IDE0060 // Remove unused parameter
119

0 commit comments

Comments
 (0)