Cocktail Help Reference
FindFactoryMethod Method
See Also  Send Feedback
Cocktail Assembly > Cocktail Namespace > Factory<T> Class : FindFactoryMethod Method



type
The type for which a factory method is needed.
nonPublic
true if a public or nonpublic method can match; false if only a public method can match.

Glossary Item Box

Locates a suitable factory method for the provided type.

Syntax

Visual Basic (Declaration) 
Protected Overridable Function FindFactoryMethod( _
   ByVal type As Type, _
   ByVal nonPublic As Boolean _
) As MethodInfo
Visual Basic (Usage)Copy Code
Dim instance As Factory(Of T)
Dim type As Type
Dim nonPublic As Boolean
Dim value As MethodInfo
 
value = instance.FindFactoryMethod(type, nonPublic)
C# 
protected virtual MethodInfo FindFactoryMethod( 
   Type type,
   bool nonPublic
)
C++/CLI 
protected:
virtual MethodInfo^ FindFactoryMethod( 
   Type^ type,
   bool nonPublic
) 

Parameters

type
The type for which a factory method is needed.
nonPublic
true if a public or nonpublic method can match; false if only a public method can match.

Return Value

Null if no suitable factory method could be located.

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.