Static method to get registered properties?

Static method to get registered properties?

Old forum URL: forums.lhotka.net/forums/t/5652.aspx


FrankM posted on Wednesday, October 22, 2008

I am trying to get the list of BO property, the solution I figured out is to create an instance method in which calling FieldManager.GetRegisteredProperties().

Is it possible to create a static method to do this?

RockfordLhotka replied on Thursday, October 23, 2008

Not currently, no. Right now the PropertyInfoManager is scoped as internal, so there's not a way to get a list of registered properties for a type without having an instance of that type.

What is your scenario?

FrankM replied on Thursday, October 23, 2008

I am building a general search window, idea is passing a BO, then populate all the fields to let user choose and set search criteria.

Seems creating instance is the only way, my work around is just warp "FieldManager.GetRegisteredProperties()" in another static method, so UI code just need to call "BO.PropertyList".

What's the concern to make FieldManager not public?
 

Copyright (c) Marimer LLC