Skip to content

Commit

Permalink
reduced circular references among BindingData
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyson Williams authored and cmeeren committed Sep 17, 2019
1 parent 5e3e8a0 commit 0f38874
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/Elmish.WPF/Binding.fs
Original file line number Diff line number Diff line change
Expand Up @@ -36,47 +36,54 @@ type internal OneWayData<'model> = {
Get: 'model -> obj
}

and internal OneWayLazyData<'model> = {
type internal OneWayLazyData<'model> = {
Get: 'model -> obj
Map: obj -> obj
Equals: obj -> obj -> bool
}

and internal OneWaySeqLazyData<'model> = {
type internal OneWaySeqLazyData<'model> = {
Get: 'model -> obj
Map: obj -> obj seq
Equals: obj -> obj -> bool
GetId: obj -> obj
ItemEquals: obj -> obj -> bool
}

and internal TwoWayData<'model, 'msg> = {
type internal TwoWayData<'model, 'msg> = {
Get: 'model -> obj
Set: obj -> 'model -> 'msg
WrapDispatch: Dispatch<'msg> -> Dispatch<'msg>
}

and internal TwoWayValidateData<'model, 'msg> = {
type internal TwoWayValidateData<'model, 'msg> = {
Get: 'model -> obj
Set: obj -> 'model -> 'msg
Validate: 'model -> string voption
WrapDispatch: Dispatch<'msg> -> Dispatch<'msg>
}

and internal CmdData<'model, 'msg> = {
type internal CmdData<'model, 'msg> = {
Exec: 'model -> 'msg voption
CanExec: 'model -> bool
WrapDispatch: Dispatch<'msg> -> Dispatch<'msg>
}

and internal CmdParamData<'model, 'msg> = {
type internal CmdParamData<'model, 'msg> = {
Exec: obj -> 'model -> 'msg voption
CanExec: obj -> 'model -> bool
AutoRequery: bool
WrapDispatch: Dispatch<'msg> -> Dispatch<'msg>
}

and internal SubModelData<'model, 'msg> = {
type internal SubModelSelectedItemData<'model, 'msg> = {
Get: 'model -> obj voption
Set: obj voption -> 'model -> 'msg
SubModelSeqBindingName: string
WrapDispatch: Dispatch<'msg> -> Dispatch<'msg>
}

type internal SubModelData<'model, 'msg> = {
GetModel: 'model -> obj voption
GetBindings: unit -> Binding<obj, obj> list
ToMsg: obj -> 'msg
Expand All @@ -99,13 +106,6 @@ and internal SubModelSeqData<'model, 'msg> = {
ToMsg: obj * obj -> 'msg
}

and internal SubModelSelectedItemData<'model, 'msg> = {
Get: 'model -> obj voption
Set: obj voption -> 'model -> 'msg
SubModelSeqBindingName: string
WrapDispatch: Dispatch<'msg> -> Dispatch<'msg>
}


/// Represents all necessary data used to create the different binding types.
and internal BindingData<'model, 'msg> =
Expand Down

0 comments on commit 0f38874

Please sign in to comment.