Rhino.Context.SetInstructionObserverThreshold C# (CSharp) Method

SetInstructionObserverThreshold() public method

Set threshold of executed instructions counter that triggers call to observeInstructionCount().
Set threshold of executed instructions counter that triggers call to observeInstructionCount(). When the threshold is zero, instruction counting is disabled, otherwise each time the run-time executes at least the threshold value of script instructions, observeInstructionCount() will be called.

Note that the meaning of "instruction" is not guaranteed to be consistent between compiled and interpretive modes: executing a given script or function in the different modes will result in different instruction counts against the threshold. SetGenerateObserverCount(bool) is called with true if threshold is greater than zero, false otherwise.

public SetInstructionObserverThreshold ( int threshold ) : void
threshold int The instruction threshold
return void
		public void SetInstructionObserverThreshold(int threshold)
		{
			if (@sealed)
			{
				OnSealedMutation();
			}
			if (threshold < 0)
			{
				throw new ArgumentException();
			}
			instructionThreshold = threshold;
			SetGenerateObserverCount(threshold > 0);
		}
Context