eXpand icon indicating copy to clipboard operation
eXpand copied to clipboard

How to setup nonpersistent objects

Open james1o4timothy opened this issue 4 years ago • 8 comments

The sample provided in the documentation doesn't compile.

public override void Setup(ApplicationModulesManager moduleManager){ base.Setup(moduleManager); moduleManager.WhenApplication().WhenListViewCreating(typeof(NonPersistentObject)) .SelectMany(tuple => ((NonPersistentObjectSpace) tuple.args.ObjectSpace) .WhenObjectsGetting().Do(_ => { _.e.Objects = new BindingList<NonPersistentObject>(); }) ) .Subscribe(this); }

WhenApplication expects a parameter.

james1o4timothy avatar Feb 02 '21 21:02 james1o4timothy

We will try to answer all questions that do not require research within 24hr. To prioritize cases that require research we use the following labels in order. For all other issues the posting time is respected.

  1. ❇️ Exclusive-Services
  2. ❤ Bronze Sponsor
  3. ❤ Sponsor
  4. ❤ Backer
  5. Installation
  6. ShowStopper
  7. Nuget
  8. Contribution
  9. BreakingChange
  10. ReproSample
  11. Deployment
  12. must-have

This case is prioritized.

apobekiaris avatar Feb 02 '21 21:02 apobekiaris

thanks will update the docs as per next snippet

public override void Setup(ApplicationModulesManager moduleManager) {
            base.Setup(moduleManager); 
            moduleManager.WhenApplication(application => application.WhenListViewCreating(typeof(NonPersistentObject))
                .SelectMany(t => ((NonPersistentObjectSpace) t.e.ObjectSpace)
                    .WhenObjectsGetting()
                    .Do(_ => _.e.Objects = new BindingList<NonPersistentObject>())) )
                .Subscribe(this);
        }

apobekiaris avatar Feb 02 '21 21:02 apobekiaris

Error CS0411 The type arguments for method 'XafApplicationRxExtensions.SelectMany<T>(XafApplication, IObservable<T>)' cannot be inferred from the usage. Try specifying the type arguments explicitly.

james1o4timothy avatar Feb 06 '21 07:02 james1o4timothy

am using these

using Xpand.XAF.Modules.Reactive.Services; using Xpand.XAF.Modules.Reactive.Extensions; using System.Linq;

james1o4timothy avatar Feb 06 '21 07:02 james1o4timothy

sample me please in an empty xaf solution using only the Xpand.XAF.Modules.Reactive package, note u can use any package u want I just want to simplify your attempt for your better understanding

apobekiaris avatar Feb 06 '21 09:02 apobekiaris

also just reference this a c# generics usage mistake rather an issue with our RX api

https://stackoverflow.com/questions/4969321/the-type-arguments-cannot-be-inferred-from-the-usage-try-specifying-the-type-ar

apobekiaris avatar Feb 06 '21 10:02 apobekiaris

The pre-release 4.202.51.1 in the Reactive.XAF lab branch includes commits that relate to this task:

To minimize version conflicts we recommend that you use the Xpand.XAF.Core.All, Xpand.XAF.Win.All, Xpand.XAF.Web.All packages. Doing so, all packages will be at your disposal and .NET will add a dependecy only to those packages that you actually use and not to all (see the Modules installation-registrations youtube video).

Released packages: Xpand.Extensions v.4.202.51.1 Xpand.Extensions.Blazor v.4.202.51.1 Xpand.Extensions.Mono.Cecil v.4.202.51.1 Xpand.Extensions.Office.Cloud v.4.202.51.1 Xpand.Extensions.Office.Cloud.Google.Blazor v.4.202.51.1 Xpand.Extensions.Reactive v.4.202.51.1 Xpand.Extensions.XAF v.4.202.51.1 Xpand.Extensions.XAF.Xpo v.4.202.51.1 Xpand.TestsLib v.4.202.51.1 Xpand.TestsLib.Blazor v.4.202.51.1 Xpand.TestsLib.Common v.4.202.51.1 Xpand.TestsLib.Net461 v.4.202.51.1 Xpand.VersionConverter v.4.202.51.1 Xpand.XAF.Core.All v.4.202.51.1 Xpand.XAF.Modules.AutoCommit v.4.202.51.1 Xpand.XAF.Modules.Blazor v.4.202.51.1 Xpand.XAF.Modules.CloneMemberValue v.4.202.51.1 Xpand.XAF.Modules.CloneModelView v.4.202.51.1 Xpand.XAF.Modules.GridListEditor v.4.202.51.1 Xpand.XAF.Modules.HideToolBar v.4.202.51.1 Xpand.XAF.Modules.JobScheduler.Hangfire v.4.202.51.1 Xpand.XAF.Modules.LookupCascade v.4.202.51.1 Xpand.XAF.Modules.MasterDetail v.4.202.51.1 Xpand.XAF.Modules.ModelMapper v.4.202.51.1 Xpand.XAF.Modules.ModelViewInheritance v.4.202.51.1 Xpand.XAF.Modules.Office.Cloud.Google v.4.202.51.1 Xpand.XAF.Modules.Office.Cloud.Google.Calendar v.4.202.51.1 Xpand.XAF.Modules.Office.Cloud.Google.Tasks v.4.202.51.1 Xpand.XAF.Modules.Office.Cloud.Microsoft v.4.202.51.1 Xpand.XAF.Modules.Office.Cloud.Microsoft.Calendar v.4.202.51.1 Xpand.XAF.Modules.Office.Cloud.Microsoft.Todo v.4.202.51.1 Xpand.XAF.Modules.Office.DocumentStyleManager v.4.202.51.1 Xpand.XAF.Modules.OneView v.4.202.51.1 Xpand.XAF.Modules.PositionInListView v.4.202.51.1 Xpand.XAF.Modules.ProgressBarViewItem v.4.202.51.1 Xpand.XAF.Modules.Reactive v.4.202.51.1 Xpand.XAF.Modules.Reactive.Logger v.4.202.51.1 Xpand.XAF.Modules.Reactive.Logger.Client.Win v.4.202.51.1 Xpand.XAF.Modules.Reactive.Logger.Hub v.4.202.51.1 Xpand.XAF.Modules.RefreshView v.4.202.51.1 Xpand.XAF.Modules.SequenceGenerator v.4.202.51.1 Xpand.XAF.Modules.SuppressConfirmation v.4.202.51.1 Xpand.XAF.Modules.ViewEditMode v.4.202.51.1 Xpand.XAF.Modules.ViewItemValue v.4.202.51.1 Xpand.XAF.Modules.ViewWizard v.4.202.51.1 Xpand.XAF.Web.All v.4.202.51.1 Xpand.XAF.Win.All v.4.202.51.1

Please update the related Nuget packages and test if issues is addressed. These are nightly nuget packages available only from our NugetServer.

If you do not use these packages directly but through a module of the main eXpandFramework project, please wait for the bot to notify you again when integration is finished or update the related packages manually.

Thanks a lot for your contribution.

apobekiaris avatar Feb 17 '21 21:02 apobekiaris

Issue is deprioritized as no Assignee found and scheduled for auto-close if no activity in the next 60 days. Thanks a lot for your contribution.

apobekiaris avatar May 02 '22 07:05 apobekiaris

Closing issue for age. Feel free to reopen it at any time.

.Thank you for your contribution.

expand avatar Dec 31 '23 21:12 expand