{"action":"opened","issue":{"url":"https://api.github.com/repos/simpleinjector/SimpleInjector/issues/157","labels_url":"https://api.github.com/repos/simpleinjector/SimpleInjector/issues/157/labels{/name}","comments_url":"https://api.github.com/repos/simpleinjector/SimpleInjector/issues/157/comments","events_url":"https://api.github.com/repos/simpleinjector/SimpleInjector/issues/157/events","html_url":"https://github.com/simpleinjector/SimpleInjector/issues/157","id":121691383,"number":157,"title":"Cannot access a disposed object. ExecutionContextScope","user":{"login":"oruchreis","id":3736187,"avatar_url":"https://avatars.githubusercontent.com/u/3736187?v=3","gravatar_id":"","url":"https://api.github.com/users/oruchreis","html_url":"https://github.com/oruchreis","followers_url":"https://api.github.com/users/oruchreis/followers","following_url":"https://api.github.com/users/oruchreis/following{/other_user}","gists_url":"https://api.github.com/users/oruchreis/gists{/gist_id}","starred_url":"https://api.github.com/users/oruchreis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oruchreis/subscriptions","organizations_url":"https://api.github.com/users/oruchreis/orgs","repos_url":"https://api.github.com/users/oruchreis/repos","events_url":"https://api.github.com/users/oruchreis/events{/privacy}","received_events_url":"https://api.github.com/users/oruchreis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-11T11:32:48Z","updated_at":"2015-12-11T11:32:48Z","closed_at":null,"body":"Hi,\r\nI'm getting this error:\r\n\"Cannot access a disposed object.\\r\\nObject name: 'SimpleInjector.Extensions.ExecutionContextScoping.ExecutionContextScope'\"\r\nBecause I can't check the current execution scope for disposing in lifestyleSelector. I've fixed the issue with reflection to access to state property of the scope\r\n```csharp\r\npublic static readonly ScopedLifestyle HybridScopedLifestyle = Lifestyle.CreateHybrid(\r\n            lifestyleSelector: () =>\r\n                               {\r\n                                   var scopeAsync = Container.GetCurrentExecutionContextScope();\r\n                                   return scopeAsync != null && scopeAsync.GetPropertyValue(\"state\", Flags.InstancePrivate).ToString() == \"Alive\";\r\n                               },\r\n            trueLifestyle: new ExecutionContextScopeLifestyle(),\r\n            falseLifestyle: new LifetimeScopeLifestyle());\r\n```\r\nCould you add IsDisposed property to the Scope class?"}}