Table of Contents

Interface IJsonProgress

Namespace
CADability
Assembly
CADability.dll

Receives the progress of FromStream(Stream, IJsonProgress) and ToStream(Stream, object, IJsonProgress, bool). The progress runs from 0 to 100 percent in phases: each phase sets the size of its steps with SetStepIncrement(double) and then reports the steps it has done with DoStep(int). Reading parses the text (15 percent, a step per character), calls OnDeserialization (5 percent) and SerializationDone (80 percent); writing does a step per IGeoObject, so the caller sets the step size before writing.

public interface IJsonProgress

Methods

DoStep(int)

Reports that doneSteps more steps of the current phase are done.

void DoStep(int doneSteps = 1)

Parameters

doneSteps int

number of steps done since the last call

SetCompleted()

Reading or writing is finished; a progress display can be hidden. JsonSerialize does not call it, the caller does.

void SetCompleted()

SetStepIncrement(double)

Starts a new phase at the current position, in which each step advances the progress by increment percent.

void SetStepIncrement(double increment)

Parameters

increment double

percent per step