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

Enables simple invocation of methods against the contained object using late binding. More...

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

Public Member Functions

 LateBoundObject (object instance)
 Contains the provided object within a new LateBoundObject.
object? CallMethodIfImplemented (string method)
 Uses reflection to dynamically invoke a method if that method is implemented on the target object.
object? CallMethodIfImplemented (string method, params object[] parameters)
 Uses reflection to dynamically invoke a method if that method is implemented on the target object.
object? CallMethod (string method)
 Uses reflection to dynamically invoke a method, throwing an exception if it is not implemented on the target object.
object? CallMethod (string method, params object?[]? parameters)
 Uses reflection to dynamically invoke a method, throwing an exception if it is not implemented on the target object.
async Task CallMethodTryAsync (string methodName)
 Invokes a method using the await keyword if the method returns Task, otherwise synchronously invokes the method.
async Task CallMethodTryAsync (string methodName, params object?[]? parameters)
 Invokes a method using the await keyword if the method returns Task, otherwise synchronously invokes the method.
async Task CallMethodTryAsyncDI< T > (bool isSync, params object?[]? parameters)
 Invokes a method using the await keyword if the method returns Task, otherwise synchronously invokes the method.

Properties

object Instance [get]
 Object instance managed by LateBoundObject.

Detailed Description

Enables simple invocation of methods against the contained object using late binding.

Constructor & Destructor Documentation

◆ LateBoundObject()

Csla.Reflection.LateBoundObject.LateBoundObject ( object instance)
inline

Contains the provided object within a new LateBoundObject.

Parameters
instanceObject to contain.
Exceptions
ArgumentNullExceptioninstance is null.

Member Function Documentation

◆ CallMethod() [1/2]

object? Csla.Reflection.LateBoundObject.CallMethod ( string method)
inline

Uses reflection to dynamically invoke a method, throwing an exception if it is not implemented on the target object.

Parameters
methodName of the method.
Exceptions
ArgumentExceptionmethod is null, string.Empty or only consists of white spaces.

◆ CallMethod() [2/2]

object? Csla.Reflection.LateBoundObject.CallMethod ( string method,
params object??[] parameters )
inline

Uses reflection to dynamically invoke a method, throwing an exception if it is not implemented on the target object.

Parameters
methodName of the method.
parametersParameters to pass to method.
Exceptions
ArgumentExceptionmethod is null, string.Empty or only consists of white spaces.

◆ CallMethodIfImplemented() [1/2]

object? Csla.Reflection.LateBoundObject.CallMethodIfImplemented ( string method)
inline

Uses reflection to dynamically invoke a method if that method is implemented on the target object.

Parameters
methodName of the method.
Exceptions
ArgumentExceptionmethod is null, string.Empty or only consists of white spaces.

◆ CallMethodIfImplemented() [2/2]

object? Csla.Reflection.LateBoundObject.CallMethodIfImplemented ( string method,
params object[] parameters )
inline

Uses reflection to dynamically invoke a method if that method is implemented on the target object.

Parameters
methodName of the method.
parametersParameters to pass to method.
Exceptions
ArgumentExceptionmethod is null, string.Empty or only consists of white spaces.

◆ CallMethodTryAsync() [1/2]

async Task Csla.Reflection.LateBoundObject.CallMethodTryAsync ( string methodName)
inline

Invokes a method using the await keyword if the method returns Task, otherwise synchronously invokes the method.

Parameters
methodNameName of the method.
Exceptions
ArgumentExceptionmethodName is null, string.Empty or only consists of white spaces.

◆ CallMethodTryAsync() [2/2]

async Task Csla.Reflection.LateBoundObject.CallMethodTryAsync ( string methodName,
params object??[] parameters )
inline

Invokes a method using the await keyword if the method returns Task, otherwise synchronously invokes the method.

Parameters
methodNameName of the method.
parametersParameters to pass to method.
Exceptions
ArgumentExceptionmethodName is null, string.Empty or only consists of white spaces.

◆ CallMethodTryAsyncDI< T >()

async Task Csla.Reflection.LateBoundObject.CallMethodTryAsyncDI< T > ( bool isSync,
params object??[] parameters )
inline

Invokes a method using the await keyword if the method returns Task, otherwise synchronously invokes the method.

Parameters
isSyncIs client calling this synchronously
parametersParameters to pass to method.
Exceptions
InvalidOperationExceptionCsla.Core.IUseApplicationContext.ApplicationContext is null.
Type Constraints
T :DataPortalOperationAttribute 

Property Documentation

◆ Instance

object Csla.Reflection.LateBoundObject.Instance
get

Object instance managed by LateBoundObject.


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