Created
April 16, 2015 01:53
-
-
Save Blecki/024c3deae40da5b7a396 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Whatever | |
{ | |
private class StaticBool { public bool Value = false; } | |
public RuleBuilder<T0, T1, TR> FirstTimeOnly() | |
{ | |
var fakeStatic = new StaticBool(); | |
return this.When((P0, P1) => | |
{ | |
if (fakeStatic.Value) return false; | |
fakeStatic.Value = true; | |
return true; | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment