I am trying to register institutions and configurations dynamically with a reference (ef4 code only)
I will do this generally:
Private Shared Sub-Configurable Database (By Reeb Builder (as per contact-builder)) 'Load the table configuration for each database (unit Set) in our database ... ConfigureEntity (Builder, New Contact Config) Finally Entity Configuration (TK) as the built-in Referrer Builder (Reference Extension) as a Contextbuilder, as a Private Shared Sub-Configurability (TK), as a built-in entity configuration (with the string), the unit configuration with Builder Builder Register. Register the Unit Set Name with the Configuration Builder Builder. Registry Setset (TK) (setName) is the ending sub
where ContactConfig
is a class that handles EntityConfiguration (of contact)
and < Code> Contact An interface that implements an interface IEentity
( IE Ntity
is common to all organizations).
Therefore ... I will need to find a namespace (project .db.client) for all the signatures of the match:
Entity Configuration (the & lt; class which is the IERTI Applies & gt;)
How can I get this?
Namespace is a part of the name of the object. In the search for types of heirs of the common class, there is a lot of effort than filing on the namespace basis:
Private function check-type (type of type type) Boolean If the form is the type of GetType (object) the hierarhy root 'returned wrong end if' (type.IsGenericType) then 'inherited from some normal type' dim parameter = type. GetGenericArguments () 'Check whether it is normal 1 parameter' if parameter.long = 1 'then' Check Generic parameter is defined 'If not (parameter (0) .FullName is nothing) then check' whether the parameters apply iereti 'If GetType (IERTIT) .sasassignableFrom (parameter (0)) then' Check whether it is EntityConfiguration (T) 'If type is GetType (EntityConfiguration (Of)). MakeGenericType (parameter) then if the end ends if the end if the end ends, then check the return type (type.base type) termination function function filter type (ByVal nameSpaceName as string, IYumerameable (of type) , ByVal type) The type of list (type) is retarded as the new list (type of) 'attachment namespace name' nameSpaceName = nameSpaceName + "." Type in all types of types: 'We do not need intangible class, yet they are not able to create their own examples' (if not type iSlase and type.isbesttracct and typed.furnname.namespacesname) Then check 'What is the type' type (type of type)) obtained from the entity configuration (t) then the result. Add (Type) End & End if Next Return Results Last Function
Check Type
Function check if type
The FilterTypes
function returns the filtered type by its addition names and returns the filtered list to the result.
Example: Dim Type = Filter Type ("Project.DB. Client", Assembly. Gate Exception Assembled (.) GetTypes ())
.
Comments
Post a Comment