using System; namespace SharpCompress { public class Lazy { private readonly Func _lazyFunc; private bool _evaluated; private T _value; public Lazy(Func lazyFunc) { _lazyFunc = lazyFunc; } public T Value { get { if (!_evaluated) { _value = _lazyFunc(); _evaluated = true; } return _value; } } } }