MDriven 72

MDriven 7.2 - end in mind is to modernize and make MDrivenDesigner and MDrivenFramework run .net8

- this will allow us to solve a ton of GAC related issues

- it will allow us to use BlazorWebView for ViewModel design

- it has to be done soon due to clock is ticking

Change drivers and mitigations

When compiling the MDrivenDesigner WPF parts in .net8 we get a conflict for type references and namespaces used in XAML. In order to allow the XAML to stay the same (there is no conditional defines in XAML) we need to switch even the old Framework version to use the Eco.ModelLayer assemblies compiled with .netStandard...

This is relatively safe - since .netStandard works for all versions - and we really do not need a non .netStandard version of things that we have .netStandard versions of.

The Eco.ModelLayer.netstandard assemblies reference the Eco.handles,Eco.Interfaces and Eco.LinqExtender assemblies - we have these in .netStandard as well - so we may as well shift out old Eco.handles,Eco.Interfaces and Eco.LinqExtender to mdriven.handles.netstandard,mdriven.Interfaces.netstandard and mdriven.LinqExtender.netstandard

This will in mean that Eco.handles,Eco.Interfaces and Eco.LinqExtender will be pensioned today - and we will only build mdriven.handles.netstandard,mdriven.Interfaces.netstandard and mdriven.LinqExtender.netstandard going forward.

Breaking changes

One gotcha is that the IAsyncSupportService had calls for DispatchTaskToMainThread , but Dispatcher is actually a WPF/Windows-only-class, however the principle of Dispatch is good and practical for a lot.

 /// <summary>

    /// In .netStandard there is no Dispatcher, but when using this from other platforms (WPF) we can inject an eqvivalent valid for that platform

    /// </summary>

    void InjectThePlatformDispatcherEqvivalent(System.ComponentModel.ISynchronizeInvoke platformDispatcherEqvivalent);

The above call has been added to IAsyncSupportService, and the suggested use of it is like this, go like this whenever you turn on asynchandlling:

 EcoServiceHelper.GetAsyncSupportService(_ecospace).TurnOnAsyncHandling();

        EcoServiceHelper.GetAsyncSupportService(_ecospace).InjectThePlatformDispatcherEqvivalent(new DispatcherSynchronizeInvoke(System.Windows.Threading.Dispatcher.CurrentDispatcher));

The DispatcherSynchronizeInvoke class is in ECO.WPF (framework) and MDriven.WPF.core (.net8)

This page was edited 0 days ago on 10/04/2024. What links here