public void Add(SudokuSolveStep step) { lock (stepsLock) { this.steps.Add(step); } }
public SudokuNewStepEventArgs(SudokuSolveStep step) { if (step == null) { throw new ArgumentNullException("step"); } this.step = step; }
private bool TryGetCurrentStep(out SudokuSolveStep currentStep) { currentStep = null; var steps = this.steps; if (steps.Count == 0) { return(false); //no step } var currentStepIndex = this.currentStepIndex; if (currentStepIndex < 0 || currentStepIndex >= steps.Count) { return(false); } currentStep = steps[currentStepIndex]; return(true); }