Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove (unused) references to SingletonAttribute #962

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/D2L.CodeStyle.Analyzers/Attributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ namespace D2L.CodeStyle.Analyzers {

internal static class Attributes {

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,6 @@
namespace D2L.CodeStyle.Analyzers.Extensions {
internal static partial class RoslynExtensions {

public static bool IsTypeMarkedSingleton( this ITypeSymbol symbol ) {
if( Attributes.Singleton.IsDefined( symbol ) ) {
return true;
}
if( symbol.Interfaces.Any( IsTypeMarkedSingleton ) ) {
return true;
}
if( symbol.BaseType != null && IsTypeMarkedSingleton( symbol.BaseType ) ) {
return true;
}
return false;
}

private static readonly SymbolDisplayFormat FullTypeDisplayFormat = new SymbolDisplayFormat(
typeQualificationStyle: SymbolDisplayTypeQualificationStyle.NameAndContainingTypesAndNamespaces,
miscellaneousOptions: SymbolDisplayMiscellaneousOptions.ExpandNullable
Expand Down
Loading