-
-
Notifications
You must be signed in to change notification settings - Fork 42
CloneMemberValue
The CloneMemberValue
module will help you to selectively clone
Business object members
.
This is a platform agnostic
module extends the IModelMember
nodes with the IModelMemberCloneValue
uses the next two strategies:
- It monitors the
DetailView
construction sequence and projects the result to aPrevious/Current
pair which is then used to clone if the context is valid. - It monitors the sequence of new object created from the XAF
ListEditor
, it then projects it similarly to aPrevious/Current
pair.
if logging is set to verbose all operations will be logged. To observe the cloning operations in code use the next pattern in one of your modules.
public override void Setup(XafApplication application){
base.Setup(application);
CloneMemberValueService.CloneMemberValues
.Do(DoSomethingForEachMemberValue)
.TakeUntilDisposingMainWindow()
.Subscribe();
}
private void DoSomethingForEachMemberValue((IModelObjectView modelObjectView, IMemberInfo MemberInfo, IObjectSpaceLink previousObject, IObjectSpaceLink currentObject) valueTuple){
throw new NotImplementedException();
}
Possible future improvements:
- Any other need you may have.
Let me know if you want me to implement them for you.
-
First you need the nuget package so issue this command to the
VS Nuget package console
Install-Package Xpand.XAF.Modules.CloneMemberValue
.The above only references the dependencies and nexts steps are mandatory.
-
Ways to Register a Module or simply add the next call to your module constructor
RequiredModuleTypes.Add(typeof(Xpand.XAF.Modules.CloneMemberValue.CloneMemberValueModule));
The module is not integrated with any eXpandFramework
module. You have to install it as described.
The module is not bound to DevExpress versioning, which means you can use the latest version with your old DevExpress projects Read more.
The module follows the Nuget Version Basics.
.NetFramework: net461
DevExpress.ExpressApp | Any |
Fasterflect.Xpand | 2.0.7 |
JetBrains.Annotations | 2020.1.0 |
System.Reactive | 4.4.1 |
System.ValueTuple | 4.5.0 |
Xpand.Extensions.Reactive | 2.202.58 |
Xpand.XAF.Modules.Reactive | 2.202.58 |
Xpand.VersionConverter | 2.202.10 |
To Step in the source code
you need to enable Source Server support
in your Visual Studio/Tools/Options/Debugging/Enable Source Server Support. See also How to boost your DevExpress Debugging Experience.
If the package is installed in a way that you do not have access to uninstall it, then you can unload
it with the next call at the constructor of your module.
Xpand.XAF.Modules.Reactive.ReactiveModuleBase.Unload(typeof(Xpand.XAF.Modules.CloneMemberValue.CloneMemberValueModule))
The module is tested on Azure for each build with these tests