Mercurial > pub > bltoolkit
view Tools/DocGen/Content/Doc/Reflection/ObjectFactory.htm @ 9:1e85f66cf767 default tip
update bltoolkit
author | nickolay |
---|---|
date | Thu, 05 Apr 2018 20:53:26 +0300 |
parents | f990fcb411a9 |
children |
line wrap: on
line source
<p class="j"> The following example shows how to create objects of different types coming from the same data source. </p> <p class="j"> Typically, to create an object, BLToolkit calls the <i>TypeAccessor.CreateInstanceEx</i> method. First of all, this method verifies if there is an object factory (<i>ObjectFactory</i> property) associated with the creating object’s type. If the property value is not null, it is used to create an object. </p> <p class="j"> The <i>ObjectFactory</i> property can be assigned explicitly at any time or by decorating the target class with the <i>ObjectFactory</i> attribute. </p> ObjectFactory.cs <% ..\..\..\HowTo\Reflection\ObjectFactory.cs %> App.config <% Doc\Data\App.config %> <a href="..\Data\CreateSql.htm">Create.sql script</a>