Немного легкой утренней наркомании
Jul. 2nd, 2013 06:05 am![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
public static void CallWithEscapeContinuation(Action<Action> f) { var escapeTag = new Exception(); Action escapeProcedure = () => { throw escapeTag; }; try { f(escapeProcedure); } catch (Exception e) { if (ReferenceEquals(escapeTag, e)) return; throw; } }