{"action":"created","issue":{"url":"https://api.github.com/repos/nblumhardt/stateless/issues/38","labels_url":"https://api.github.com/repos/nblumhardt/stateless/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/nblumhardt/stateless/issues/38/comments","events_url":"https://api.github.com/repos/nblumhardt/stateless/issues/38/events","html_url":"https://github.com/nblumhardt/stateless/pull/38","id":119000277,"number":38,"title":"DotGraph now renders OnEntry and OnExit actions with descriptions","user":{"login":"cmendible","id":266546,"avatar_url":"https://avatars.githubusercontent.com/u/266546?v=3","gravatar_id":"","url":"https://api.github.com/users/cmendible","html_url":"https://github.com/cmendible","followers_url":"https://api.github.com/users/cmendible/followers","following_url":"https://api.github.com/users/cmendible/following{/other_user}","gists_url":"https://api.github.com/users/cmendible/gists{/gist_id}","starred_url":"https://api.github.com/users/cmendible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmendible/subscriptions","organizations_url":"https://api.github.com/users/cmendible/orgs","repos_url":"https://api.github.com/users/cmendible/repos","events_url":"https://api.github.com/users/cmendible/events{/privacy}","received_events_url":"https://api.github.com/users/cmendible/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-26T09:01:14Z","updated_at":"2015-12-01T11:33:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nblumhardt/stateless/pulls/38","html_url":"https://github.com/nblumhardt/stateless/pull/38","diff_url":"https://github.com/nblumhardt/stateless/pull/38.diff","patch_url":"https://github.com/nblumhardt/stateless/pull/38.patch"},"body":"Hi, I've been using stateless for several months now and one of my clients was missing meaningful descriptions for *Trigger Guards*, *OnEntry* and *OnExit* actions within the *DotGraph* feature.\r\n\r\nFor instance now it's possible to write the following code (which removes the compiler generated method names such as *<test>b__5_0* from the resulting string):\r\n\r\n    machine.Configure(State.A)\r\n        .OnEntry(() => { }, \"Just entered A\")\r\n        .PermitIf(Trigger.X, State.B, () => true, \"description\");\r\n\r\nAnd get the following *DotGraph* string:\r\n\r\n    digraph {\r\n     A -> B [label=\"X [description]\"];\r\n     node [shape=box];\r\n     A -> \"Just entered A\" [label=\"On Entry\" style=dotted];\r\n    }\r\n\r\nHope you like it as much as our client  does and thanks for sharing this great code!!!\r\nCarlos\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/nblumhardt/stateless/issues/comments/160941847","html_url":"https://github.com/nblumhardt/stateless/pull/38#issuecomment-160941847","issue_url":"https://api.github.com/repos/nblumhardt/stateless/issues/38","id":160941847,"user":{"login":"cmendible","id":266546,"avatar_url":"https://avatars.githubusercontent.com/u/266546?v=3","gravatar_id":"","url":"https://api.github.com/users/cmendible","html_url":"https://github.com/cmendible","followers_url":"https://api.github.com/users/cmendible/followers","following_url":"https://api.github.com/users/cmendible/following{/other_user}","gists_url":"https://api.github.com/users/cmendible/gists{/gist_id}","starred_url":"https://api.github.com/users/cmendible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmendible/subscriptions","organizations_url":"https://api.github.com/users/cmendible/orgs","repos_url":"https://api.github.com/users/cmendible/repos","events_url":"https://api.github.com/users/cmendible/events{/privacy}","received_events_url":"https://api.github.com/users/cmendible/received_events","type":"User","site_admin":false},"created_at":"2015-12-01T11:33:22Z","updated_at":"2015-12-01T11:33:22Z","body":"Ok so in the commits above you can see I renamed the \"description\" parameters.\r\n\r\nAs for the second request I can make the \"description\" parameters required as in the following example:\r\n\r\n            public void AddEntryAction(Action<Transition, object[]> action, string description)\r\n            {\r\n                Enforce.ArgumentNotNull(description, \"description\");\r\n                _entryActions.Add(\r\n                    new EntryActionBehavior(\r\n                        Enforce.ArgumentNotNull(action, \"action\"),\r\n                        string.IsNullOrEmpty(description) ? action.Method.Name : description));\r\n            }\r\n\r\nAnd that would require a change to the ```StateRepresentationFixture``` to provide not null descriptions.\r\n\r\nAlso you can check that ```EntryActionBehavior```, ```ExitActionBehavior``` and ```TriggerBehaviour``` classes all replace the \"description\" with the methods name if the \"description\" is empty. \r\n\r\nIs that ok with you?\r\n\r\nThanks!\r\n\r\n"}}