Skip to content
apobekiaris edited this page Apr 26, 2019 · 116 revisions

GitHub issues GitHub close issues

About

The CloneMemberValue module will help you to selectively clone Bussiness object members. The application model can be used to define the cloning context (Views/Members).

The module uses the next two strategies:

  1. It monitors the DetailView construction sequence and projects the result to a Previous/Current pair which is then used to clone if the context is valid.
  2. It monitors the sequence of new object created from the XAF ListEditor, it then projects it similarly to a Previous/Current pair.

Installation

  1. 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.

  2. 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.

Versioning

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.

Dependencies

.NetFramework: v4.6.1

DevExpress.ExpressApp Any
Xpand.VersionConverter 1.0.15
Xpand.XAF.Modules.Reactive 1.2.14
fasterflect 2.1.3
System.Reactive 4.1.3
System.Runtime.CompilerServices.Unsafe 4.5.2
System.Threading.Tasks.Extensions 4.5.2
System.ValueTuple 4.5.0

Issues

For Bugs, Questions or Suggestions use main project issues.

Details

The module extends the IModelMember nodes with the IModelMemberCloneValue.

image

if logging is set to verbose all operations will be logged. To obesrve 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();
}

Tests

The module is tested on Azure for each build with these tests

image

image


Custom badge

Star the project if you think it deserves it.

GitHub stars

Fork the project to extend and contribute.

GitHub forks

Clone this wiki locally