T
Type of instance the factory creates.
Cocktail Help Reference
TryGetInstanceFactory<T> Method
See Also  Send Feedback
Cocktail Assembly > Cocktail Namespace > Composition Class : TryGetInstanceFactory<T> Method



Glossary Item Box

Returns a factory that creates new instances of the specified type.

Syntax

Visual Basic (Declaration) 
Public Shared Function TryGetInstanceFactory(Of T As Class)() As ICompositionFactory(Of T)
Visual Basic (Usage)Copy Code
Dim value As ICompositionFactory(Of T)
 
value = Composition.TryGetInstanceFactory(Of T)()
C# 
public static ICompositionFactory<T> TryGetInstanceFactory<T>()
where T: class
C++/CLI 
public:
static ICompositionFactory<T^>^ TryGetInstanceFactorygeneric<typename T>
(); 
where T: ref class

Type Parameters

T
Type of instance the factory creates.

Return Value

Null if the container cannot provide a factory for the specified type.

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

© 2013 All Rights Reserved.