TType
The type to be registered.
Intersoft ClientUI Documentation
Register<TType>(Func<IDependencyResolver,TType>) Method
See Also  Send Feedback
Intersoft.Client.Framework.Containers Namespace > IocContainer Class > Register Method : Register<TType>(Func<IDependencyResolver,TType>) Method






func
The delegate which will be called to create an instance of the type TType.
Adds the function to resolve an unnamed registration of the specified type to the container.

Syntax

Visual Basic (Declaration) 
Public Overloads Function Register(Of TType)( _
   ByVal func As Func(Of IDependencyResolver,TType) _
) As IRegistration
Visual Basic (Usage)Copy Code
Dim instance As IocContainer
Dim func As Func(Of IDependencyResolver,TType)
Dim value As IRegistration
 
value = instance.Register(Of TType)(func)
C# 
public IRegistration Register<TType>( 
   Func<IDependencyResolver,TType> func
)
Delphi 
public function Register( 
    func: Func
): IRegistration; 
JScript 
public function Register( 
   func : Func
) : IRegistration;
Managed Extensions for C++ 
public: IRegistration* Register<TType>( 
   Func<IDependencyResolver*,TType*>* func
) 
C++/CLI 
public:
IRegistration^ Registergeneric<typename TType>
( 
   Func<IDependencyResolver^,TType^>^ func
) 

Parameters

func
The delegate which will be called to create an instance of the type TType.

Type Parameters

TType
The type to be registered.

Return Value

An instance of IRegistration that can be used to configure how the get information about the registration, or change the lifetime manager.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.