TheBankOfRandomCredit.Authorizer
2.0.0
dotnet add package TheBankOfRandomCredit.Authorizer --version 2.0.0
NuGet\Install-Package TheBankOfRandomCredit.Authorizer -Version 2.0.0
<PackageReference Include="TheBankOfRandomCredit.Authorizer" Version="2.0.0" />
<PackageVersion Include="TheBankOfRandomCredit.Authorizer" Version="2.0.0" />
<PackageReference Include="TheBankOfRandomCredit.Authorizer" />
paket add TheBankOfRandomCredit.Authorizer --version 2.0.0
#r "nuget: TheBankOfRandomCredit.Authorizer, 2.0.0"
#:package TheBankOfRandomCredit.Authorizer@2.0.0
#addin nuget:?package=TheBankOfRandomCredit.Authorizer&version=2.0.0
#tool nuget:?package=TheBankOfRandomCredit.Authorizer&version=2.0.0
This library provides a credit card purchase payment authorizer that randomly authorizes a payment (50/50), but only if the credit card number is a valid card number. If the class constructor is called without arguments it instantiates its own ICreditCardValidator. If it is called with an ICardValidator instance then it uses that. This scenario allows for a demonstration of dependcy injection without involving any other components.
When paired with the sister project Everyone Is Authorized Client both libraries may be used to create a scenario to demonstrate the problems of a tightly coupled dependency in a SalesOrderManager class. Use this to demonstrate dependency injection and the Adapter Pattern to decouple the authorization from the SalesOrderManager, and then allow for a test-double to be injected in their place. To setup this scenario use the default constructor for each class and ignore the internal card validation. In a real application the classes would not share the same validator interface, they only do in these libraries to help in the first scenario.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- WonderfulWidgets.CreditCardValidator (>= 2.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Changed interface and updated version number.