{"action":"created","issue":{"url":"https://api.github.com/repos/JasperFx/lamar/issues/84","repository_url":"https://api.github.com/repos/JasperFx/lamar","labels_url":"https://api.github.com/repos/JasperFx/lamar/issues/84/labels{/name}","comments_url":"https://api.github.com/repos/JasperFx/lamar/issues/84/comments","events_url":"https://api.github.com/repos/JasperFx/lamar/issues/84/events","html_url":"https://github.com/JasperFx/lamar/issues/84","id":358973781,"node_id":"MDU6SXNzdWUzNTg5NzM3ODE=","number":84,"title":"Compilation failures when using ASP.NET Core's BackgroundService","user":{"login":"Megasware128","id":3170510,"node_id":"MDQ6VXNlcjMxNzA1MTA=","avatar_url":"https://avatars3.githubusercontent.com/u/3170510?v=4","gravatar_id":"","url":"https://api.github.com/users/Megasware128","html_url":"https://github.com/Megasware128","followers_url":"https://api.github.com/users/Megasware128/followers","following_url":"https://api.github.com/users/Megasware128/following{/other_user}","gists_url":"https://api.github.com/users/Megasware128/gists{/gist_id}","starred_url":"https://api.github.com/users/Megasware128/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Megasware128/subscriptions","organizations_url":"https://api.github.com/users/Megasware128/orgs","repos_url":"https://api.github.com/users/Megasware128/repos","events_url":"https://api.github.com/users/Megasware128/events{/privacy}","received_events_url":"https://api.github.com/users/Megasware128/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-09-11T09:59:28Z","updated_at":"2018-10-28T12:06:52Z","closed_at":null,"author_association":"NONE","body":"> CS1503: Argument 1: cannot convert from 'Microsoft.Extensions.Hosting.IHostedService' to 'System.IDisposable'\r\n\r\nAlso happens whenever you do `AddTransient<TService, TImplementation>` where TService doesn't implement IDisposable and TImplementation does.\r\n\r\nWorkaround I tried was changing this line in CallFuncBuilderFrame.cs and ConstructorFrame.cs:\r\n`writer.Write($\"{_scope.Usage}.{nameof(Scope.Disposables)}.Add({Variable.Usage});\");`\r\nto this:\r\n`writer.Write($\"{_scope.Usage}.{nameof(Scope.Disposables)}.Add((IDisposable){Variable.Usage});\");`\r\nwhich fixes this issue. Should this be implemented?"},"comment":{"url":"https://api.github.com/repos/JasperFx/lamar/issues/comments/433699123","html_url":"https://github.com/JasperFx/lamar/issues/84#issuecomment-433699123","issue_url":"https://api.github.com/repos/JasperFx/lamar/issues/84","id":433699123,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzY5OTEyMw==","user":{"login":"jeremydmiller","id":179211,"node_id":"MDQ6VXNlcjE3OTIxMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/179211?v=4","gravatar_id":"","url":"https://api.github.com/users/jeremydmiller","html_url":"https://github.com/jeremydmiller","followers_url":"https://api.github.com/users/jeremydmiller/followers","following_url":"https://api.github.com/users/jeremydmiller/following{/other_user}","gists_url":"https://api.github.com/users/jeremydmiller/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremydmiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremydmiller/subscriptions","organizations_url":"https://api.github.com/users/jeremydmiller/orgs","repos_url":"https://api.github.com/users/jeremydmiller/repos","events_url":"https://api.github.com/users/jeremydmiller/events{/privacy}","received_events_url":"https://api.github.com/users/jeremydmiller/received_events","type":"User","site_admin":false},"created_at":"2018-10-28T12:06:52Z","updated_at":"2018-10-28T12:06:52Z","author_association":"CONTRIBUTOR","body":"@Megasware128 @CodingGorilla I added some additional tests this morning to try to reproduce the issue and cannot. I think this was addressed in 1.1.2 and you might not have had the latest applied. See the tests for `Bug_84_concrete_type_is_disposable_service_type_is_not`"}}
{"actor":{"display_login":"jeremydmiller"}}