We use custom property descriptor in our base
collection classes. Earlier (before this build) any
calls to
Public Overrides Function GetValue(ByVal component As
Object) As Object
Public Overrides Sub SetValue(ByVal component As
Object, ByVal value As Object)
the "component" always evaluated to collection item
we expected (say a productionLine) but now it
evaluates to ObjectView(Of productionLine). So any
code that expects component to be underlaying item
would fail as in following code:
Public Overrides Function GetValue(ByVal component As
Object) As Object
Dim pobjValue As Object = Nothing
'THIS FAILS
If component.GetType.GetProperty(Me.Name).CanRead Then
pobjValue = component.GetType.GetProperty
(Me.Name).GetValue(component, Nothing)
If IsDBNull(pobjValue) Then
pobjValue = Nothing
Else
Return pobjValue
End If
End If
Return pobjValue
End Sub
An modified version of example that came with source
is attached. Please make DEMOVB as startup. I hope
this would help in explaining my point.
warm regards,
Abhishek
Example code to reproduce the bug