From f55b2f4405a042df3ff3d4c67fcac8b3852dbea7 Mon Sep 17 00:00:00 2001 From: Joshua Marner Date: Fri, 10 Jun 2022 12:00:11 -0500 Subject: [PATCH] Make part of ViewModelArgs public --- src/Elmish.WPF/ViewModelArgs.fs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Elmish.WPF/ViewModelArgs.fs b/src/Elmish.WPF/ViewModelArgs.fs index c3dbaa64..18c27994 100644 --- a/src/Elmish.WPF/ViewModelArgs.fs +++ b/src/Elmish.WPF/ViewModelArgs.fs @@ -27,13 +27,11 @@ module internal LoggingViewModelArgs = nameChain = "" } -type internal ViewModelArgs<'model, 'msg> = - { initialModel: 'model - dispatch: 'msg -> unit - loggingArgs: LoggingViewModelArgs } +type ViewModelArgs<'model, 'msg> = + internal { initialModel: 'model; dispatch: 'msg -> unit; loggingArgs: LoggingViewModelArgs } -module internal ViewModelArgs = - let create initialModel dispatch nameChain loggingArgs = +module ViewModelArgs = + let internal create initialModel dispatch nameChain loggingArgs = { initialModel = initialModel dispatch = dispatch loggingArgs = LoggingViewModelArgs.map nameChain loggingArgs } @@ -42,8 +40,10 @@ module internal ViewModelArgs = { initialModel = v.initialModel |> mapModel dispatch = mapMsg >> v.dispatch loggingArgs = v.loggingArgs } - - let simple initialModel = + + let createWithoutLogging initialModel dispatch = { initialModel = initialModel - dispatch = ignore + dispatch = dispatch loggingArgs = LoggingViewModelArgs.none } + + let simple initialModel = createWithoutLogging initialModel ignore