internal TreeProgressManager(ITreeProgressCallback progressCallback) { this.progressCallback = progressCallback; //In order to use DepthManager as an IDisposable everywhere, we need to have a dummy type //to call Dispose() on. As such, if we don't have a progressCallback we use the DefaultDepthManager. depthManager = progressCallback?.DepthManager ?? new DefaultDepthManager(); }
internal TreeBuilder(PrtgClient client, FlagEnum <TreeParseOption>?options, ITreeProgressCallback progressCallback, FlagEnum <TreeRequestType> requestType, CancellationToken token) { ProgressManager = new TreeProgressManager(progressCallback); ObjectManager = new ObjectManager(client); Token = token; Options = options ?? TreeParseOption.Common; RequestType = requestType; this.client = client; }