9using System.Threading.Tasks;
67 return MethodCaller.CallMethodIfImplemented(this.
Instance, method);
82 return MethodCaller.CallMethodIfImplemented(this.
Instance, method, parameters);
95 return MethodCaller.CallMethod(this.
Instance, method);
109 public object CallMethod(
string method, params
object[] parameters)
111 return MethodCaller.CallMethod(this.
Instance, method, parameters);
125 await MethodCaller.CallMethodTryAsync(this.
Instance, methodName);
150 await MethodCaller.CallMethodTryAsync(this.
Instance, methodName, parameters);
162 private Reflection.ServiceProviderMethodCaller serviceProviderMethodCaller;
167 if (serviceProviderMethodCaller ==
null)
169 return serviceProviderMethodCaller;
189 Utilities.ThrowIfAsyncMethodOnSyncClient(
ApplicationContext, isSync, method.MethodInfo);
Provides consistent context information between the client and server DataPortal objects.
object CreateInstanceDI(Type objectType, params object[] parameters)
Creates an object using 'Activator.CreateInstance' using service provider (if one is available) to po...
ApplicationContext(ApplicationContextAccessor applicationContextAccessor)
Creates a new instance of the type
Base type for data portal operation attributes.
A strongly-typed resource class, for looking up localized strings, etc.
static string MethodCallFailed
Looks up a localized string similar to method call failed.
This exception is returned from the CallMethod method in the server-side DataPortal and contains the ...
Enables simple invocation of methods against the contained object using late binding.
async Task CallMethodTryAsync(string methodName, params object[] parameters)
Invokes a method using the await keyword if the method returns Task, otherwise synchronously invokes ...
LateBoundObject(object instance)
Contains the provided object within a new LateBoundObject.
object CallMethodIfImplemented(string method, params object[] parameters)
Uses reflection to dynamically invoke a method if that method is 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 ...
object CallMethod(string method)
Uses reflection to dynamically invoke a method, throwing an exception if it is not implemented on the...
object CallMethodIfImplemented(string method)
Uses reflection to dynamically invoke a method if that method is implemented on the target object.
async Task CallMethodTryAsyncDI< T >(bool isSync, params object[] parameters)
Invokes a method using the await keyword if the method returns Task, otherwise synchronously invokes ...
LateBoundObject(Type objectType)
Creates an instance of the specified type and contains it within a new LateBoundObject.
object CallMethod(string method, params object[] parameters)
Uses reflection to dynamically invoke a method, throwing an exception if it is not implemented on the...
object Instance
Object instance managed by LateBoundObject.
Methods to dynamically find/invoke methods with data portal and DI provided params
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