Description
The InvokeWithWarning
method is a static extension method provided by the SandboxSystemExtensions
class. It allows you to execute a given action while providing a warning mechanism. This method is useful for scenarios where you want to ensure that an action is executed with a cautionary note, potentially logging or handling exceptions that might occur during the execution of the action.
Usage
To use the InvokeWithWarning
method, you need to pass a delegate of type System.Action
that represents the method you want to execute. This method does not return any value and is primarily used for its side effects.
Example usage:
System.Action myAction = () => {
// Your code here
};
SandboxSystemExtensions.InvokeWithWarning(myAction);
Example
System.Action myAction = () => {
// Your code here
};
SandboxSystemExtensions.InvokeWithWarning(myAction);