diff --git a/src/Dapr.Actors.Generators/ActorClientGenerator.cs b/src/Dapr.Actors.Generators/ActorClientGenerator.cs index c0e39fcd..001604d5 100644 --- a/src/Dapr.Actors.Generators/ActorClientGenerator.cs +++ b/src/Dapr.Actors.Generators/ActorClientGenerator.cs @@ -60,7 +60,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) /// Current generator syntax context passed from generator pipeline. /// Cancellation token used to interrupt the generation. /// Returns the descriptor of actor client to generate. - static ActorClientDescriptor CreateActorClientDescriptor( + private static ActorClientDescriptor CreateActorClientDescriptor( GeneratorAttributeSyntaxContext context, CancellationToken cancellationToken) { @@ -102,7 +102,7 @@ static ActorClientDescriptor CreateActorClientDescriptor( /// Context passed from the source generator when it has registered an output. /// Descriptor of actor client to generate. /// Throws when one or more required symbols assembly are missing. - static void GenerateActorClientCode(SourceProductionContext context, ActorClientDescriptor descriptor) + private static void GenerateActorClientCode(SourceProductionContext context, ActorClientDescriptor descriptor) { try { diff --git a/src/Dapr.Actors.Generators/Templates.cs b/src/Dapr.Actors.Generators/Templates.cs index a9482a98..6cc4c9f8 100644 --- a/src/Dapr.Actors.Generators/Templates.cs +++ b/src/Dapr.Actors.Generators/Templates.cs @@ -18,7 +18,7 @@ internal static partial class Templates /// Throws when destinationNamespace is null. public static SourceText ActorMethodAttributeSourceText(string destinationNamespace) { - if (destinationNamespace == null) + if (destinationNamespace is null) { throw new ArgumentNullException(nameof(destinationNamespace)); } @@ -54,7 +54,7 @@ internal sealed class {Constants.ActorMethodAttributeTypeName} : Attribute /// Throws when destinationNamespace is null. public static SourceText GenerateActorClientAttributeSourceText(string destinationNamespace) { - if (destinationNamespace == null) + if (destinationNamespace is null) { throw new ArgumentNullException(nameof(destinationNamespace)); }