Closed Dolfik1 closed 3 years ago
Would you have an example use case where you require this field exposed?
OriginalType
is meant as an internal tracking field of the original input type and is driven by InputType
.
{
"type": "UIKit.UIVisualEffectView",
"properties": [
{
"source": null,
"name": "Effect",
"inputType": "IViewElement",
"originalType": "UIKit.UIVisualEffect",
"defaultValue": "null"
}
]
}
the generated code:
match struct (prevEffectOpt, currEffectOpt) with
// For structured objects, dependsOn on reference equality
| struct (ValueSome prevValue, ValueSome newValue) when identical prevValue newValue -> ()
| struct (ValueSome prevValue, ValueSome newValue) when definition.canReuseView prevValue newValue ->
newValue.Update(definition, ValueSome prevValue, target.Effect)
| struct (_, ValueSome newValue) ->
target.Effect <- (newValue.Create(definition, ValueSome (box target)) :?> UIKit.UIVisualEffect)
| struct (ValueSome _, ValueNone) ->
target.Effect <- null
| struct (ValueNone, ValueNone) -> ()
ViewUpdaters.UIVisualEffectView.updateContentView definition prevContentViewOpt currContentViewOpt target
@Dolfik1 I've added a few missing pieces for a full support of OriginalType in the mapping file. Will run the checks before merging.
/azp run full build
I noticed that generator supports
OriginalType
property, but this property is not exposed. The PR exposes this property.