Class PrecompiledMethodDescriptor<TTarget, TReturn>
Definition
Namespace: StardewUI.Framework.Descriptors
Assembly: StardewUI.dll
Statically-typed implementation of an IMethodDescriptor<T> with predefined attributes.
public class PrecompiledMethodDescriptor<TTarget, TReturn> :
StardewUI.Framework.Descriptors.IMethodDescriptor<TReturn>,
StardewUI.Framework.Descriptors.IMethodDescriptor,
StardewUI.Framework.Descriptors.IMemberDescriptor
Type Parameters
TTarget
The method's declaring type.
TReturn
The type of the method's return value.
Inheritance
Object ⇦ PrecompiledMethodDescriptor<TTarget, TReturn>
Implements
IMethodDescriptor<TReturn>, IMethodDescriptor, IMemberDescriptor
Members
Constructors
Name | Description |
---|---|
PrecompiledMethodDescriptor<TTarget, TReturn>(string, Type, Object, Func<TTarget, Object, Object>) | Statically-typed implementation of an IMethodDescriptor<T> with predefined attributes. |
Properties
Name | Description |
---|---|
ArgumentTypes | The exact types expected for the method's arguments. |
DeclaringType | The type on which the member is declared. |
Name | The member name. |
OptionalArgumentCount | The number of optional arguments at the end of the argument list. |
ReturnType | The method's return type. |
Methods
Name | Description |
---|---|
Invoke(Object, Object) | Invokes the underlying method. |
Details
Constructors
PrecompiledMethodDescriptor<TTarget, TReturn>(string, Type, Object, Func<TTarget, Object, Object>)
Statically-typed implementation of an IMethodDescriptor<T> with predefined attributes.
public PrecompiledMethodDescriptor<TTarget, TReturn>(string name, System.Type argumentTypes, System.Object defaultValues, Func<TTarget, System.Object, System.Object> invoke);
Parameters
name
string
The method name.
argumentTypes
Type
Types of all method parameters, including optional parameters.
defaultValues
Object
Default values for all optional parameters at the end of the argument list.
invoke
Func<TTarget, Object, Object>
Function to invoke the method on a given target with a specified argument list.
Properties
ArgumentTypes
The exact types expected for the method's arguments.
Property Value
DeclaringType
The type on which the member is declared.
Property Value
Name
The member name.
Property Value
OptionalArgumentCount
The number of optional arguments at the end of the argument list.
Property Value
Remarks
Optional arguments can be provided with Missing in order to ignore them in the invocation.
ReturnType
The method's return type.
Property Value
Methods
Invoke(Object, Object)
Invokes the underlying method.
Parameters
target
Object
The object instance on which to invoke the method.
arguments
Object
The arguments to provide to the method.
Returns
TReturn