CSLA .NET 10.0.0
A home for your business logic
Loading...
Searching...
No Matches
Csla.Reflection.ServiceProviderMethodCaller Class Reference

Methods to dynamically find/invoke methods with data portal and DI provided params. More...

Inheritance diagram for Csla.Reflection.ServiceProviderMethodCaller:
Csla.Core.IUseApplicationContext

Public Member Functions

ServiceProviderMethodInfo FindDataPortalMethod< T > (object target, object?[]? criteria)
 Find a method based on data portal criteria and providing any remaining parameters with values from an IServiceProvider.
ServiceProviderMethodInfo FindDataPortalMethod< T > ([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type targetType, object?[]? criteria)
 Find a method based on data portal criteria and providing any remaining parameters with values from an IServiceProvider.
bool TryFindDataPortalMethod< T > ([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type? targetType, object?[]? criteria, [NotNullWhen(true)] out ServiceProviderMethodInfo? dataPortalMethod)
 Find a method based on data portal criteria and providing any remaining parameters with values from an IServiceProvider.
async Task< object?> CallMethodTryAsync (object obj, ServiceProviderMethodInfo method, object?[]? parameters)
 Invoke a method async if possible, providing parameters from the params array and from DI.

Detailed Description

Methods to dynamically find/invoke methods with data portal and DI provided params.

Member Function Documentation

◆ CallMethodTryAsync()

async Task< object?> Csla.Reflection.ServiceProviderMethodCaller.CallMethodTryAsync ( object obj,
ServiceProviderMethodInfo method,
object??[] parameters )
inline

Invoke a method async if possible, providing parameters from the params array and from DI.

Parameters
objTarget object
methodMethod to invoke
parametersCriteria params array
Exceptions
ArgumentNullExceptionobj or method is null.

◆ FindDataPortalMethod< T >() [1/2]

ServiceProviderMethodInfo Csla.Reflection.ServiceProviderMethodCaller.FindDataPortalMethod< T > ( [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type targetType,
object??[] criteria )
inline

Find a method based on data portal criteria and providing any remaining parameters with values from an IServiceProvider.

Parameters
targetTypeObject with methods
criteriaData portal criteria values
Exceptions
ArgumentNullExceptiontargetType is null.
Type Constraints
T :DataPortalOperationAttribute 

◆ FindDataPortalMethod< T >() [2/2]

ServiceProviderMethodInfo Csla.Reflection.ServiceProviderMethodCaller.FindDataPortalMethod< T > ( object target,
object??[] criteria )
inline

Find a method based on data portal criteria and providing any remaining parameters with values from an IServiceProvider.

Parameters
targetObject with methods
criteriaData portal criteria values
Exceptions
ArgumentNullExceptiontarget is null.
Type Constraints
T :DataPortalOperationAttribute 

◆ TryFindDataPortalMethod< T >()

bool Csla.Reflection.ServiceProviderMethodCaller.TryFindDataPortalMethod< T > ( [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type? targetType,
object??[] criteria,
[NotNullWhen(true)] out ServiceProviderMethodInfo? dataPortalMethod )
inline

Find a method based on data portal criteria and providing any remaining parameters with values from an IServiceProvider.

Template Parameters
TType of attribute to look for
Parameters
targetTypeType of domain object
criteriaData portal criteria values
dataPortalMethodThe maybe found method.
Returns
true if a method with the provided attribute was found. Otherwise false.
Type Constraints
T :DataPortalOperationAttribute 

The documentation for this class was generated from the following file: