Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class TestScript : BaseScript
- {
- public TestScript()
- {
- EventHandlers["getMapDirectives"] += new Action<dynamic>(add =>
- {
- Func<dynamic, string, Action<string>> addCB = (state, key) =>
- {
- Debug.WriteLine("adding key {0}", key);
- return new Action<string>(value =>
- {
- Debug.WriteLine("and key + value = {0} {1}", key, value);
- state.add("key", key);
- });
- };
- Action<dynamic> removeCB = (state) =>
- {
- Debug.WriteLine("removing key {0}", state.key);
- };
- add("banana", addCB, removeCB);
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement