(Created page with "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 do be done sooner or later 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 we need to switch ev...") |
No edit summary |
||
Line 7: | Line 7: | ||
- it has do be done sooner or later | - it has do be done sooner or later | ||
==== 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. | |||
<code>/// <summary></code> | |||
<code> /// In .netStandard there is no Dispatcher, but when using this from other platforms (WPF) we can inject an eqvivalent valid for that platform</code> | |||
<code> /// </summary></code> | |||
<code> void InjectThePlatformDispatcherEqvivalent(System.ComponentModel.ISynchronizeInvoke platformDispatcherEqvivalent);</code> | |||
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: | |||
<code>EcoServiceHelper.GetAsyncSupportService(_ecospace).TurnOnAsyncHandling();</code> | |||
<code> EcoServiceHelper.GetAsyncSupportService(_ecospace).InjectThePlatformDispatcherEqvivalent(new DispatcherSynchronizeInvoke(System.Windows.Threading.Dispatcher.CurrentDispatcher));</code> |
Revision as of 14:16, 4 October 2024
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 do be done sooner or later
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));