src/vs/editor/contrib/folding/foldingModel.ts/FoldingModel/getMemento
class FoldingModel:	public getMemento(): CollapseMemento | undefined {
		let collapsedRanges: ILineRange[] = [];
		for (let i = 0; i < this._regions.length; i++) {
			if (this._regions.isCollapsed(i)) {
				let range = this._textModel.getDecorationRange(this._editorDecorationIds[i]);
				if (range) {
					let startLineNumber = range.startLineNumber;
					let endLineNumber = range.endLineNumber + this._regions.getEndLineNumber(i) - this._regions.getStartLineNumber(i);
					collapsedRanges.push({ startLineNumber, endLineNumber });
				}
			}
		}
		if (collapsedRanges.length > 0) {
			return collapsedRanges;
		}
		return undefined;
	}