{"action":"created","issue":{"url":"https://api.github.com/repos/Particular/docs.particular.net/issues/1497","repository_url":"https://api.github.com/repos/Particular/docs.particular.net","labels_url":"https://api.github.com/repos/Particular/docs.particular.net/issues/1497/labels{/name}","comments_url":"https://api.github.com/repos/Particular/docs.particular.net/issues/1497/comments","events_url":"https://api.github.com/repos/Particular/docs.particular.net/issues/1497/events","html_url":"https://github.com/Particular/docs.particular.net/issues/1497","id":153532292,"number":1497,"title":"Lacking proper guidance for customers who used to inject IBus in their custom classes when using NServiceBus.Host","user":{"login":"indualagarsamy","id":854553,"avatar_url":"https://avatars.githubusercontent.com/u/854553?v=3","gravatar_id":"","url":"https://api.github.com/users/indualagarsamy","html_url":"https://github.com/indualagarsamy","followers_url":"https://api.github.com/users/indualagarsamy/followers","following_url":"https://api.github.com/users/indualagarsamy/following{/other_user}","gists_url":"https://api.github.com/users/indualagarsamy/gists{/gist_id}","starred_url":"https://api.github.com/users/indualagarsamy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indualagarsamy/subscriptions","organizations_url":"https://api.github.com/users/indualagarsamy/orgs","repos_url":"https://api.github.com/users/indualagarsamy/repos","events_url":"https://api.github.com/users/indualagarsamy/events{/privacy}","received_events_url":"https://api.github.com/users/indualagarsamy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Particular/docs.particular.net/milestones/1","html_url":"https://github.com/Particular/docs.particular.net/milestones/CoreV6","labels_url":"https://api.github.com/repos/Particular/docs.particular.net/milestones/1/labels","id":1708315,"number":1,"title":"CoreV6","description":"","creator":{"login":"andreasohlund","id":125028,"avatar_url":"https://avatars.githubusercontent.com/u/125028?v=3","gravatar_id":"","url":"https://api.github.com/users/andreasohlund","html_url":"https://github.com/andreasohlund","followers_url":"https://api.github.com/users/andreasohlund/followers","following_url":"https://api.github.com/users/andreasohlund/following{/other_user}","gists_url":"https://api.github.com/users/andreasohlund/gists{/gist_id}","starred_url":"https://api.github.com/users/andreasohlund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreasohlund/subscriptions","organizations_url":"https://api.github.com/users/andreasohlund/orgs","repos_url":"https://api.github.com/users/andreasohlund/repos","events_url":"https://api.github.com/users/andreasohlund/events{/privacy}","received_events_url":"https://api.github.com/users/andreasohlund/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":10,"state":"open","created_at":"2016-04-15T06:36:30Z","updated_at":"2016-05-09T17:57:41Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2016-05-06T20:31:27Z","updated_at":"2016-05-10T03:27:30Z","closed_at":null,"body":"Relates to https://github.com/Particular/V6Launch/issues/27\r\n\r\n**IBus is gone. What now?**\r\nFrom a NServiceBus.Host perspective, for people that used to get IBus injected into their own containers,what now?\r\n\r\nShould they be using `IEndpointInstance`?  If they are self hosting, they can get the `IEndpointInstance` when they create the bus and the documentation is clear, however how does one get to the `IEndpointInstance` when using the NServiceBus.Host? When using the NServiceBus.Host's `IWantToRunWhenEndpointStartsAndStops`, there's the `IManageSession` interface. Should the users use that in lieu of what was `IBus`? \r\n\r\nThere's no documentation on `IManageSession`. Nothing in the upgrade guides either. \r\nSo, from a user perspective, who only knew `IBus` before, now there's `IEndpointInstance`, `IManageSession` and the `IHandlerContext`. What should they use if they want to hang on the concept of IBus like before? \r\n\r\n- Also previously IBus was injected:\r\n\r\n```c#\r\n[Inject]\r\npublic IBus Bus {get; set;}\r\n```\r\n\r\nDoes it now become?\r\n\r\n```c#\r\n[Inject]\r\npublic IEndpointInstance EndpointInstance {get; set;}\r\n```\r\n\r\nor\r\n\r\n```c#\r\n[Inject]\r\npublic IManageSession EndpointSession {get; set;}\r\n```\r\n\r\nHowever, acc to http://docs.particular.net/nservicebus/messaging/send-a-message#outside-a-message-handler, IEndpointInstance is not registered. What should the user do? \r\n\r\nCan we create a sample using on of the containers to illustrate this scenario?\r\nBecause this is going to be a common scenario for a lot of our users who use the NServiceBus.Host. "},"comment":{"url":"https://api.github.com/repos/Particular/docs.particular.net/issues/comments/218050175","html_url":"https://github.com/Particular/docs.particular.net/issues/1497#issuecomment-218050175","issue_url":"https://api.github.com/repos/Particular/docs.particular.net/issues/1497","id":218050175,"user":{"login":"indualagarsamy","id":854553,"avatar_url":"https://avatars.githubusercontent.com/u/854553?v=3","gravatar_id":"","url":"https://api.github.com/users/indualagarsamy","html_url":"https://github.com/indualagarsamy","followers_url":"https://api.github.com/users/indualagarsamy/followers","following_url":"https://api.github.com/users/indualagarsamy/following{/other_user}","gists_url":"https://api.github.com/users/indualagarsamy/gists{/gist_id}","starred_url":"https://api.github.com/users/indualagarsamy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indualagarsamy/subscriptions","organizations_url":"https://api.github.com/users/indualagarsamy/orgs","repos_url":"https://api.github.com/users/indualagarsamy/repos","events_url":"https://api.github.com/users/indualagarsamy/events{/privacy}","received_events_url":"https://api.github.com/users/indualagarsamy/received_events","type":"User","site_admin":false},"created_at":"2016-05-10T03:27:30Z","updated_at":"2016-05-10T03:27:30Z","body":"@Particular/nservicebus-maintainers - \r\n\r\nA lot of our users are going to have a common component library that has an injected IBus like this:\r\nhttps://github.com/indualagarsamy/MigrateIBus/blob/master/MigrateIBus/SharedCommonUsingV5Core/SomeComponentThatUsesTheBus.cs#L6\r\n\r\nThat gets used in the host, for example:\r\nhttps://github.com/indualagarsamy/MigrateIBus/blob/master/MigrateIBus/NsbHostUsingV5Core/Bootstrapper.cs#L16\r\n\r\nCan you please add enough information on how that can be migrated over to V6?\r\nWhat's the correct way?\r\n\r\nIs floating the appropriate context in the interface methods the only right approach? Or is there any other way in which this can be injected. "}}