{"action":"created","issue":{"url":"https://api.github.com/repos/Particular/NServiceBus.RavenDB/issues/184","repository_url":"https://api.github.com/repos/Particular/NServiceBus.RavenDB","labels_url":"https://api.github.com/repos/Particular/NServiceBus.RavenDB/issues/184/labels{/name}","comments_url":"https://api.github.com/repos/Particular/NServiceBus.RavenDB/issues/184/comments","events_url":"https://api.github.com/repos/Particular/NServiceBus.RavenDB/issues/184/events","html_url":"https://github.com/Particular/NServiceBus.RavenDB/pull/184","id":145719976,"number":184,"title":"Adding SetRavenSession extension for IMessageHandlerContext","user":{"login":"timbussmann","id":3524870,"avatar_url":"https://avatars.githubusercontent.com/u/3524870?v=3","gravatar_id":"","url":"https://api.github.com/users/timbussmann","html_url":"https://github.com/timbussmann","followers_url":"https://api.github.com/users/timbussmann/followers","following_url":"https://api.github.com/users/timbussmann/following{/other_user}","gists_url":"https://api.github.com/users/timbussmann/gists{/gist_id}","starred_url":"https://api.github.com/users/timbussmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timbussmann/subscriptions","organizations_url":"https://api.github.com/users/timbussmann/orgs","repos_url":"https://api.github.com/users/timbussmann/repos","events_url":"https://api.github.com/users/timbussmann/events{/privacy}","received_events_url":"https://api.github.com/users/timbussmann/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-04T15:33:19Z","updated_at":"2016-04-04T20:22:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Particular/NServiceBus.RavenDB/pulls/184","html_url":"https://github.com/Particular/NServiceBus.RavenDB/pull/184","diff_url":"https://github.com/Particular/NServiceBus.RavenDB/pull/184.diff","patch_url":"https://github.com/Particular/NServiceBus.RavenDB/pull/184.patch"},"body":"Connects to Particular/NServiceBus.Testing#29\r\n\r\nFor testability users need to be able to configure a session on `IMessageHandlerContext` so that `context.SynchronizedStorage.RavenSession()` works correctly. The setter needs to be on the context itself since the the `RavenSession` extension is basically just a casting operator and the SynchronizedStorage property can't be set.\r\n\r\n@SzymonPobiega what do you think?\r\n\r\nAlso, should there actually be a `context.GetRavenSession()` extension available? I think we talked once about this but I can't remember the outcome. It would certainly be more aligned with the setter."},"comment":{"url":"https://api.github.com/repos/Particular/NServiceBus.RavenDB/issues/comments/205478475","html_url":"https://github.com/Particular/NServiceBus.RavenDB/pull/184#issuecomment-205478475","issue_url":"https://api.github.com/repos/Particular/NServiceBus.RavenDB/issues/184","id":205478475,"user":{"login":"DavidBoike","id":427110,"avatar_url":"https://avatars.githubusercontent.com/u/427110?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidBoike","html_url":"https://github.com/DavidBoike","followers_url":"https://api.github.com/users/DavidBoike/followers","following_url":"https://api.github.com/users/DavidBoike/following{/other_user}","gists_url":"https://api.github.com/users/DavidBoike/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidBoike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidBoike/subscriptions","organizations_url":"https://api.github.com/users/DavidBoike/orgs","repos_url":"https://api.github.com/users/DavidBoike/repos","events_url":"https://api.github.com/users/DavidBoike/events{/privacy}","received_events_url":"https://api.github.com/users/DavidBoike/received_events","type":"User","site_admin":false},"created_at":"2016-04-04T20:22:44Z","updated_at":"2016-04-04T20:22:44Z","body":"Could we mitigate that risk by throwing an exception if SetRavenSession is called at the \"wrong\" time?"}}