Represents the NuGet versions.
- Enhancement: Moved existing reflection-based
JsonMergePatchtoExtended.JsonMergePatchEx; this remains theAddJsonMergePatchdefault implementation. - Enhancement: Added new
JsonMergePatchthat leveragesJsonElementandUtf8JsonWriterwithout underlying reflection; useful in scenarios where the value type is not known. This is also not as performant as the reflection-basedJsonMergePatchExversion and the primary reason why it is not the new default. - Enhancement: Refactored the
CosmosDbcapabilities such that theCosmosDbContainerandCosmosDbModelContainerare model type independent, with underlying type support implemented at the method level for greater flexibility and control. The typedCosmosDbContainer<T, TModel>etc. remain and are accessed from the type independent containers as required.- The existing
IMultiSetArgsoperations have been moved (and renamed) fromCosmosDbtoCosmosDbContainerandCosmosDbModelContaineras these are single container-specific. - The existing
CosmosDb.UseAuthorizeFilteroperations have been moved toCosmosDbContaineras these are single container-specific.
- The existing
- Enhancement: Added
Cleaner.PrepareCreateandCleaner.PrepareUpdateto encapsulateChangeLog.PrepareCreatedandChangeLog.PrepareUpdated, andCleaner.ResetTenantIdto ensure consistent handling throughout CoreEx. - Enhancement: Added
SystemTime.Timestampas the standard means to access the current timestamp (usesCleaner.Clean) to ensure consistency throughout CoreEx. Therefore, the likes ofDateTime.UtcNowshould be replaced withSystemTime.Timestamp. The previousExecutionContent.SystemTimehas been removed as it was not consistent with theExecutionContextpattern. - Enhancement: Updated the
IExtendedException.ShouldBeLoggedimplementations to checkSettingsBaseconfiguration to enable/disable. - Enhancement: Updated dependencies to latest; including transitive where applicable.
- Fixed: Missing
QueryArgs.IncludeTextadded to set the$text=trueequivalent. - Fixed: Simplification of creating and setting the
QueryArgs.Filterusing an implict string operator.
- Fixed: Added support for
SettingsBase.DateTimeTransform,StringTransform,StringTrimandStringCaseto allow specification via configuration. - Fixed: Added support for
CoreEx:hierarchy (optional) for all CoreEx settings to enable a more structured and explicit configuration.
- Enhancement: Integrated
UnitTestExversion5.0.0to enable the latest capabilities and improvements.CoreEx.UnitTesting.NUnitgiven changes is no longer required and has been deprecated, theUnitTestEx.NUnit(or other) must be explicitly referenced as per testing framework being used.CoreEx.UnitTestingpackage updated to include only standard .NET core capabilities to follow newUnitTestExpattern; new packages created to house specific as follows:CoreEx.UnitTesting.Azure.Functionscreated to house Azure Functions specific capabilities;CoreEx.UnitTesting.Azure.ServiceBuscreated to house Azure Service Bus specific capabilities.
- Existing usage will require references to the new packages as required. There should be limited need to update existing tests to use beyond the requirement for the root
UnitTestExnamespace. The updated default withinUnitTestExis to expose the key capabilities from the root namespace. For example,using UnitTestEx.NUnit, should be replaced withusing UnitTestEx.
- Enhancement: Added
net9.0support. - Enhancement: Deprecated
net7.0support; no longer supported by Microsoft. - Enhancement: Updated dependencies to latest; including transitive where applicable.
- Enhancement: Added extended capabilities to the
InvokeArgsto allow additional customization.
- Fixed: The
ExecutionContext.Messageswere not being returned as intended within thex-messagesHTTP Response header; enabled within theExtendedStatusCodeResultandExtendedContentResulton success only (status code>= 200and<= 299). Note these messages are JSON serialized as the underlyingMessageItemCollectiontype. - Fixed: The
AgentTesterhas been updated to return aHttpResultAssertorwhere the operation returns aHttpResultto enable further assertions to be made on theResultitself.
- Fixed: The
IServiceCollection.AddCosmosDbextension method was registering as a singleton; this has been corrected to register as scoped. The dependentCosmosClientshould remain a singleton as is best practice.
- Fixed: Updated
Microsoft.Extensions.Caching.Memorypackage depenedency to latest (including related); resolve Microsoft Security Advisory CVE-2024-43483. - Fixed: Fixed the
ExecutionContext.UserIsAuthorizedto have base implementation similar toUserIsInRole. - Fixed: Rationalize the
UtcNowusage to be consistent, where applicableExecutionContext.SystemTime.UtcNowis leveraged.
- Fixed: The
ValueContentResult.TryCreateValueContentResultwould returnNotModifiedwhere the requestETagwasnull; this has been corrected to returnOKwith the resultingvalue. - Fixed: The
ValueContentResult.TryCreateValueContentResultnow returnsExtendedStatusCodeResultversusStatusCodeResultas this offers additional capabilities where required. - Enhancement: The
ExtendedStatusCodeResultandExtendedContentResultnow implementIExtendedActionResultto standardize access to theBeforeExtensionandAfterExtensionfunctions. - Enhancement: Added
WebApiParam.CreateActionResulthelper methods to enable execution of the underlyingValueContentResult.CreateValueContentResult(which is no longer public as this was always intended as internal only). - Fixed:
PostgresDatabase.OnDbExceptioncorrected to usePostgresException.MessageTextversusMessageas it does not include theSQLSTATEcode. - Enhancement: Improve debugging insights by adding
ILogger.LogDebugstart/stop/elapsed for theInvokerArgs. - Fixed: Updated
System.Text.Jsonpackage depenedency to latest (including related); resolve Microsoft Security Advisory CVE-2024-43485.
- Enhancement: Enable JSON serialization of database parameter values; added
DatabaseParameterCollection.AddJsonParametermethod and associatedJsonParam,JsonParamWhenandJsonParamWithextension methods. - Enhancement: Updated (simplified)
EventOutboxEnqueueBaseto pass events to the underlying stored procedures as JSON versus existing TVP removing database dependency on a UDT (user-defined type). - Note: Accidently published as
v3.25.6, re-publishing asv3.26.0as intended - includes no code changes.
- Fixed: Fixed the unit testing
CreateServiceBusMessageextension method so that it no longer invokes aTesterBase.ResetHost(this reset should now be invoked explicitly by the developer as required).
- Fixed: Fixed the
InvalidOperationExceptionwith a 'Sequence contains no elements' when performing validation with theCompareValuesRulethat has theOverrideValueset. - Fixed: Updated all dependencies to latest versions.
- Fixed: Added function parameter support for
WithDefault()to enable runtime execution of the default statement where required for the query filter capabilities.
- Fixed:
HttpRequestOptions.WithQueryfixed to ensure any previously setIncludeandExcludefields are not lost (results in a merge); i.e. only theFilterandOrderByproperties are explicitly overridden.
- Fixed: Extend
QueryFilterFieldConfigBaseto includeAsNullable()to specifiy whether the field supportsnull. - Fixed: Extend
QueryFilterFieldConfigBaseto includeWithResultWriter()to specify a function to override the corresponding LINQ statement result writing. - Fixed: Adjusted the fluent-style method-chaining interface to improve usability (and consistency).
- Enhancement: Added new
CoreEx.Dataproject/package to encapsulate all generic data-related capabilities, specifically the newQueryFilterParserandQueryOrderByParserclasses. These enable a limited, explicitly supported, dynamic capability to$filterand$orderbyan underlying query similar to OData. This is not intended to be a replacement for the full capabilities of OData, GraphQL, etc. but to offer basic dynamic flexibility where needed.- Added
IQueryable<T>.Where()andIQueryable<T>.OrderByextension method that will use the aforementioned parsers configured within the newQueryArgsConfigandQueryArgsand apply leveragingSystem.Linq.Dynamic.Core. - Updated
HttpRequestOptionsandWebApiRequestOptionsto supportQueryArgs($filterand$orderbyquery string arguments) similar to the existingPagingArgs. - Added
QueryAttributeto enable Swagger/Swashbuckle generated documentation.
- Added
- Fixed: Fixed missing
IServiceCollection.AddCosmosDbincluding correspondingCosmosDbHealthCheck. - Fixed: Added
JsonIgnoreto all interfaces that have aCompositeKeyproperty as not intended to be serialized by default. - Fixed: Fixed
ReferenceDataCollectionBase<TId, TRef, TSelf>constructor which was hidingsortOrderandcodeComparerparameters.
- Fixed:
CosmosDb.SelectMultiSetWithResultAsyncupdated to skip items that are not considered valid; ensures same outcome as if using aCosmosDbModelQueryBasewith respect to filtering.
- Enhancement:
CosmosDb.SelectMultiSetWithResultAsyncandSelectMultiSetAsyncadded to enable the selection of multiple sets of data in a single operation; see alsoMultiSetSingleArgsandMultiSetCollArgs. - Enhancement:
CosmosDbValue.Typeis now updatable and defaults fromCosmosDbValueModelContainer<TModel>.TypeName(updateable usingUseTypeName).
- Fixed:
CosmosDbValue<TModel>.PrepareBeforecorrected to set thePartitionKeywhere the underlyingValueimplementsIPartitionKey. - Fixed:
CosmosDbBatchcorrected to default to theCosmosDbContainerBase<TSelf>.DbArgswhere not specified. - Fixed:
CosmosDbArgs.AutoMapETagadded, indicates whether when mapping the model to the corresponding entity that theIETag.ETagis to be automatically mapped (default istrue, existing behavior).
- Fixed: Added
Result<T>.AdjustsAsyncto support asynchronous adjustments.
- Fixed: Added
Result<T>.Adjustsas wrapper forObjectExtensions.Adjustto simplify support and resolve issue where the compiler sees the adjustment otherwise as a implicit cast resulting in an errant outcome.
- Fixed:
DatabaseExtendedExtensions.DeleteWithResultAsynccorrected to return aTask<Result>.`
- Fixed: Updated all dependencies to latest versions (specifically UnitTestEx).
- Enhancement: Added
ICacheKeyand updatedRequestCacheaccordingly to support, in addition to the existingIEntityKey, to enable additional caching key specification. - Enhancement: Added
ItemKeySelectortoEntityBaseDictionaryto enable automatic inference of the key from an item being added. - Fixed: Updated all dependencies to latest versions.
- Enhancement: Identifier parsing and
CompositeKeyformatting moved to theCosmosDbArgsto enable overriding where required. - Enhancement: Cosmos model constraint softened to allow for
IEntityKeyto support more flexible identifier scenarios. - Enhancement: All Cosmos methods updated to support
CompositeKeyversusobjectfor identifier specification for greater flexibility. - Enhancement:
CosmosDbModelContainerandCosmosDbValueModelContainerenable model-only access; also, all model capabilities housed under newModelnamespace. - Fixed:
PagingOperationFiltercorrectly specifies a format ofint64for thenumber-type paging parameters. - Fixed:
CompositeKeycorrectly supportsIReferenceDatatypes leveraging the underlyingIReferenceData.Code.
- Fixed:
Mapper.MapSameTypeWithSourceValueadded (defaults totrue) to map the source value to the destination value where the types are the same; previously this would result in an exception unless added explicitly. TheMapper.SameTypeMapperenables. - Fixed:
ReferenceDataOrchestrator.GetAllTypesInNamespaceadded to get all theIReferenceDatatypes in the specified namespace. Needed for the likes of theCosmosDbBatch.ImportValueBatchAsyncwhere a list of types is required.
- Enhancement:
CoreEx.Cosmosimprovements:- Added
CosmosDbArgstoCosmosDbContainerBaseto allow per container configuration where required. - Partition key specification centralized into
CosmosDbArgs. ITenantIdandILogicallyDeletedsupport integrated intoCosmosDbContainerBase, etc. to offer consistent behavior withEfDb.
- Added
- Fixed: Include all constructor parameters when using
AddReferenceDataOrchestrator. - Enhancement: Integrated dynamic
ITenantIdfiltering intoEfDb(controlled withEfDbArgs).
- Fixed: Updated all dependencies to latest versions.
- Enhancement: Added
DatabaseCommand.SelectAsyncandSelectWithResultAsyncthat has no integrated typing and mapping.
- Fixed: The
ITypedMappedHttpClient.MapResponsewas not validating the input HTTP response correctly before mapping; resulted in anullsuccess value versus the originating error/exception. - Fixed: The
HttpResult<T>.ThrowOnErrorwas not correctly throwing the internal exception.
- Fixed: Removed
Azure.Identitydependency as no longer required; related tohttps://github.com/advisories/GHSA-wvxc-855f-jvrv. - Fixed: Removed
AspNetCore.HealthChecks.SqlServerdependency as no longer required. - Fixed: Updated all dependencies to latest versions.
- Fixed:
CoreEx.AutoMapperupdated to leverage latest major version (13.0.1); as suchnetstandardno longer supported. - Fixed: The
TimerHostedServiceBasewas incorrectly resetting theLastExceptionon sleep versus wake. - Fixed: The
AddEventSenderdependency injection extension methods now correctly register as Scoped. - Fixed: The
Logger.LogInformationinvocations refactored toLogger.LogDebugwhere applicable to reduce noise in the logs. - Fixed: The
IPropertyRule.ValidateAsyncmethod removed as it was not required and could lead to incorrect usage. - Fixed: The
ValueValidatornow only supports aConfiguremethod to enableIPropertyRule-based configuration (versus directly). - Fixed: The
CommonValidator.ValidateAsyncis now internal as this was not intended and could lead to incorrect usage. - Enhancement: Added
AfterSendevent toIEventSenderto enable post-send processing. - Enhancement: Added
EventOutboxHostedService.OneOffTriggermethod to enable a one-off trigger interval to be specified for the registered (DI) instance.
- Enhancement: Additional
CoreEx.Validationusability improvements:Validator.CreateFor<T>added to enable the creation of aCommonValidator<T>instance for a specified typeT(more purposeful name); synonym for existingCommonValidator.Create<T>(unchanged).Validator.Null<T>added to enable simplified specification of aIValidatorEx<T>ofnullto avoid explicitnullcasting.Collectionextension method has additional overload to pass in theIValidatorEx<TItem>to use for each item in the collection; versus, having to useCollectionRuleItem.Create.Dictionaryextension method has additional overload to pass in theIValidatorEx<TKey>andIValidator<TValue>to use for each entry in the dictionary; versus, having to useDictionaryRuleItem.Create.MinimumCountandMaximumCountextension methods forICollectionadded to enable explicit specification of these two basic validations.Validation.CreateCollectionrenamed toValidation.CreateForCollectionand creates aCommonValidator<TColl>.- Existing
CollectionValidatordeprecated as theCommonValidator<TColl>offers same; removes duplication of capability.
- Existing
Validation.CreateDictionaryrenamed toValidation.CreateForDictionaryand creates aCommonValidator<TDict>.- Existing
DictionaryValidatordeprecated as theCommonValidator<TDict>offers same; removes duplication of capability.
- Existing
- Enhancement: Added
ServiceBusReceiverHealthCheckto perform a peek message on theServiceBusReceiveras a means to determine health. UseIHealthChecksBuilder.AddServiceBusReceiverHealthCheckto configure. - Fixed: The
FileLockSynchronizer,BlobLeaseSynchronizerandTableWorkStatePersistencehave had any file/blob/table validations/manipulations moved from the constructor to limit critical failures at startup from a DI perspective; now only performed where required/used. This also allows improved health check opportunities as means to verify.
- Enhancement: Added basic FluentValidator compatibility to the
CoreEx.Validationby supporting key (common) named capabilities:AbstractValidator<T>added as a wrapper forValidator<T>; with both supportingRuleFormethod (wrapper for existingProperty).NotEmpty,NotNull,Empty,Null,InclusiveBetween,ExclusiveBetween,Equal,NotEqual,LessThan,LessThanOrEqualTo,GreaterThan,GreaterThanOrEqualTo,Matches,Length,MinimumLength,MaximumLength,PrecisionScale,EmailAddressandIsInEnumextension methods added (invoking existing equivalents).NullRuleandNotNullRuleadded to support theNullandNotNullcapabilities specifically.WithMessageadded to explcitly set the error message for a preceedingIValueRule(equivalent to specifying when invoking extension method).ValidatorStringshave had their fallback texts added to ensure an appropriate text is output whereITextProvideris not available.- Note: The above changes are to achieve a basic level of compatibility, they are not intended to implement the full capabilities of FluentValidation; nor, will it ever. The
CoreEx.FluentValidationenables FluentValidation to be used directly where required; also, the existingCoreEx.Validation.InteropRuleenables interoperability between the two.
- Enhancement: Added
StringSyntaxAttributesupport to improve intellisense for JSON and URI specification. - Enhancement: Added
EventPublisherHealthCheckthat will send anEventDatamessage to verify that theIEventPublisheris functioning correctly.- Note: only use where the corresponding subscriber(s)/consumer(s) are aware and can ignore/filter to avoid potential downstream challenges.
- Enhancement: This is a clean-up version to remove all obsolete code and dependencies. This will result in a number of minor breaking changes, but will ensure that the codebase is up-to-date and maintainable.
- As per
v3.14.0the previously obsoletedTypedHttpClientBasemethodsWithRetry,WithTimeout,WithCustomRetryPolicyandWithMaxRetryDelayare now removed; includingTypedHttpClientOptions,HttpRequestLoggerand relatedSettingsBasecapabilities. - Health checks:
CoreEx.Azure.HealthChecksnamespace and classes removed.SqlServerHealthCheckreplaced with simple genericDatabaseHealthCheck.IServiceCollection.AddDatabaseautomatically addsDatabaseHealthCheck.IServiceCollection.AddSqlServerEventOutboxHostedServiceautomatically addsTimerHostedServiceHealthCheck.IServiceCollection.AddReferenceDataOrchestratorautomatically addsReferenceDataOrchestratorHealthCheck(reports cache statistics).HealthReportStatusWriteradded to support richer JSON reporting.- Generally recommend using 3rd-party library to enable further health checks; for example:
https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks.
- As per
- Fixed: The
Result.ValidatesAsyncextension method signature has had the value nullability corrected to enable fluent-style method-chaining. - Fixed: The fully qualified type and property name is now correctly used as the
LText.KeyAndOrTextwhen creating within thePropertyExpression<TEntity, TProperty>to enable a qualified key that can be used by theITextProviderto substitute the text at runtime; the existing text fallback behavior remains such that an appropriate text is used. ThePropertyExpression.CreatePropertyLTextKeyfunction can be overridden to change this behavior.
- Enhancement: Planned feature obsoletion. The
TypedHttpClientBasemethodsWithRetry,WithTimeout,WithCustomRetryPolicyandWithMaxRetryDelayare now marked as obsolete and will result in a compile-time warning. RelatedTypedHttpClientOptions,HttpRequestLoggerandSettingsBasecapabilities have also been obsoleted.- Why? Primarily based on Microsoft guidance around
IHttpClientFactoryusage. Specifically advances in native HTTP resilency support, and the .NET 8 networking improvements. - When? Soon, planned within the next minor release (
v3.15.0). This will simplify the underlyingTypedHttpClientBaselogic and remove the internal dependency on an older version of the Polly package. - How? Review the compile-time warnings, and update the codebase to use the native
IHttpClientFactoryresiliency capabilities.
- Why? Primarily based on Microsoft guidance around
- Enhancement: Updated
CoreEx.UnitTestingto leverage the latestUnitTestEx(v4.2.0) which has added support for testingHttpMessageHandlerandHttpClientconfigurations. This will enable improved mocked testing as a result of the above changes where applicable. - Enhancement: Added
CustomSerializersproperty toIEventSerializerof typeCustomEventSerializers. This allows for the add (registration) of custom JSON serialization logic for a specifiedEventData.Valuetype. This is intended to allow an opportunity to serialize a specific type in a different manner to the default JSON serialization; for example, exclude certain properties, or use a different serialization format. - Enhancement: Updated the unit testing
ExpectedEventPublisherso that it now executes the configuredIEventSerializerduring publishing. A newUnitTestBase.GetExpectedEventPublisherextension method added to simplify access to theExpectedEventPublisherinstance and correspondingGetPublishedEventsproperty to enable further assert where required.
- Enhancement: Added
DatabaseMapperExenabling extended/explicit mapping where performance is critical versus existing that uses reflection and compiled expressions; can offer up to 40%+ improvement in some scenarios. - Enhancement: The
AddMappers<TAssembly>()andAddValidators<TAssembly>()extension methods now also support two or three assembly specification overloads. - Enhancement: A
WorkState.UserNamehas been added to enable the tracking of the user that initiated the work; this is then checked to ensure that only the initiating user can interact with their own work state. - Fixed: The
ReferenceDataOrchestrator.GetByTypeAsynchas had the previous sync-over-async corrected to be fully async. - Fixed: Validation extensions
ExistsandExistsAsyncwhich expect a non-null resultant value have been renamed toValueExistsandValueExistsAsyncto improve usability; also they areIResultaware and will act accordingly. - Fixed: The
ETagHTTP handling has been updated to correctly output and expect the weakW/"xxxx"format. - Fixed: The
ETagGeneratorimplementation has been further optimized to minimize unneccessary string allocations. - Fixed: The
ValueContentResultwill only generate a response header ETag (ETagGenerator) for aGETorHEADrequest. The underlying resultIETag.ETagis used as-is where there is no query string; otherwise, generates as assumes query string will alter result (i.e. filtering, paging, sorting, etc.). The resultIETag.ETagis unchanged so the consumer can still use as required for a further operation. - Fixed: The
SettingsBasehas been optimized. The internal recursion checking has been removed and as such an endless loop (StackOverflowException) may occur where misconfigured; given frequency ofIConfigurationusage the resulting performance is deemed more important. Additionally,prefixesare now optional.- The existing support of referencing a settings property by name (
settings.GetValue<T>("NamedProperty")) and it using reflection to find before querying theIConfigurationhas been removed. This was not a common, or intended usage, and was somewhat magical, and finally was non-performant.
- The existing support of referencing a settings property by name (
- Enhancement: Added new
CoreEx.Database.Postgresproject/package to support PostgreSQL database capabilities. Primarily encapsulates the open-sourceNpqsql.NET ADO database provider for PostgreSQL.- Added
EncodedStringToUInt32Converterto support PostgreSQLxmincolumn encoding as the row version/etag.
- Added
- Enhancement: Migrated sentence case logic from inside
PropertyExpressionintoCoreEx.Text.SentenceCaseto improve discoverablity and reuse opportunities. - Fixed: The
IServiceCollection.AddAzureServiceBusClientextension method as been removed; theServiceBusClientwill need to be instantiated prior to usage. Standard approach is for consumers to create client instances independently. - Fixed: The
WorkOrchestrator.GetAsync<T>()andWorkOrchestrator.GetAsync(string type, ..)methods were not automatically cancelling where expired. - Fixed: The
InvokerArgsactivity tracing updated to correctly capture theException.Messagewhere anExceptionhas been thrown. - Internal:
- All
throw new ArgumentNullExceptionchecking migrated to thexxx.ThrowIfNullextension method equivalent. - All Run Code Analysis issues resolved.
- All
- Enhancement: The
ITypedToResultupdated to correctly implementIToResultas the simpleToResultwhere required. - Enhancement: Added
Result.AsTask()andResult<T>.AsTaskto simplify the conversion to a completedTask<Result>orTask<Result<T>>where applicable. - Enhancement: Added
IResult.IsFailureOfType<TException>to indicate whether the result is in a failure state and the underlying error is of the specifiedTExceptiontype. - Enhancement: Added
EventTemplateproperty to theWebApiPublisherArgsandWebApiPublisherCollectionArgsto define anEventDatatemplate. - Enhancement: Added
SubscriberBase<T>constructor overload to enable specification ofvalueValidatorandValueIsRequiredparameters versus setting properties directly simplifying usage. - Enhancement: Enum renames to improve understanding of intent for event subscribing logic:
ErrorHandling.Noneis nowErrorHandling.HandleByHostandErrorHandling.Handleis nowErrorHandling.HandleBySubscriber. - Enhancement: Simplified the
ServiceBusSubscriber.Receivemethods by removing theafterReceiveparameter which served no real purpose; also, reversed thevalidatorandvalueIsRequiredparameters (order as stated) as thevalidatoris more likely to be specified thanvalueIsRequiredwhich defaults totrue. - Enhancement: Added
CoreEx.Hosting.Worknamespace which includes light-weight/simple foundational capabilities to track and orchestrate work; intended for the likes of asynchronous request-response scenarios.- Added
IWorkStatePersistenceto enable flexible/pluggable persistence of theWorkStateand resulting data; includesInMemoryWorkStatePersistencefor testing,FileWorkStatePersistencefor file-based, andTableWorkStatePersistenceleveraging Azure table storage. - Added
WorkStateOrchestratorsupport toEventSubscriberBase, including correspondingServiceBusSubscriberandServiceBusOrchestratedSubscriberusing theServiceBusMessage.MessageIdas the correspondingWorkState.Id. - Extended
EventSubscriberArgsto support a newSetWorkStateDataAsyncoperation to enable the setting of the underlyingWorkStatedata is a consistent manner where using the event subscriber capabilities.
- Added
- Enhancement: The
WebApiPublisherpublishing methods have been simplified (breaking change), primarily through the use of a new argument that encapsulates the various related options. This will enable the addition of further options in the future without resulting in breaking changes or adding unneccessary complexities. The relatedREADMEhas been updated to document. - Enhancement: Added
ValidationUseJsonNamestoSettingsBase(defaults totrue) to allow settingValidationArgs.DefaultUseJsonNamesto be configurable.
- Enhancement: A new
Abstractions.ServiceBusMessageActionshas been created to encapsulate either aMicrosoft.Azure.WebJobs.ServiceBus.ServiceBusMessageActions(existing in-process function support) orMicrosoft.Azure.Functions.Worker.ServiceBusMessageActions(new isolated function support) and used internally. Implicit conversion is enabled to simplify usage; existing projects will need to be recompiled. The latter capability does not supportRenewAsyncand as such this capability is no longer leveraged for consistency; review documentedPeekLockbehavior to get desired outcome. - Enhancement: The
Result,Result<T>,PagingArgsandPagingResulthave hadIEquatableadded to enable equality comparisons. - Enhancement: Upgraded
UnitTestExdependency to4.0.2to enable isolated function testing. - Enhancement: Enabled
IJsonSerializersupport forCompositeKeyJSON serialization/deserialization. - Enhancement: Added
IEventDataFormatterwhich when implemented by the value set as theEventData.Valueallows additional formatting to be applied by theEventDataFormatter. - Enhancement: Added
IsMapNullIfNulltoBidirectionalMapperthat indicates whether to mapnullsource value to a correspondingnulldestination automatically. - Fixed: Added
ReferenceDataMultiDictionaryConverterFactoryto ensure eachIReferenceDataCollectionis serialized correctly according to its underlying type. - Fixed:
EventDataFormatterandCloudEventSerializerBaseupdated to correctly set theKeyproperty where applicable. - Internal: Upgraded
NUnitdependency to4.0.1for allCoreExunit test; also, all unit tests now leverage the NUnit constraint model testing approach.
- Fixed: The
CoreEx.Text.JsonSerializerhas been updated to cache the indented option correctly. - Fixed: The
ReferenceDataOrchestatorupdated to use the correct serializer forETaggeneration.
- Enhancement: The
ValueContentResult.CreateResulthas been updated to return the resulting value as-is where is an instance ofIActionResult; otherwise, convertsvalueto aValueContentResult(previous behavior). - Enhancement: The
PagingArgshas been extended to supportToken; being a continuation token to enable paging to be performed where the underlying data source does not support skip/take-style paging.
- Fixed: The
ReferenceDataMultiCollectionandReferenceDataMultiItemhave been replaced with theReferenceDataMultiDictionaryas existing resulted in an unintended format with which to return the data. This fix also removed the need for theReferenceDataMultiCollectionConverterFactoryas custom serialization for this is no longer required.
- Fixed: The
WebApi.PutWithResultAsyncmethods that supportgetfunction parameter have had the result nullability corrected. - Fixed: The
BidirectionalMapper<TFrom, TTo>has been added to further simplify the specification of a bidirectional mapping capability.
- Enhancement: The
Mapper<TSource, TDestination>has a new constructor override to enable the specification of the mapping (OnMapequivalent) logic. - Enhancement: The
Mapperhas hadWhen*helper methods added to aid the specification of the mapping logic depending on theOperationTypes(singular) being performed. - Enhancement: A new
NoneRulevalidation has been added to ensure that a value is none (i.e. must be its default value).
- Fixed: All related package dependencies updated to latest.
- Enhancement: Added
Converter.Create<TSource, TDestionation>to enable a simple one-offIConverter<TSource, TDestionation>implementation to be created. - Fixed: The
IReferenceData.SetInvalidmethod corrected to throwNotImplementedExceptionwhere not explicitly implemented. - Fixed: The
ReferenceDataBaseupdated to handle theIsValidandSetInvalidfunctionality correctly.
- Enhancement: Added
IBidirectionalMapper<TFrom, TTo>to enable a single mapping capability that can support mapping both ways. - Enhancement: Added
IBidirectionalMapper<TFrom, TTo>registration support toMapper.Registerand by extensionIServiceCollection.AddMappings. - Enhancement: Finalized initial capabilities for
CoreEx.OData; package now published.
- Enhancement:
UnitTestExas ofv4.0.0removed all dependencies toCoreEx, breaking a long-time circular reference challenge. Added extension capabilities to enable existing behaviors. These extensions have been added withinCoreEx.UnitTestingandCoreEx.UnitTesting.NUnitrespectively; usingUnitTestExnamespace to minimize breaking changes and clearly separate. The following will need to be corrected where applicable:- Add
UnitTestExnamespace where missing to enable new extension methods. - Replace existing
TestSetUp.Default.ExpectedEventsEnabled = truewithTestSetUp.Default.EnableExpectedEvents(); changed to a method as extension properties are not currently supported in C#. - Replace existing
TestSetUp.Default.ExpectNoEvents = truewithTestSetUp.Default.ExpectNoEvents(); changed to a method as extension properties are not currently supported in C#. - The existing
ApiTester.Agentproperty has had to be made an extension method as follows:- Before:
test.Agent<ContactAgent, Contact>().Expect... - After:
test.Agent().With<ContactAgent, Contact>().Expect...
- Before:
- The
ValidationTesterhas not been ported; but has been implemented using extension methods on theGenericTesteras follows:- Before:
ValidationTester.Create().ExpectErrors("").Run<XxxValidator, Xxx>(x); - After:
GenericTester.Create().ExpectErrors("").Validation().With<XxxValidator, Xxx>(x);
- Before:
- Add
- Enhancement: Added
net8.0support.
- Enhancement: Update the
JsonFiltererclasses to support qualified (indexed) property names; all paths are standardized with the$prefix internally. - Enhancement: Added
JsonNodeextension methodsApplyIncludeandApplyExcludeto simplify correspondingJsonFiltererusage. - Enhancement: Added
JsonElementComparerto compare twoJsonElementvalues (and typed values) and return the differences (JsonElementComparerResult). Additionally, theJsonElementComparerResult.ToMergePatchwill create a correspondingJsonNodethat represents anapplication/merge-patch+jsonrepresentation of the differences. - Enhancement: Added
DateTimeToStringConverterto enable the explicit formatting of aDateTimeto astringand vice-versa. - Enhancement: Added
JsonObjectMapperto enable explicit mapping of aType(class) to aJsonObjectand vice-versa (versus serialization). This enables property conversion, mapping and operation types to be specified, similar to other CoreEx mapping capabilities. - Enhancement: Renamed
WebApiPublisher.PublishAsync<TColl, TItem>toWebApiPublisher.PublishCollectionAsync<TColl, TItem>to be more explicit with respect to purpose and usage. - Enhancement: The
WebApiPublisher.PublishAsynchas had theeventModifierdelegate parameter simplified to no longer include a value as this is already available via theValueproperty of the existingEventDataparameter. - Enhancement: Added additional overloads to
WebApiPublisher.PublishAsyncandWebApiPublisher.PublishCollectionAsyncto support the event publishing of a different (mapped) type where applicable; seeeventModifierdelegate parameter. Additionally, supportsWebApiPublisher.Mapperto convert/map by default where applicable. - Fixed: The
Result.OnFailure*methods corrected to pass in theErrorversus theValue(previously throwing incorrect exception as a result). - Enhancement: Added new
CoreEx.ODataproject/package to support OData capabilities. Primarily encapsulates the open-sourceSimple.OData.Client.- Note: this package has not been published as this is currently considered experimental; is subject to future change and/or removal.
- Enhancement: Added new
CoreEx.Dataverseproject/package to support Microsoft Dataverse (formerly known as Common Data Service or CDS) capabilities. Primarily encapsulates theServiceClientand mappings to/from the Dataverse entities.- Note: this package has not been published as this is currently considered experimental; is subject to future change and/or removal.
- Fixed: The
IEfDb.Withfixed (as extension methods) to also support thewithvalue being passed into the correspondingAction<T>to simplify usage (only a subset of common intrinsic types supported, both nullable and non-nullable overloads). - Fixed: Missing
Result.CacheSetandResult.CacheRemoveextension methods added toCoreEx.Resultsto fully enableIRequestCachingin addition to existingResult.CacheGetOrAddAsync.
- Enhancement: Added
IEventSubscriberInstrumentation(and relatedEventSubscriberInstrumentationBase) to enableEventSubscriberBase.Instrumentationmonitoring of the subscriber as applicable. - Enhancement: Previous
EventSubscriberInvokerexception/error handling moved into individual subscribers for greater control; a newErrorHandleradded to encapsulate the consistent handling of the underlying exceptions/errors. This was internal and should have no impact. - Enhancement:
ErrorHandling.ThrowSubscriberExceptionrenamed toHandleandErrorHandling.TransientRetryrenamed toRetry. Old names have been obsoleted and as such will generate a compile-time error where not corrected. - Enhancement: Added
DataConsistencyExceptionto support the throwing of possible data consistency issues; internally integrated throughout CoreEx. - Enhancement: Added
IDatabase.SqlFromResourcesupport to enable simple access to SQL statements embedded as a resource within a specified assembly. - Enhancement:
Result.When*methods updated to support optionalotherwisefunction to enableif/then/elsescenarios (only invoked whereResult.IsSuccess).
- Fixed:
ServiceBusSubscriberwas not correctly bubbling (not handling) exceptions whereUnhandledHandlingwas set toErrorHandling.None. Was incorrectly treating same asErrorHandling.ThrowSubscriberExceptionand automatically dead-lettering and continuing.
- Enhancement: Distributed tracing has been added via the
InvokerBaseset of classes throughoutCoreExto ensure coverage and consistency of implementation. A newInvokeArgshas been added to house theActivitySourceinstance; this also provides for further extension opportunities limiting future potential breaking changes.
- Enhancement: Added
ServiceBusReceiverActionsas a means to encapsulate theServiceBusReceivedMessageandServiceBusReceiveras aServiceBusMessageActionsequivalent to enable both theServiceBusSubscriberandServiceBusOrchestratedSubscriberto be leveraged outside of native Azure Functions. - Enhancement: Added support for claim-check pattern for large messages.
EventData.Valueserialization to be stored as an attachment in the likes of blob storage and then referenced (claim-check) from the actual message. A newIAttachmentStorageencapsulates the attachment behavior with theIEventSerializerimplementations referencing as applicable; whereby separating this behavior from theIEventSenderenabling greater consistency and reuse. AddedBlobAttachmentStorageandBlobSasAttachmentStorageto support Azure blob storage.
- Fixed: The
DatabaseParameterCollection.AddParameternow explicitly sets theDbParameter.ValuetoDbNull.Valuewhere the value passed in isnull.
- Enhancement: Added
Hosting.ServiceBaseclass for a self-orchestrated service to execute for a specifiedMaxIterations; provides an alternative to using aHostedService. Useful for the likes of timer trigger Azure Functions for eample. - Enhancement: Added
EventOutboxServiceas an alternative toEventOutboxHostedService; related to (and leverages) above to achieve same outcome. - Fixed:
Database.OnDbExceptionwas incorrectly converting the unhandled exception to aResult; will now throw as expected.
- Enhancement: Added new
CoreEx.Resultsnamespace with primaryResultandResult<T>classes to enable monadic error-handling, often referred to Railway-oriented programming; seeCoreEx.Resultsfor more implementation details. Thanks Adi for inspiring and guiding on this change. Related changes as follows:- Enhancement:
EventSubscriberBase,SubscriberBaseandSubscriberBase<T>modified to includeEventSubscriberArgs(Dictionary<string, object?>) to allow other parameters to be passed in. TheReceiveAsyncmethods now support the args as a parameter, and must return aResultto better support errors; breaking change. - Enhancement: Where overriding
Validator.OnValidateAsyncthis method must return aResult, as does theCustomRule(for consistency); breaking change. TheResultenables other errors to be returned avoiding the need/cost to throw an exception. - Enhancement:
ExecutionContextuser authorization methods have been renamed (UserIsAuthorizedandUserIsInRole) and explicitly leverageResult; breaking change. - Enhancement:
IReferenceDataProvider.GetAsyncmethod now supports a return type ofResult<T>; breaking change.
- Enhancement:
- Enhancement: The
WebApinamespace has been moved to a newCoreEx.AspNetCoreproject/package to decouple these explicit ASP.NET Core capabilities from the core; breaking change.- The
IExceptionResultinterface has been deprecated as a result; all exceptions have been updated accordingly.
- The
- Fixed: Validation extension method
EnsureValuehas been renamed toRequiredto be more explicit as to purpose; breaking change. - Fixed:
InvokerBaseandInvokerBase<TResult>now split sync and async code to avoid sync over async; requires both the sync and async virtual methods to be overridden to implement correctly. - Enhancement: Ad-hoc performance optimizations; some minor breaking changes primarily impacting internal usage.
- Enhancement: Added
net6.0andnet7.0support in addition to .NET Standard to all packages. This will allow access to additional features per version where required, and overall performance improvements. - Enhancement: Added
CoreEx.Solaceto enable the publishing of messages to Solace message broker; thanks Israel. - Enhancement: Updated
CoreEx.Cosmosto support direct model queries usingModelQuerymethods where applicable. - Enhancement: Added
PagingOperationFilterFieldsto allow specific selection of fields for thePagingOperationFilter. This was influenced by pull request 67.
- Fixed:
EventOutboxHostedServiceupdated so when a newIServiceScopeis created thatExecutionContext.Resetis invoked to ensure existingServiceProvideris not reused. - Fixed:
EventDataFormatterdefaultsPartitionKeyandTenantIdproperties, where not already set, from the value where implementsIPartitionKeyandITenantIdrespectively.
- Enhancement: Added
IServiceBusSubscriberwith following properties:AbandonOnTransient(perform an Abandon versus bubbling exception),MaxDeliveryCount(max delivery count check within subscriber),RetryDelay(basic transient retry specification) andMaxRetryDelay(defines upper bounds of retry delay). These are defaulted from correspondingIConfigurationsettings. Both theServiveBusSubscriberandServiveBusOrchestratedSubscriberimplement; related logic withinServiceBusSubscriberInvoker. - Enhancement: Added
RetryAfterSecondstoTransientExceptionto allow overriding; defaults to120seconds. - Fixed: Log output from subscribers will no longer write exception stack trace where known
IExtendedException(noise reduction). - Fixed:
ValidationExceptionmessage reformatted such that newlines are no longer included (message simplification).
- Fixed: The dead-lettering within
ServiceBusSubscriberInvokerwill write the exception stack trace, etc. to a new message property namedSubscriberExceptionto ensure this content is consistently persisted, with related error description being the exception message only.
- Enhancement: Added
PagingAttributeandPagingOperationFilterto enable swagger output ofPagingArgsparameters for an operation.
- Enhancement: Added
CoreEx.EntityFrameworkCoresupport for .NET frameworknet7.0. - Enhancement: Updated
ServiceBusSubscriberInvokerto improve logging, including opportunities to inherit and add further before and after processing logging and/or monitoring. - Enhancement: Updated
ServiceBusOrchestratedSubscriberto perform aLogInformationon success. - Enhancement: The
TypedHttpClientBase<TSelf>will probe settings byGetType().Nameto enable settings per implementation type as an overridding configurable option. - Fixed:
HttpResult.CreateExtendedExceptionpasses innerHttpRequestExceptionfor context. - Fixed:
EventSubscriberOrchestrator.AmbiquousSubscriberHandlingis correctly set toErrorHandling.CriticalFailFastby default.
- Enhancement: Simplified usage for
TypedHttpClientCoreandTypedHttpClientBasesuch that all parameters with the exception ofHttpClientdefault where not specified. - Enhancement:
IServiceCollectionextension methods forCoreEx.ValidationandCoreEx.FluentValidationsupport option to include/exclude underlying interfaces where performing register usingAddValidatorandAddValidators. - Enhancement: Enable interoperability between
CoreEx.Validationand a non-CoreEx.ValidationmappedIValidator; seeInteropvalidation extension method. - Enhancement:
ServiceBusOrchestratedSubscriberadded to support orchestrated (EventSubscriberOrchestrator) event subscribers (IEventSubscriber,SubscriberBaseandSubscriberBase<T>) based on matching metadata (EventSubscriberAttribute) to determine which registered subscriber to execute for the currentServiceBusReceivedMessage. - Enhancement:
BlobLockSynchronizeradded to performIServiceSynchronizerusing Azure Blob storage. - Fixed: Resolved transaction already diposed exception for the
EventOutboxHostedServiceby creating a newIServiceProviderscope and instantiating aEventOutboxDequeueBaseper execution to ensure all dependencies are reinstantiated where applicable. - Enhancement: Updated all package dependencies to latest.
- Enhancement:
ReferenceDataOrchestratorsupportsIConfigureCacheEntryto enable flexibility of configuration; no changes to current behaviour. - Fixed:
ReferenceDataBasewas not correctly managing theIdandIdTypethroughout the inheritence hierarchy. - Enhancement: Database, Entity Framework, and Cosmos capabilities can be configured within their respective
*Argsto perform aCleaner.Cleanautomatically on the response. Defaults tofalseto maintain current functionality. - Fixed:
Mapper<T>was not correctly initializing nullable destination properties during aFlatten; for example, a destinationDateTime?was being set with aDateTime.MinValuewhere source property was not nullable. A newInitializeDestinationcan be optionally specified (or overridden) to perform; otherwise, current initialization behavior will continue.
- Fixed: Database
RowVersionconversion fixed to correctly enable per database provider.
- Fixed:
ReferenceDataOrchestratorfurther updated to attempt to useExecutionContextwhere possible whenCurrenthas not previously been set; this is similar to previous behaviour (<2.5.1). - Fixed:
ReferenceDataOrchestratorupdated to leverageAsyncLocalforCurrentto removestaticvalue leakage; lifetime within the context of the request.
- Fixed:
System.ObjectDisposedException: Cannot access a disposed objectfor theIServiceProviderhas been resolved where reference data loading (ReferenceDataOrchestrator), that in turn loaded child reference data. A new start upUseReferenceDataOrchestratormethod simplifies set up.
- Enhancement: Added string casing support to
CleanerandEntityCoreusing newStringCase; beingNone(as-is default),Upper,LowerandTitle. Leverages standard .NETTextInfoto implement underlying case conversion. - Fixed: Applied all changes identified by Code Analysis.
- Fixed:
NullReferenceExceptioninEntityBaseDictionarywhere item value isnullcorrected. - Enhancement: Added
KeyModifierfunction toObservableDictionaryto allow key manipulation to ensure consistency, i.e. all uppercase. - Fixed: Potential SQL Injection opportunity within
DatabaseExtendedExtensions.ReferenceDatacorrected when schema and table names were being specified explicitly; now quoted usingDbCommandBuilder.QuoteIdentifier.
- Enhancement: Added
CompareValuesRule,EnumRuleandEnumValueRuleas additional validation rules.
- Enhancement:
PagingArgs.MaxTakedefault set bySettingsBase.PagingMaxTake. - Enhancement: Reference data
ICacheEntrypolicy configuration can now be defined in settings.
- Fixed: Entity Framework
EfDb.UpdateAsyncresolved error where the instance of entity type cannot be tracked because another instance with the same key value is already being tracked. - Fixed: The
CollectionMapperwas incorrectly appending items to an existing collection, versus performing a replacement operation. - Enhancement: Improved Entity Framework support where entities contain relationships, both query and update; new
EfDbArgs.QueryNoTrackingandEfDbArgs.ClearChangeTrackerAfterGetadded to configure/override default behaviour. - Enhancement: Added
TypedHttpClientOptions OnBeforeRequestand withinTypedHttpClientBase<TSelf>to enable updating of theHttpRequestMessagebefore it is sent.
- Enhancement: Added additional
ReferenceDataBaseEx.GetRefDataTextmethod overload with a parameter ofid; as an alternative to the pre-existingcode. - Enhancement:
ReferenceDataOrchestratorcaching supports virtualOnGetCacheKeyto enable overridding classes to further define the key characteristics.
- Enhancement: Added support for
MySQLthrough introduction ofMySqlDatabasethat supports similar pattern toSqlServerDatabase. - Enhancement: Added new
EncodedStringToDateTimeConverterto simulate row versioning from aDateTime(timestamp) as an alternative. - Enhancement: Breaking change:
CoreEx.EntityFrameworkCoreupdated to only have database provider independent reference ofMicrosoft.EntityFrameworkCore. Developer will need to add database specific within own solution to use. - Enhancement: Breaking change: Moved classes that inherit from the likes of
EntityBaseinto correspondingExtendednamespace as secondary, and moved the correspondingModelsimplementation into root as primary and removed namespace accordingly. This is to ensure consistency, such that extended usage is explicit (non-default).MessageItemupdated to no longer inherit fromEntityBaseas the extended capabilities are not required. - Enhancement: Breaking change: The
AddValidatorsextension method has been updated to register the implementing validators directly, versus the underlyingIValidatorEx. This enables multiple validators to be registered for an entity. Any references to the interface will need to be updated to reference the concrete to continue functioning through dependency injection. Generally, the validators are not mocked, and the concrete classes can be if need usingMOQwhere required; impact of change is considered low risk for higher reward. - Enhancement: Added the security related capabilities to
ExecutionContextas was previously available in Beef.
- Enhancement: Added new
Mapping.Mapperas a simple (explicit)IMappercapability as an alternative to AutoMapper. Enable the keyMap,FlattenandExpandmapping capabilities. This is no reflection/compiling magic, just specified mapping code which executes very fast. - Enhancement: Breaking change: Validation
Additionalmethod renamed toAdditionalAsyncto be more explicit. - Enhancement: Breaking change: The
SqlServerspecific capabilities withinCoreEx.Databaseproject/assembly have been moved to a newCoreEx.Database.SqlServerproject/assembly.
- Enhancement: Updated the
EventOutboxEnqueueBaseandEventOutboxDequeueBaseto include theEventDataBase.Keyvalue/column. - Enhancement: Added the
EventOutboxHostedService(migrated fromNTangle) to enable hosted outbox publishing service execution. - Enhancement:
LoggerEventSenderupdated to also log event metadata.
- Enhancement: Loosened
EntityCollectionResultgenericTEntityconstraint toEntityBaseto enable inherited extended entitites. - Enhancement: Extended
TypedHttpClientBase<TSelf>to supportDefaultOptionsandSendOptionsto enable default configuration of newTypedHttpClientOptions; i.e. the likes ofWithRetrycan now default versus having to be set per invocation ofSendAsync. - Enhancement: Added
TypedMappedHttpClientBase,TypedMappedHttpClientCoreandTypedMappedHttpClientwith newIMapperproperty used to add extended support for request and response type mappings as part of the request. New methods areGetMappedAsync,PostMappedAsync,PutMappedAsyncandPatchMappedAsyncwhere applicable. - Enhancement:
IConverter<T>usability improvements; including others that leverage. - Enhancement: AutoMapper converters added for common
IConverter<T>implementations to enable. - Enhancement:
ReferenceDataOrchestrator.ConvertFromId(object? id)overload added to enable usage whenTypeofIdis unknown. - Enhancement: Added
RefDataLoaderoverload that supports stored procedure command usage. - Enhancement: Extended
TableValuedParameterto support standard list types; including corresponding configurableDatabaseColumnnames. - Enhancement: Add
DatabaseCommand.SelectMultiSetAsyncoverloads to support paging. - Enhancement: Added
IEntityKeyto enable key-based support in a consistent and standardized manner; refactoredIIdentifierandIPrimaryKeyto leverage; existing references within updated to leverageIEntityKeywhere applicable. - Enhancement: Improved validation handling of nullable vs non-nullable types when adding rules.
- Enhancement:
EntityBaseusage simplified especially where inheriting indirectly, i.e. from a base class that inheritsEntityBase. As a resultEntityBase<>will be deprecated next version.ICloneablesupport removed, now supported viaExtendedExtensions.Clone<T>(). - Enhancement: Improved the
HttpArgquery string output support. - Enhancement: Added
Models.ChangeLog(does not inherit fromEntityBase) as alternative toEntities.ChangeLog(which does). Also, added correspondingAutoMappermapping between the two. - Enhancement:
CosmosDbContainerBaseupdated to further centralize functionality, inheriting classes updated accordingly. - Enhancement: Breaking change:
ICollectionResult.Collectionrenamed toICollectionResult.Items. - Enhancement: Breaking change:
IReferenceDataCollectionpropertiesAllListandActiveListrenamed toAllItemsandActiveItemsrespectively. - Enhancement: Breaking change:
HttpClientExremoved as was a duplicate ofTypedHttpClient; the latter was/is the intended implementation. - Enhancement:
JsonDataReaderwhen loadingIReferenceDatawill attempt to read using both JSON and .NET Property names before overridding to allow additional flexibility within the specified JSON/YAML. - Enhancement:
ReferenceDataOrchestratorconcurrency support improved to ensure loading of reference data items for aTypeis managed with aSemaphoreSlimto ensure only a single thread loads (only once). - Fixed:
SettingsBasewas not looking for keys containing__or:consistently. - Fixed:
JsonFiltererimplementations now filters contents of a JSON object array correctly.
- Enhancement: Ported and refactored CosmosDb components from Beef repo.
- Enhancement: Breaking change: Replaced
DatabaseArgs.PagingwithDatabaseQuery.PagingandDatabaseQuery.WithPaging. - Enhancement: Breaking change: Replaced
EfDbArgs.PagingwithEfDbQuery.PagingandEfDbQuery.WithPaging. - Enhancement: Added
JsonDataReaderto enable dynamic loading of either YAML or JSON formatted data for data migration/uploading. - Enhancement: Added
WebApiExceptionHandlerMiddlewareto manage any unhandled exceptions. - Enhancement: Added
TypedHttpClientto enable basic support for instantiating aTypedHttpClientCorewithout having to explicitly inherit. - Enhancement: Breaking change: HealthChecks project deprecated with functionality moved to individual projects where applicable.
- Enhancement: Added
EfDbEntityto provide a typed entity wrapper over theIEfDboperations. - Enhancement:
AddAzureServiceBusClienthas had support to configureServiceBusClientOptionsadded. - Fixed: The
ServiceBusMessagecannot be sent due to local transactions not being supported with other resource managers/DTC resolved. - Fixed: The
AuthenticationExceptionandAuthorizationExceptionHTTP status codes were incorrect; updated to401and403respectively.
- Enhancement:
InvokerBase<TInvoker, TArgs>has been updated to that theTArgsvalue is optional. - Enhancement:
ReferenceDataFilteradded to simplify HTTP Agent filtering as a single encapsulated object. - Enhancement:
WebApi.ConvertNotfoundToDefaultStatusCodeOnDeleteproperty added to convertNotFoundExceptionto the defaultStatusCode(NoContent) as considered an idempotent operation; defaults totrue. - Enhancement:
PropertyExpression.SentenceCaseConverteradded to enable overridding of defaultToSentenceCaselogic. - Fixed:
HttpArgwhereHttpArgType.FromUriUsePropertieswas incorrectly formatting string values. - Fixed:
WebApi.Patchoperation was not returning the updated value correctly. - Fixed:
WebApiExecutionContextMiddlewarenot settingUsernameandTimestampcorrectly. - Fixed:
WebApiInvokerwas not setting thex-error-typeandx-error-codeheaders forIExtendedExceptionexceptions. - Fixed:
WebApiParamupdated to useETagheader (primary) thenIETag.ETagproperty (secondary) as requestETagvalue. - Fixed:
ValidationExceptionupdated to return message asMediaTypeNames.Text.Plainwhere message only (i.e. no property errors). - Fixed:
IChangeLogvalues set correctly forIDatabaseandIEfDbcreate and update. - Fixed:
IDatabaseconnection open override methods now called correctly. - Fixed:
CollectionRuleItem<TItem>updated to support duplicate checking byIIdentifier<T>as well as the existingIPrimaryKey.
- Fixed: Invokers updated to leverage
async/awaitcorrectly.
- Enhancement: Added
WithTimeout(TimeSpan timeout)support toTypedHttpClientBaseto enable per request timeouts. - Enhancement: Added
AddFluentValidators<TAssembly>to automatically add the requisite dependency injection (DI) configuration for all validators defined within anAssembly. - Enhancement: Breaking change: Refactored the extended entities to simplify implementation and improve experience via new
EntityBase.GetPropertyValuesand correspondingPropertyValue. - Enhancement: Ported and refactored validation framework from Beef repo.
- Enhancement: Added support for
IReferenceDataserialization where only theCodeis serialized/deserialized. This also required newIReferenceDataContentJsonSerializer,ReferenceDataContentJsonSerializerandReferenceDataContentWebApifor when fullIReferenceDatacontent serialization is required. - Enhancement: Serializers updated to support
ICollectionResultwhich by default only (de)serializes the underlyingCollection. ThePagingis expected to be handled separately. - Enhancement: Ported and refactored core database framework components from DbEx rep.
- Enhancement: Ported and refactored extended database and entity framework components from Beef repo.
- Enhancement: Added implementation agnostic
IMapperfor typed value mappings. Added AutoMapper implementation with wrapper to enable.
- Enhancement: Overloads added to
WebApiandWebApiPublisherto allow the body value to be passed versus reading from theHttpRequest. This is useful where allowing the likes of the ASP.NET infrastructure to deserialize value directly. - Enhancement: Automatic
ETaggeneration is performed prior to field filtering as this is considered a post response action and should not affectETagvalue. - Enhancement: Added
EventSendExceptionto provide a standard means to capture the events not sent to enable additional processing of those where required.
- Enhancement: Status code checking added to
TypedHttpClientBase<TSelf>. - Enhancement: Added
IValidator<T>to enable any implementation (agnostic); created wrappers to enableFluentValidation(including dependency injection helper). - Enhancement: Added
AcceptsBodyAttributeto enable Swagger (viaAcceptsBodyOperationFilter) to output body type characteristics where not explicitly defined. - Enhancement: Added opt-in simulated concurrency (ETag) checking/generation to
WebApi.PutAsyncandWebApi.PatchAsyncwhere underlying data source does not support. - Enhancement: Added
CancellationTokento allAsyncmethods.
- Enhancement:
IIdentifier.GetIdentifiermethod replaced withIIdentifier.Id. TheIIdentifier<T>overrides theIdproperty hiding the baseIIdentifier.Id. - Enhancement:
ValueContentResultproperties are now all get and set enabled. TheValueproperty has been removed as it is JSON serialized intoContent. - Fixed:
ValueContentResult.ETaggeneration enhanced to handle different query string parameters when performing an HTTP GET forIEnumerable(collection) types. - Enhancement: Added
HttpClientExas a light-weight means to instantiate a one-off instance from anHttpClient. - Enhancement: Added
JsonMergePatch(application/merge-patch+json) whereby the contents of a JSON document are merged into an existing object value as per RFC7396. - Enhancement: Added/updated reference data capabilities.
- Plus, many more minor fixes and enhancements.
- Enhancement: Breaking change: The event publishing (
IEventPublisher) is now designed to occur in three distinct phases: 1) formatting (EventDataFormatter.Format), 2) serialization (IEventSerializer.SerializeAsync), and 3) sending (IEventSender.SendAsync). TheEventPublisherhas been added to orchestrate this flow. - Enhancement: Updated the
IJsonSerializerimplementation defaults to align with the expected default serialization behavior. - Fixed: The
TypedHttpClientBasefixed to handle where therequestUriparameter is only a query string and not a path.
- New: Initial publish to GitHub/NuGet.