Click here to Skip to main content
15,881,424 members
Please Sign up or sign in to vote.
3.40/5 (2 votes)
Hello

I'm working on the adaptation of a design data model to make it works inner Visual Studio as a custom designer over a component. This project is about railways security designing for testing and validation, and railways are very complicated to modelling...

The problem I'm facing is that the existing model uses array properties in many objects. The designer allow the user to select multiple objects and their common properties are then shown in the propertygrid of Visual Studio. All mergeable properties work as expected except for array properties which staying blank even when arrays of the selected instances are equals (I mean only their content is equal).

I know it is impossible to override the Equals method for an array object. But is there a way to make the Visual Studio propertygrid using a custom IEqualityComparer or something else for these specific properties. I don't want to change all the concern properties by a custom collection type that I should create, because modification of the existing model could be very deep by doing this and it's not a good thing for high level security testing...

Thanks in advance for all of your answers :)
Posted
Comments
Sergey Alexandrovich Kryukov 16-Sep-13 10:44am    
Not quite clear. Property grid can be customized, but it only presents objects and modifies them, not doing other operations, like comparison. What would be the scenario with the arrays? So far, I feel pretty much skeptical about your idea...
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900