Skip to content

Commit

Permalink
add Microsoft.CodeAnalysis.PublicApiAnalyzers on the main libs (#1948)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgravell authored Aug 18, 2023
1 parent 63fb7ba commit 67f7a1f
Show file tree
Hide file tree
Showing 22 changed files with 476 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dapper.EntityFramework/Dapper.EntityFramework.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,10 @@
<!-- note: 6.2.0 has regressions; don't force the update -->
<PackageReference Include="EntityFramework" Version="6.1.3" />
<PackageReference Include="Microsoft.SqlServer.Types" Version="14.0.1016.290" />

<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
12 changes: 12 additions & 0 deletions Dapper.EntityFramework/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Dapper.EntityFramework.DbGeographyHandler
Dapper.EntityFramework.DbGeographyHandler.DbGeographyHandler() -> void
Dapper.EntityFramework.DbGeometryHandler
Dapper.EntityFramework.DbGeometryHandler.DbGeometryHandler() -> void
Dapper.EntityFramework.Handlers
override Dapper.EntityFramework.DbGeographyHandler.Parse(object value) -> System.Data.Entity.Spatial.DbGeography
override Dapper.EntityFramework.DbGeographyHandler.SetValue(System.Data.IDbDataParameter parameter, System.Data.Entity.Spatial.DbGeography value) -> void
override Dapper.EntityFramework.DbGeometryHandler.Parse(object value) -> System.Data.Entity.Spatial.DbGeometry
override Dapper.EntityFramework.DbGeometryHandler.SetValue(System.Data.IDbDataParameter parameter, System.Data.Entity.Spatial.DbGeometry value) -> void
static Dapper.EntityFramework.Handlers.Register() -> void
static readonly Dapper.EntityFramework.DbGeographyHandler.Default -> Dapper.EntityFramework.DbGeographyHandler
static readonly Dapper.EntityFramework.DbGeometryHandler.Default -> Dapper.EntityFramework.DbGeometryHandler
1 change: 1 addition & 0 deletions Dapper.EntityFramework/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

3 changes: 3 additions & 0 deletions Dapper.ProviderTools/BulkCopy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,17 @@ private static readonly ConcurrentDictionary<Type, Func<DbConnection, object>?>
/// <summary>
/// Write a set of data to the server
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("ApiDesign", "RS0026:Do not add multiple public overloads with optional parameters", Justification = "Grandfathered")]
public abstract Task WriteToServerAsync(DbDataReader source, CancellationToken cancellationToken = default);
/// <summary>
/// Write a set of data to the server
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("ApiDesign", "RS0026:Do not add multiple public overloads with optional parameters", Justification = "Grandfathered")]
public abstract Task WriteToServerAsync(DataTable source, CancellationToken cancellationToken = default);
/// <summary>
/// Write a set of data to the server
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("ApiDesign", "RS0026:Do not add multiple public overloads with optional parameters", Justification = "Grandfathered")]
public abstract Task WriteToServerAsync(DataRow[] source, CancellationToken cancellationToken = default);
/// <summary>
/// Add a mapping between two columns by name
Expand Down
6 changes: 6 additions & 0 deletions Dapper.ProviderTools/Dapper.ProviderTools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
<SignAssembly>true</SignAssembly>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
</ItemGroup>
Expand Down
30 changes: 30 additions & 0 deletions Dapper.ProviderTools/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#nullable enable
abstract Dapper.ProviderTools.BulkCopy.AddColumnMapping(int sourceColumn, int destinationColumn) -> void
abstract Dapper.ProviderTools.BulkCopy.AddColumnMapping(string! sourceColumn, string! destinationColumn) -> void
abstract Dapper.ProviderTools.BulkCopy.DestinationTableName.get -> string!
abstract Dapper.ProviderTools.BulkCopy.DestinationTableName.set -> void
abstract Dapper.ProviderTools.BulkCopy.Dispose(bool disposing) -> void
abstract Dapper.ProviderTools.BulkCopy.Wrapped.get -> object!
abstract Dapper.ProviderTools.BulkCopy.WriteToServer(System.Data.DataRow![]! source) -> void
abstract Dapper.ProviderTools.BulkCopy.WriteToServer(System.Data.DataTable! source) -> void
abstract Dapper.ProviderTools.BulkCopy.WriteToServer(System.Data.IDataReader! source) -> void
abstract Dapper.ProviderTools.BulkCopy.WriteToServerAsync(System.Data.Common.DbDataReader! source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!
abstract Dapper.ProviderTools.BulkCopy.WriteToServerAsync(System.Data.DataRow![]! source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!
abstract Dapper.ProviderTools.BulkCopy.WriteToServerAsync(System.Data.DataTable! source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task!
Dapper.ProviderTools.BulkCopy
Dapper.ProviderTools.BulkCopy.BatchSize.get -> int
Dapper.ProviderTools.BulkCopy.BatchSize.set -> void
Dapper.ProviderTools.BulkCopy.BulkCopy() -> void
Dapper.ProviderTools.BulkCopy.BulkCopyTimeout.get -> int
Dapper.ProviderTools.BulkCopy.BulkCopyTimeout.set -> void
Dapper.ProviderTools.BulkCopy.Dispose() -> void
Dapper.ProviderTools.BulkCopy.EnableStreaming.get -> bool
Dapper.ProviderTools.BulkCopy.EnableStreaming.set -> void
Dapper.ProviderTools.DbConnectionExtensions
Dapper.ProviderTools.DbExceptionExtensions
static Dapper.ProviderTools.BulkCopy.Create(System.Data.Common.DbConnection! connection) -> Dapper.ProviderTools.BulkCopy!
static Dapper.ProviderTools.BulkCopy.TryCreate(System.Data.Common.DbConnection! connection) -> Dapper.ProviderTools.BulkCopy?
static Dapper.ProviderTools.DbConnectionExtensions.TryClearAllPools(this System.Data.Common.DbConnection! connection) -> bool
static Dapper.ProviderTools.DbConnectionExtensions.TryClearPool(this System.Data.Common.DbConnection! connection) -> bool
static Dapper.ProviderTools.DbConnectionExtensions.TryGetClientConnectionId(this System.Data.Common.DbConnection! connection, out System.Guid clientConnectionId) -> bool
static Dapper.ProviderTools.DbExceptionExtensions.IsNumber(this System.Data.Common.DbException! exception, int number) -> bool
1 change: 1 addition & 0 deletions Dapper.ProviderTools/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
5 changes: 5 additions & 0 deletions Dapper.SqlBuilder/Dapper.SqlBuilder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Dapper\Dapper.csproj" />

<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
Expand Down
21 changes: 21 additions & 0 deletions Dapper.SqlBuilder/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Dapper.SqlBuilder
Dapper.SqlBuilder.AddClause(string name, string sql, object parameters, string joiner, string prefix = "", string postfix = "", bool isInclusive = false) -> Dapper.SqlBuilder
Dapper.SqlBuilder.AddParameters(dynamic parameters) -> Dapper.SqlBuilder
Dapper.SqlBuilder.AddTemplate(string sql, dynamic parameters = null) -> Dapper.SqlBuilder.Template
Dapper.SqlBuilder.GroupBy(string sql, dynamic parameters = null) -> Dapper.SqlBuilder
Dapper.SqlBuilder.Having(string sql, dynamic parameters = null) -> Dapper.SqlBuilder
Dapper.SqlBuilder.InnerJoin(string sql, dynamic parameters = null) -> Dapper.SqlBuilder
Dapper.SqlBuilder.Intersect(string sql, dynamic parameters = null) -> Dapper.SqlBuilder
Dapper.SqlBuilder.Join(string sql, dynamic parameters = null) -> Dapper.SqlBuilder
Dapper.SqlBuilder.LeftJoin(string sql, dynamic parameters = null) -> Dapper.SqlBuilder
Dapper.SqlBuilder.OrderBy(string sql, dynamic parameters = null) -> Dapper.SqlBuilder
Dapper.SqlBuilder.OrWhere(string sql, dynamic parameters = null) -> Dapper.SqlBuilder
Dapper.SqlBuilder.RightJoin(string sql, dynamic parameters = null) -> Dapper.SqlBuilder
Dapper.SqlBuilder.Select(string sql, dynamic parameters = null) -> Dapper.SqlBuilder
Dapper.SqlBuilder.Set(string sql, dynamic parameters = null) -> Dapper.SqlBuilder
Dapper.SqlBuilder.SqlBuilder() -> void
Dapper.SqlBuilder.Template
Dapper.SqlBuilder.Template.Parameters.get -> object
Dapper.SqlBuilder.Template.RawSql.get -> string
Dapper.SqlBuilder.Template.Template(Dapper.SqlBuilder builder, string sql, dynamic parameters) -> void
Dapper.SqlBuilder.Where(string sql, dynamic parameters = null) -> Dapper.SqlBuilder
1 change: 1 addition & 0 deletions Dapper.SqlBuilder/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

11 changes: 11 additions & 0 deletions Dapper/Dapper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,19 @@
<Authors>Sam Saffron;Marc Gravell;Nick Craver</Authors>
<TargetFrameworks>net461;netstandard2.0;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<!-- common base API goes here -->
<AdditionalFiles Include="PublicAPI.*.txt" />
<!-- TFM-specific additions go here; in reality this just means "current" (to avoid DisposeAsync etc in netfx/netstandard) -->
<AdditionalFiles Include="PublicAPI/$(TargetFramework)/PublicAPI.*.txt" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />

<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net5.0'">
Expand Down
Loading

0 comments on commit 67f7a1f

Please sign in to comment.