public override object DoConsume(object product) { PicResult r = product as PicResult; if (r.pic != null) { //Utility.LogSimple(LogLevel.Debug, "Buffer setted, Params: " + panOid + ", " + (zoom + 1) + "_" + r.row + "_" + r.col + ", " + r.pic.Length); resultBuffer[r.row * (int)Math.Pow(2, r.zoom) + r.col] = r.pic; indicators[r.row * (int)Math.Pow(2, r.zoom) + r.col] = true; } return(null); }
protected override void afterJobFinished(object param) { if (param != null) { PicResult r = param as PicResult; if (indicators[r.row * (int)Math.Pow(2, r.zoom) + r.col]) { //Utility.LogSimple(LogLevel.Debug, "Repeated Tile abandoned, Params: " + panOid + ", " + (zoom + 1) + "_" + r.row + "_" + r.col); return; } EnqueueTask(param); onWorkFinished(param); finishedJobCount++; if (jobCount == finishedJobCount) { allJobArrived = true; } } }