Class MemberInfoSlimVisitor<TMember, TField, TProperty, TMethod, TSimpleMethod, TGenericDefinitionMethod, TGenericMethod, TConstructor>
Visitor for lightweight representations of members.
Inheritance
Namespace: System.Reflection
Assembly: Nuqleon.Linq.Expressions.Bonsai.dll
Syntax
public abstract class MemberInfoSlimVisitor<TMember, TField, TProperty, TMethod, TSimpleMethod, TGenericDefinitionMethod, TGenericMethod, TConstructor> : Object where TField : TMember where TProperty : TMember where TMethod : TMember where TSimpleMethod : TMethod where TGenericDefinitionMethod : TMethod where TGenericMethod : TMethod where TConstructor : TMember
Type Parameters
Name | Description |
---|---|
TMember | Type representing a member. |
TField | Type representing a field. |
TProperty | Type representing a property. |
TMethod | Type representing a method. |
TSimpleMethod | Type representing a simple method. |
TGenericDefinitionMethod | Type representing an open generic method definition. |
TGenericMethod | Type representing a closed generic method. |
TConstructor | Type representing a constructor. |
Constructors
MemberInfoSlimVisitor()
Declaration
protected MemberInfoSlimVisitor()
Methods
MakeGenericMethod(GenericMethodInfoSlim, TGenericDefinitionMethod)
Constructs a closed generic method with the specified open generic method definition.
Declaration
protected abstract TGenericMethod MakeGenericMethod(GenericMethodInfoSlim method, TGenericDefinitionMethod methodDefinition)
Parameters
Type | Name | Description |
---|---|---|
GenericMethodInfoSlim | method | Original method. |
TGenericDefinitionMethod | methodDefinition | Generic method definition. |
Returns
Type | Description |
---|---|
TGenericMethod | Representation of a closed generic method with the given method definition. |
Visit(MemberInfoSlim)
Visits the specified member.
Declaration
public virtual TMember Visit(MemberInfoSlim member)
Parameters
Type | Name | Description |
---|---|---|
MemberInfoSlim | member | Member to visit. |
Returns
Type | Description |
---|---|
TMember | Result of the visit. |
VisitAndConvert<TResult>(MemberInfoSlim)
Visits and converts a member.
Declaration
public TResult VisitAndConvert<TResult>(MemberInfoSlim member)
where TResult : TMember
Parameters
Type | Name | Description |
---|---|---|
MemberInfoSlim | member | Member to visit. |
Returns
Type | Description |
---|---|
TResult | Result of visiting and converting the member. |
Type Parameters
Name | Description |
---|---|
TResult | Type representing the kind of member to convert to. |
VisitConstructor(ConstructorInfoSlim)
Visits a constructor.
Declaration
protected abstract TConstructor VisitConstructor(ConstructorInfoSlim constructor)
Parameters
Type | Name | Description |
---|---|---|
ConstructorInfoSlim | constructor | Constructor to visit. |
Returns
Type | Description |
---|---|
TConstructor | Result of the visit. |
VisitField(FieldInfoSlim)
Visits a field.
Declaration
protected abstract TField VisitField(FieldInfoSlim field)
Parameters
Type | Name | Description |
---|---|---|
FieldInfoSlim | field | Field to visit. |
Returns
Type | Description |
---|---|
TField | Result of the visit. |
VisitGenericDefinitionMethod(GenericDefinitionMethodInfoSlim)
Visits a generic method definition.
Declaration
protected abstract TGenericDefinitionMethod VisitGenericDefinitionMethod(GenericDefinitionMethodInfoSlim method)
Parameters
Type | Name | Description |
---|---|---|
GenericDefinitionMethodInfoSlim | method | Method to visit. |
Returns
Type | Description |
---|---|
TGenericDefinitionMethod | Result of the visit. |
VisitGenericMethod(GenericMethodInfoSlim)
Visits a generic method.
Declaration
protected virtual TGenericMethod VisitGenericMethod(GenericMethodInfoSlim method)
Parameters
Type | Name | Description |
---|---|---|
GenericMethodInfoSlim | method | Method to visit. |
Returns
Type | Description |
---|---|
TGenericMethod | Result of the visit. |
VisitMethod(MethodInfoSlim)
Visits a method.
Declaration
protected virtual TMethod VisitMethod(MethodInfoSlim method)
Parameters
Type | Name | Description |
---|---|---|
MethodInfoSlim | method | Method to visit. |
Returns
Type | Description |
---|---|
TMethod | Result of the visit. |
VisitProperty(PropertyInfoSlim)
Visits a property.
Declaration
protected abstract TProperty VisitProperty(PropertyInfoSlim property)
Parameters
Type | Name | Description |
---|---|---|
PropertyInfoSlim | property | Property to visit. |
Returns
Type | Description |
---|---|
TProperty | Result of the visit. |
VisitSimpleMethod(SimpleMethodInfoSlim)
Visits a simple method.
Declaration
protected abstract TSimpleMethod VisitSimpleMethod(SimpleMethodInfoSlim method)
Parameters
Type | Name | Description |
---|---|---|
SimpleMethodInfoSlim | method | Method to visit. |
Returns
Type | Description |
---|---|
TSimpleMethod | Result of the visit. |