@@ -8,8 +8,8 @@ public class CallOnLoadGenerator : IIncrementalGenerator
88{
99 private const string PluginNamespace = "LabApi.Loader.Features.Plugins" ;
1010 private const string PluginBaseClassName = "Plugin" ;
11- private const string CallOnLoadAttributeLocation = "SecretAPI.Attribute .CallOnLoadAttribute" ;
12- private const string CallOnUnloadAttributeLocation = "SecretAPI.Attribute .CallOnUnloadAttribute" ;
11+ private const string CallOnLoadAttributeLocation = "SecretAPI.Attributes .CallOnLoadAttribute" ;
12+ private const string CallOnUnloadAttributeLocation = "SecretAPI.Attributes .CallOnUnloadAttribute" ;
1313
1414 /// <inheritdoc/>
1515 public void Initialize ( IncrementalGeneratorInitializationContext context )
@@ -28,12 +28,12 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
2828 HasAttribute ( method , CallOnUnloadAttributeLocation ) ) )
2929 . Where ( static m => m . Item2 || m . Item3 ) ;
3030
31- IncrementalValuesProvider < INamedTypeSymbol > pluginClassProvider =
31+ IncrementalValuesProvider < INamedTypeSymbol ? > pluginClassProvider =
3232 context . SyntaxProvider . CreateSyntaxProvider (
3333 static ( node , _ ) => node is ClassDeclarationSyntax ,
3434 static ( ctx , _ ) =>
3535 ctx . SemanticModel . GetDeclaredSymbol ( ctx . Node ) as INamedTypeSymbol )
36- . Where ( static c => ! c . IsAbstract && c . BaseType ? . Name == PluginBaseClassName &&
36+ . Where ( static c => c != null && ! c . IsAbstract && c . BaseType ? . Name == PluginBaseClassName &&
3737 c . BaseType . ContainingNamespace . ToDisplayString ( ) == PluginNamespace ) ;
3838
3939 context . RegisterSourceOutput ( pluginClassProvider . Combine ( callProvider . Collect ( ) ) , static ( context , data ) =>
0 commit comments