-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for optional parameters in method calls (#44)
* Added support for optional parameters in method calls Handles a possible null reference exception in InvokePropertyOrField Handles a possible AmbiguousMatchException in InvokePropertyOrField * Param Branch merged, Start of improvements and InvokeMethod singleton * New interface IInvokeMethod implimentation of changes to support this new interface. InvokeMethod is now a singleton passed appropiately to dependants. --------- Co-authored-by: Richard Spurgeon <richard.spurgeon@paramet.co.uk>
- Loading branch information
Showing
6 changed files
with
419 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace NReco.Linq | ||
{ | ||
|
||
/// <summary> | ||
/// Exposes a method that allows the invoke of a method within an object | ||
/// </summary> | ||
/// <remarks> | ||
/// Interface to allow different implimentations of invoke method with different capabilities. | ||
/// ensures backwards compatibility and behavour. | ||
/// </remarks> | ||
public interface IInvokeMethod | ||
{ | ||
|
||
/// <summary> | ||
/// Invokes a method within an object (targetobject), given a set of arguments / parameters passed to method | ||
/// </summary> | ||
/// <returns>An object reference to the return value of the method</returns> | ||
object Invoke(object TargetObject, string MethodName, object[] args); | ||
|
||
} | ||
} |
Oops, something went wrong.