![xaf devexpress xaf devexpress](https://www.codeproject.com/KB/webforms/620210/NewProject.png)
At least I am sure that I am going to highlight a solution, which not everyone is aware of and using in his production app. There is the word "tricks" in the name of my blog, and today I really want to tell you about something, which is in my opinion, deserves to be called a real trick. I have also prepared a small schema to better explain the role this type of info subsystem plays: Our documentation describes this in several articles here:ĮXpressApp Framework > Concepts > Business Model Design > Types Info Subsystem Want to get/set a class property known only at runtime? Use the IMemberInfo.Get/SetValue methods (see an example in the end of this article - it's like.
![xaf devexpress xaf devexpress](https://docs.devexpress.com/eXpressAppFramework/images/xaf-main-page-platforms.png)
#Xaf devexpress code#
Want to know which code attributes are applied to a class or property? Call the IBaseInfo.FindAttributes method ( check examples here).Need to know whether a business class has a certain property? Use the ITypesInfo.FindMember or ITypeInfo.Members APIs.If you want to check the member a PropertyEditor corresponds to - check its PropertyEditor.MemberInfo property.If you want to check what business class this View is for - check the View.ObjectTypeInfo property.Leaving customizations aside (which is quite rare, to be honest), accessing information about the types (their metadata) registered within the XAF application is really common. In short, you may need customizations at this low level when you want to dynamically adjust your ORM data model mappings to the database, add or remove custom members for your data model at runtime (e.g., based on the info stored in the database, XML settings file or any other source) when implementing an app tailored to a specific client/user access rights, etc.
![xaf devexpress xaf devexpress](https://www.devexpress.com/products/net/application_framework/i/exelixis-story-devexpress.png)
I have just closed the DC - Provide support for dynamic members in domain components ticket with two possible solutions (there were some specifics with regard to the late generation of real XPO classes for DC interfaces) and wanted to use this chance to draw your attention to some advanced stuff you may need one day - customizing your data model metadata at runtime via the underlying types info subsystem (ooohhh!)