Method Guard
Guard(ITool)
The tool to use when side effects must not happen: tool itself when it
declares that it only reads (None, LocalRead,
NetworkRead), otherwise a SimulatedTool answering for it.
public static ITool Guard(ITool tool)
Parameters
toolIToolThe tool to guard.
Returns
- ITool
The tool or its simulation; null when
toolis null.
Guard(ITool, SimulationPurpose)
The tool to use when side effects must not happen, simulated for purpose:
tool itself when it only reads, or when it is already a simulation (which
keeps its own purpose), otherwise a SimulatedTool answering for it.
public static ITool Guard(ITool tool, SimulatedTool.SimulationPurpose purpose)
Parameters
toolIToolThe tool to guard.
purposeSimulatedTool.SimulationPurposeWhy the tool is simulated.
Returns
- ITool
The tool or its simulation; null when
toolis null.