/// <summary> /// Executes the delegate in a context where every read returns the value as /// it was at transaction opening. Writes still work, even though their /// effects cannot be seen in this context. And please note that /// <see cref="Shielded<T>.Modify"/> will not be affected and will expose /// the last written value. /// </summary> public static T ReadOldState <T>(Func <T> act) { T retVal = default(T); Shield.ReadOldState(() => { retVal = act(); }); return(retVal); }