bbtsoftware / bbt.structuretools Goto Github PK
View Code? Open in Web Editor NEWTools to copy, convert and compare object structure
License: MIT License
Tools to copy, convert and compare object structure
License: MIT License
It's about moving extension methods and very common interfaces (common as in: dependency of our repositories, yet not integral part of the functionality) to their own github repo.
See also BBT.StrategyPattern: GH-19
For the registrations of the sub operations to work correctly the IocHandler
must accept a second action for transient registrations.
With the initial move we disabled the Dup Finder build step.
We should:
We currently have an IComparer
, IConvert
and ICopy
. This should be ICompare
, IConvert
and ICopy
The initialization logic of the IocHandler
does not correctly register the dependencies for the IDefaultValueProvider
..
Preprocessings and postprocessings should cover all use cases. There should be no need for interceptors.
Mistakes were made, lessons were learned. Porting everything to GitHub was way ahead an the current codebase can't work properly as it is now and would break a lot of pre-existing functionality. While I've fixed that it's way better to just replace what has been done with the new code and abandon any issues and pull requests which would only fix a fraction of the issues. This issue can be closed as soon as we're proven ready for a stable version 1.0 and covers mainly of reopening the currently closed source as it undergoes internal testing.
Upper limit is returned if RegisterCopyAttributeWithUpperLimit is performed with default value as source value.
See:
https://github.com/stefan-lindegger/BBT.StructureTools/blob/495c47f0369a30b15f5f4051e682fca6930f4db2/src/BBT.StructureTools/Provider/DefaultValueProvider.cs#L29
and https://github.com/stefan-lindegger/BBT.StructureTools/blob/495c47f0369a30b15f5f4051e682fca6930f4db2/src/BBT.StructureTools.Tests/Convert/ConverterIntTests.cs#L340
Within pre- and post-processings it should be possible to use the object graph to the target's list property and back to the create instance. Therefore the created instance should be added to the property list before convert is called.
As discussed in #19
CreateInstanceOfTypeStrategy
GenericCopyStrategy
CopyCallContext
IConvertHelper
ICopyHelper
CopyCrossReferencedCounterPartDeterminationHelper
GenericCreateByBaseAsCriterionStrategy
Also, the convert operation interfaces must be public so they can be mocked while testing.
It's not automatically clear that the ICreateCopyHelper
returns a Null value if the children should not be created.
See also #60 at BBT.Maybe which must be implemented first.
This issue can cause duplicate collection entries.
For example, if the handling of a composition adds the collection entry already when setting the entry's back reference such duplicate entries emerge.
Remove cake and all dependencies
Remove Wyam documentation
Readme.md improvements
Add GitHub workflows
Add functionality to copy objects
Summaries contain "See link above" refs as documentation.
Those should be replaced by more significant explanations.
Both interfaces have the same documentation, either they do something different, in this case the documentation should be improved.
Add two additiona ICreateConvertHelper implementations for the following use cases:
OperationConvertFromSourceOnDifferentLevels
adds a postprocessing while the operation is executed, which leads to a null reference exception if the prostprocessing was added before a conversion where the source on the different level in the tree is null
The PR #3 doesn't contain documentation. I'll add it afterwards to resolve this isse.
Numerous registration methods would benefit from overloads with
With this improvements flexibility is gained and specialized registration methods could be removed.
With the effect that usability is improved.
Add functionality to convert objects
Some IoC containers (such as Castle Windsor) don't support instantiation of internal objects with an internal C'tor.
Title says it all. Analyzing an expression tree to find a way to add an item to a collection is a very bad idea. We should, if needed, use the corresponding .Net classes to add items anywhere. Might need a bigger refactoring where we only support copying / converting into IList<T>
Github packages:
https://github.com/orgs/bbtsoftware/packages
Use dotnet pack instead of nuget pack
Add functionality to compare objects
Add nuspec for BBT.StructureTools.Extensions
Improve Readme.md
See PR in BBT.Maybe
TestIoContainer
should be renamed to TestIocContainer
At the moment, IEqualityComparerHelperRegistration.RegisterAttributeWithDistinguishedComparer
take an IComparer<TComparer, TIntention>
as argument. This is most likely wrong, since we may just resolve the comparer from the ioC from the generic type arguments which are passed into the method anyways.
create to many / to one methods have generic parameters TTargetValue and TConcreteTargetValue.
Reason: TConcreteTargetValue is used to create a concrete object - a parameterless constructor is assumed.
But how a concrete target value is instantiated should be the responsibility of the CreateConvertHelper class.
The type parameters of convert registration methods should be reduced to TTargetValue with class constraint.
When upgrading to the version including this fix you have to:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.