Skip to content

Commit

Permalink
Added example of catching breaking changes to the package with Micros…
Browse files Browse the repository at this point in the history
…oft.CodeAnalysis.PublicApiAnalyzers
  • Loading branch information
oskardudycz committed May 17, 2024
1 parent c9f7f45 commit ebeca9f
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Sample/EventsVersioning/ECommerce.V1/ECommerce.V1.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- Catches incompatibility with the NuGet.
Read more in: https://devblogs.microsoft.com/dotnet/package-validation/#validation-against-baseline-package-version
-->
<Sdk Name="Microsoft.DotNet.PackageValidation" Version="1.0.0-preview.5.21302.8" />
<Sdk Name="Microsoft.DotNet.PackageValidation" Version="1.0.0-preview.5.21302.8"/>

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
Expand All @@ -13,4 +13,14 @@
<!-- Ucomment if you have NuGet published. Set it to the previous major version -->
<!-- <PackageValidationBaselineVersion>1.0.0</PackageValidationBaselineVersion>-->
</PropertyGroup>

<!-- You can also use Rosylyn Analyser.
Read more in: https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md
-->
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
41 changes: 41 additions & 0 deletions Sample/EventsVersioning/ECommerce.V1/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#nullable enable
ECommerce.V1.PricedProductItem
ECommerce.V1.PricedProductItem.PricedProductItem(ECommerce.V1.ProductItem! ProductItem, decimal UnitPrice) -> void
ECommerce.V1.PricedProductItem.ProductItem.get -> ECommerce.V1.ProductItem!
ECommerce.V1.PricedProductItem.ProductItem.init -> void
ECommerce.V1.PricedProductItem.UnitPrice.get -> decimal
ECommerce.V1.PricedProductItem.UnitPrice.init -> void
ECommerce.V1.ProductItem
ECommerce.V1.ProductItem.ProductId.get -> System.Guid
ECommerce.V1.ProductItem.ProductId.init -> void
ECommerce.V1.ProductItem.ProductItem(System.Guid ProductId, int Quantity) -> void
ECommerce.V1.ProductItem.Quantity.get -> int
ECommerce.V1.ProductItem.Quantity.init -> void
ECommerce.V1.ProductItemAddedToShoppingCart
ECommerce.V1.ProductItemAddedToShoppingCart.ProductItem.get -> ECommerce.V1.PricedProductItem!
ECommerce.V1.ProductItemAddedToShoppingCart.ProductItem.init -> void
ECommerce.V1.ProductItemAddedToShoppingCart.ProductItemAddedToShoppingCart(System.Guid ShoppingCartId, ECommerce.V1.PricedProductItem! ProductItem) -> void
ECommerce.V1.ProductItemAddedToShoppingCart.ShoppingCartId.get -> System.Guid
ECommerce.V1.ProductItemAddedToShoppingCart.ShoppingCartId.init -> void
ECommerce.V1.ProductItemRemovedFromShoppingCart
ECommerce.V1.ProductItemRemovedFromShoppingCart.ProductItem.get -> ECommerce.V1.PricedProductItem!
ECommerce.V1.ProductItemRemovedFromShoppingCart.ProductItem.init -> void
ECommerce.V1.ProductItemRemovedFromShoppingCart.ProductItemRemovedFromShoppingCart(System.Guid ShoppingCartId, ECommerce.V1.PricedProductItem! ProductItem) -> void
ECommerce.V1.ProductItemRemovedFromShoppingCart.ShoppingCartId.get -> System.Guid
ECommerce.V1.ProductItemRemovedFromShoppingCart.ShoppingCartId.init -> void
ECommerce.V1.ShoppingCartConfirmed
ECommerce.V1.ShoppingCartConfirmed.ConfirmedAt.get -> System.DateTime
ECommerce.V1.ShoppingCartConfirmed.ConfirmedAt.init -> void
ECommerce.V1.ShoppingCartConfirmed.ShoppingCartConfirmed(System.Guid ShoppingCartId, System.DateTime ConfirmedAt) -> void
ECommerce.V1.ShoppingCartConfirmed.ShoppingCartId.get -> System.Guid
ECommerce.V1.ShoppingCartConfirmed.ShoppingCartId.init -> void
ECommerce.V1.ShoppingCartOpened
ECommerce.V1.ShoppingCartOpened.ClientId.get -> System.Guid
ECommerce.V1.ShoppingCartOpened.ClientId.init -> void
ECommerce.V1.ShoppingCartOpened.ShoppingCartId.get -> System.Guid
ECommerce.V1.ShoppingCartOpened.ShoppingCartId.init -> void
ECommerce.V1.ShoppingCartOpened.ShoppingCartOpened(System.Guid ShoppingCartId, System.Guid ClientId) -> void
ECommerce.V1.ShoppingCartStatus
ECommerce.V1.ShoppingCartStatus.Cancelled = 3 -> ECommerce.V1.ShoppingCartStatus
ECommerce.V1.ShoppingCartStatus.Confirmed = 2 -> ECommerce.V1.ShoppingCartStatus
ECommerce.V1.ShoppingCartStatus.Pending = 1 -> ECommerce.V1.ShoppingCartStatus
Empty file.

0 comments on commit ebeca9f

Please sign in to comment.