Skip to content

Commit 49133cd

Browse files
committed
Add public api analyzers to avoid inadvertent breaking changes
1 parent c3711d6 commit 49133cd

5 files changed

Lines changed: 39 additions & 1 deletion

File tree

src/Merq/IMessageBus.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System;
1+
#pragma warning disable RS0026 // Do not add multiple public overloads with optional parameters. BOGUS: https://github.com/dotnet/roslyn/issues/16564#issuecomment-1629556744
2+
using System;
23
using System.Runtime.CompilerServices;
34
using System.Threading;
45
using System.Threading.Tasks;

src/Merq/Merq.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<PackageReference Include="NuGetizer" />
1717
<PackageReference Include="ThisAssembly.Project" PrivateAssets="all" />
1818
<PackageReference Include="Microsoft.CSharp" />
19+
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Pack="false" PrivateAssets="all" />
1920
</ItemGroup>
2021

2122
<ItemGroup>

src/Merq/PublicAPI.Shipped.txt

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#nullable enable
2+
Merq.IAsyncCommand
3+
Merq.IAsyncCommand<TResult>
4+
Merq.IAsyncCommandHandler
5+
Merq.IAsyncCommandHandler<TCommand, TResult>
6+
Merq.IAsyncCommandHandler<TCommand, TResult>.ExecuteAsync(TCommand command, System.Threading.CancellationToken cancellation = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<TResult>!
7+
Merq.IAsyncCommandHandler<TCommand>
8+
Merq.IAsyncCommandHandler<TCommand>.ExecuteAsync(TCommand command, System.Threading.CancellationToken cancellation = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!
9+
Merq.ICanExecute<TCommand>
10+
Merq.ICanExecute<TCommand>.CanExecute(TCommand command) -> bool
11+
Merq.ICommand
12+
Merq.ICommand<TResult>
13+
Merq.ICommandHandler
14+
Merq.ICommandHandler<TCommand, TResult>
15+
Merq.ICommandHandler<TCommand, TResult>.Execute(TCommand command) -> TResult
16+
Merq.ICommandHandler<TCommand>
17+
Merq.ICommandHandler<TCommand>.Execute(TCommand command) -> void
18+
Merq.IExecutable
19+
Merq.IExecutable<TResult>
20+
Merq.IExecutableCommandHandler<TCommand, TResult>
21+
Merq.IExecutableCommandHandler<TCommand>
22+
Merq.IExecuteResult
23+
Merq.IMessageBus
24+
Merq.IMessageBus.CanExecute<TCommand>(TCommand command) -> bool
25+
Merq.IMessageBus.CanHandle(Merq.IExecutable! command) -> bool
26+
Merq.IMessageBus.CanHandle<TCommand>() -> bool
27+
Merq.IMessageBus.Execute(Merq.ICommand! command, string? callerName = null, string? callerFile = null, int? callerLine = null) -> void
28+
Merq.IMessageBus.Execute<TResult>(Merq.ICommand<TResult>! command, string? callerName = null, string? callerFile = null, int? callerLine = null) -> TResult
29+
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!
30+
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>!
31+
Merq.IMessageBus.Notify<TEvent>(TEvent e, string? callerName = null, string? callerFile = null, int? callerLine = null) -> void
32+
Merq.IMessageBus.Observe<TEvent>() -> System.IObservable<TEvent>!
33+
Merq.IMessageBusExtensions
34+
static Merq.IMessageBusExtensions.Execute<TCommand>(this Merq.IMessageBus! bus, string? callerName = null, string? callerFile = null, int? callerLine = null) -> void
35+
static Merq.IMessageBusExtensions.Notify<TEvent>(this Merq.IMessageBus! bus, string? callerName = null, string? callerFile = null, int? callerLine = null) -> void

src/Merq/PublicAPI.Unshipped.txt

Whitespace-only changes.

src/Packages.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<PackageReference Update="Microsoft.CSharp" Version="4.7.0" />
1717
<PackageReference Update="Microsoft.CodeAnalysis.CSharp" Version="4.2.0" />
1818
<PackageReference Update="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.2.0" />
19+
<PackageReference Update="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4" />
1920
<PackageReference Update="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
2021
<PackageReference Update="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
2122
<PackageReference Update="Microsoft.VisualStudio.Composition" Version="17.2.41" />

0 commit comments

Comments
 (0)