diff --git a/samples/Sample/Contracts/MyPrismNavRequest.cs b/samples/Sample/Contracts/MyPrismNavRequest.cs index 64a6ad6..ca09e1b 100644 --- a/samples/Sample/Contracts/MyPrismNavRequest.cs +++ b/samples/Sample/Contracts/MyPrismNavRequest.cs @@ -2,7 +2,10 @@ namespace Sample.Contracts; public record MyPrismNavRequest(string Arg) : IPrismNavigationRequest { + public string? PrependedNavigationUri { get; } public string PageUri => "AnotherPage"; public string? NavigationParameterName => null; + public bool? IsAnimated { get; } + public bool IsModal { get; } public INavigationService? Navigator { get; set; } }; \ No newline at end of file diff --git a/src/Shiny.Mediator.SourceGenerators/MediatorSourceGenerator.cs b/src/Shiny.Mediator.SourceGenerators/MediatorSourceGenerator.cs index 7320f45..2ef8323 100644 --- a/src/Shiny.Mediator.SourceGenerators/MediatorSourceGenerator.cs +++ b/src/Shiny.Mediator.SourceGenerators/MediatorSourceGenerator.cs @@ -25,23 +25,23 @@ public void Initialize(GeneratorInitializationContext context) // #nullable disable - [System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple = false)] - internal sealed class SingletonHandlerAttribute : System.Attribute + [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false)] + internal sealed class SingletonHandlerAttribute : global::System.Attribute { } - [System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple = false)] - internal sealed class ScopedHandlerAttribute : System.Attribute + [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false)] + internal sealed class ScopedHandlerAttribute : global::System.Attribute { } - [System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple = false)] - internal sealed class SingletonMiddlewareAttribute : System.Attribute + [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false)] + internal sealed class SingletonMiddlewareAttribute : global::System.Attribute { } - [System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple = false)] - internal sealed class ScopedMiddlewareAttribute : System.Attribute + [global::System.AttributeUsage(global::System.AttributeTargets.Class, AllowMultiple = false)] + internal sealed class ScopedMiddlewareAttribute : global::System.Attribute { } """, @@ -54,7 +54,7 @@ internal sealed class ScopedMiddlewareAttribute : System.Attribute public void Execute(GeneratorExecutionContext context) { - if (!(context.SyntaxContextReceiver is SyntaxReceiver)) + if (context.SyntaxContextReceiver is not RegisterHandlerAttributeSyntaxReceiver) return; // TODO: detect double registration of request handlers?