You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But what if a bond for these types will be strong? For example
typeApplicationCore<'Model,'Nav,'Message>(initialModel, nav:INavigator<'Model, 'Nav, 'Message>,update,binding)=memberthis.Navigation(msg :'Nav)=async{do! Async.SwitchToContext syncContext
nav.Navigate this msg
}|> Async.Start
member__.Navigator:INavigator<'Model,'Nav,'Message>= nav
andINavigator<'Model,'Nav,'Message>=abstractmemberRun:ApplicationCore<'Model,'Nav,'Message>->(System.Threading.SynchronizationContext ->ObservableBindingSource<'Message>)->unitabstract member Navigate :ApplicationCore<'Model,'Nav,'Message>->'Nav ->unit
and with a bit change of RunApplication
[<AbstractClass;Sealed>]typeFramework=/// Run an application given an Application generator, Window generator, and other required informationstatic memberRunApplication<'Model,'Nav,'Message>(applicationInfo :Framework.ApplicationCore<'Model,'Nav,'Message>)=
Framework.Framework.runApplication (App.toApplicationSpecification applicationInfo.Navigator applicationInfo)
For now
ApplicationCore
andINavigator
have not explicit dependency. But constructor takes functionnavUpdate
(from INavigator) as a parameteras a result, the use of navigation is not immediately obvious
Anyway, it looks to me like implicit dependency.
But what if a bond for these types will be strong? For example
and with a bit change of RunApplication
then the example above could be rewritten as
which is slightly easier to perceive.
So, it's just a thought about navigation system.
The text was updated successfully, but these errors were encountered: