Skip to content

Commit

Permalink
Add public api analyzers to avoid inadvertent breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kzu committed Jul 10, 2023
1 parent c3711d6 commit 49133cd
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Merq/IMessageBus.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
#pragma warning disable RS0026 // Do not add multiple public overloads with optional parameters. BOGUS: https://github.com/dotnet/roslyn/issues/16564#issuecomment-1629556744
using System;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
Expand Down
1 change: 1 addition & 0 deletions src/Merq/Merq.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<PackageReference Include="NuGetizer" />
<PackageReference Include="ThisAssembly.Project" PrivateAssets="all" />
<PackageReference Include="Microsoft.CSharp" />
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Pack="false" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
35 changes: 35 additions & 0 deletions src/Merq/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#nullable enable
Merq.IAsyncCommand
Merq.IAsyncCommand<TResult>
Merq.IAsyncCommandHandler
Merq.IAsyncCommandHandler<TCommand, TResult>
Merq.IAsyncCommandHandler<TCommand, TResult>.ExecuteAsync(TCommand command, System.Threading.CancellationToken cancellation = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<TResult>!
Merq.IAsyncCommandHandler<TCommand>
Merq.IAsyncCommandHandler<TCommand>.ExecuteAsync(TCommand command, System.Threading.CancellationToken cancellation = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!
Merq.ICanExecute<TCommand>
Merq.ICanExecute<TCommand>.CanExecute(TCommand command) -> bool
Merq.ICommand
Merq.ICommand<TResult>
Merq.ICommandHandler
Merq.ICommandHandler<TCommand, TResult>
Merq.ICommandHandler<TCommand, TResult>.Execute(TCommand command) -> TResult
Merq.ICommandHandler<TCommand>
Merq.ICommandHandler<TCommand>.Execute(TCommand command) -> void
Merq.IExecutable
Merq.IExecutable<TResult>
Merq.IExecutableCommandHandler<TCommand, TResult>
Merq.IExecutableCommandHandler<TCommand>
Merq.IExecuteResult
Merq.IMessageBus
Merq.IMessageBus.CanExecute<TCommand>(TCommand command) -> bool
Merq.IMessageBus.CanHandle(Merq.IExecutable! command) -> bool
Merq.IMessageBus.CanHandle<TCommand>() -> bool
Merq.IMessageBus.Execute(Merq.ICommand! command, string? callerName = null, string? callerFile = null, int? callerLine = null) -> void
Merq.IMessageBus.Execute<TResult>(Merq.ICommand<TResult>! command, string? callerName = null, string? callerFile = null, int? callerLine = null) -> TResult
Merq.IMessageBus.ExecuteAsync(Merq.IAsyncCommand! command, System.Threading.CancellationToken cancellation = default(System.Threading.CancellationToken), string? callerName = null, string? callerFile = null, int? callerLine = null) -> System.Threading.Tasks.Task!
Merq.IMessageBus.ExecuteAsync<TResult>(Merq.IAsyncCommand<TResult>! command, System.Threading.CancellationToken cancellation = default(System.Threading.CancellationToken), string? callerName = null, string? callerFile = null, int? callerLine = null) -> System.Threading.Tasks.Task<TResult>!
Merq.IMessageBus.Notify<TEvent>(TEvent e, string? callerName = null, string? callerFile = null, int? callerLine = null) -> void
Merq.IMessageBus.Observe<TEvent>() -> System.IObservable<TEvent>!
Merq.IMessageBusExtensions
static Merq.IMessageBusExtensions.Execute<TCommand>(this Merq.IMessageBus! bus, string? callerName = null, string? callerFile = null, int? callerLine = null) -> void
static Merq.IMessageBusExtensions.Notify<TEvent>(this Merq.IMessageBus! bus, string? callerName = null, string? callerFile = null, int? callerLine = null) -> void
Empty file.
1 change: 1 addition & 0 deletions src/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<PackageReference Update="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp" Version="4.2.0" />
<PackageReference Update="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.2.0" />
<PackageReference Update="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4" />
<PackageReference Update="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
<PackageReference Update="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Update="Microsoft.VisualStudio.Composition" Version="17.2.41" />
Expand Down

0 comments on commit 49133cd

Please sign in to comment.