Repository navigation
The full list of changes in this release can be found in the GitHub compare view.
Highlights
New Csla.Avalonia package (#4880, #4887)
New Csla.Avalonia NuGet package bringing the CSLA XAML UI helpers to Avalonia. The package builds from the same Csla.Xaml.Shared code used by the WPF and MAUI packages, so PropertyInfo, PropertyStatus, ObjectStatus, CslaDataProvider, ViewModel<T>, and the related converters and behaviors are available to an Avalonia app, including broken rule display and authorization-driven enable/disable. A new Samples/AvaloniaExample solution demonstrates the pattern end to end. Csla.Avalonia ships alongside the other framework packages as of #4906.
New Csla.Testing package (#1225, #4882)
New Csla.Testing NuGet package, a home for supporting code that helps people write unit tests against their CSLA business code: business classes, business rules, authorization rules, and related types. The package is intended for use in test projects only; it is not required by, and is not intended for use in, production application code. This change stands up the project, packaging, and documentation. The helper types themselves are being added on top of this foundation. See Csla.Testing for details.
Test host and AddCslaTesting API (#4883)
Csla.Testing now provides a supported way to stand up CSLA in a unit test. CslaTestHost is a self-contained, disposable host that owns a configured service provider and hands back an ApplicationContext, an IDataPortal<T>, or an IChildDataPortal<T>; a fluent builder configures CSLA options, registers services such as fakes for your own dependencies, and sets the principal the test runs as. For a test that owns its own IServiceCollection, AddCslaTesting adds just the supporting services CSLA needs — a hosting environment, logging, and a context manager — and is purely additive, leaving the AddCsla call to you. The principal is configured declaratively, so it works through either entry point, and the context manager holds its state per async flow rather than in static fields, so tests are not forced to run serially. Neither API depends on a test framework. See Csla.Testing for details.
Rule testing helpers (#1225)
The Csla.Testing.Rules namespace adds BusinessRuleTester and AuthorizationRuleTester, fluent helpers that execute a single rule in isolation and return a result object to assert against. A single ExecuteAsync method runs synchronous and asynchronous rules alike, so a test no longer has to branch on whether the rule implements IBusinessRule or IBusinessRuleAsync (or IAuthorizationRule or IAuthorizationRuleAsync), and no hand-written ApplicationContext bootstrap is needed. Input values, the target object, the execution context mode, the principal, and CSLA options or services the rule resolves can all be configured through the builder. Also makes the AuthorizationContext constructor that accepts criteria public, so a rule that reads Criteria can be tested. See Csla.Testing for details.
Changes
Data Portal
- #4865 Support custom serializers for data portal criteria objects (#4890)
- #1707 Support multiple criteria parameters and method-level
[Inject]in theObjectFactorydata portal (#4868)
Business Object Model
Performance
- #4272 Improve
Cloneperformance; addsISerializationClonerand reduces allocations inObjectClonerandMobileFormatter(#4863)
Testing
- #4882 Add
Csla.Testing.Rules.RuleCacheto reset the per-type business and authorization rule caches between tests (#4886)
Bug Fixes
Security and Dependencies
- #4904 Reference a patched
System.Security.Cryptography.XmlinCsla.Channels.Wcf - #4907 Remove the vulnerable
Microsoft.Build.Tasks.Gitreference fromCsla.Web.Mvc(#4908) - #4870 Bump
CoreWCF.Primitivesfrom 1.8.0 to 1.8.1 - #4874 Update
Microsoft.Extensions.DependencyInjectionpackage references for the netstandard and net4x targets
Code Quality
- #4894 Migrate the test suite off the
TestDIContextshims (#4895) and remove them (#4896, #4897) - #4898 Clarify that
IMobileObjectMetastatecarries non-public state (#4901) - #4899 Recover the orphaned
MobileObjectMetastatetests (#4900) - #4856 Add regression tests for the
Requiredrule on value type properties (#4892) - #4902 Remove orphaned
packages.configfiles from the samples (#4903) - #4859 ProjectTracker: lift
TimeStampinto intermediate base classes - #4931 Update the samples to the CSLA 10.2.0 packages
Build and Release
- #4923 Build and ship
Csla.Mauifor 10.2.0 (#4926, #4927, #4928) - #4909 Publish NuGet packages using NuGet trusted publishing (OIDC) instead of a stored API key (#4910), gated by an approval-required
nuget-releaseenvironment (#4919, #4921) - #4914 Add the
v10.xmaintenance branch to CI and to the public release branches (#4916) - #4911 Add a script to unlist old prerelease packages on nuget.org (#4912)