Skip to content

Commit 18366ff

Browse files
authored
remove references to SingletonAttribute (#962)
1 parent ca0ecf2 commit 18366ff

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

src/D2L.CodeStyle.Analyzers/Attributes.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ namespace D2L.CodeStyle.Analyzers {
55

66
internal static class Attributes {
77

8-
internal static readonly RoslynAttribute Singleton = new RoslynAttribute( "D2L.LP.Extensibility.Activation.Domain.SingletonAttribute" );
98
internal static readonly RoslynAttribute DIFramework = new RoslynAttribute( "D2L.LP.Extensibility.Activation.Domain.DIFrameworkAttribute" );
109
internal static readonly RoslynAttribute Dependency = new RoslynAttribute( "D2L.LP.Extensibility.Activation.Domain.DependencyAttribute" );
1110

src/D2L.CodeStyle.Analyzers/Extensions/Microsoft.CodeAnalysis.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,6 @@
66
namespace D2L.CodeStyle.Analyzers.Extensions {
77
internal static partial class RoslynExtensions {
88

9-
public static bool IsTypeMarkedSingleton( this ITypeSymbol symbol ) {
10-
if( Attributes.Singleton.IsDefined( symbol ) ) {
11-
return true;
12-
}
13-
if( symbol.Interfaces.Any( IsTypeMarkedSingleton ) ) {
14-
return true;
15-
}
16-
if( symbol.BaseType != null && IsTypeMarkedSingleton( symbol.BaseType ) ) {
17-
return true;
18-
}
19-
return false;
20-
}
21-
229
private static readonly SymbolDisplayFormat FullTypeDisplayFormat = new SymbolDisplayFormat(
2310
typeQualificationStyle: SymbolDisplayTypeQualificationStyle.NameAndContainingTypesAndNamespaces,
2411
miscellaneousOptions: SymbolDisplayMiscellaneousOptions.ExpandNullable

0 commit comments

Comments
 (0)