{"action":"opened","issue":{"url":"https://api.github.com/repos/rexm/Handlebars.Net/issues/163","repository_url":"https://api.github.com/repos/rexm/Handlebars.Net","labels_url":"https://api.github.com/repos/rexm/Handlebars.Net/issues/163/labels{/name}","comments_url":"https://api.github.com/repos/rexm/Handlebars.Net/issues/163/comments","events_url":"https://api.github.com/repos/rexm/Handlebars.Net/issues/163/events","html_url":"https://github.com/rexm/Handlebars.Net/issues/163","id":185847213,"number":163,"title":"Running Handlebars with different configurations","user":{"login":"GennadyPonomarev","id":4773042,"avatar_url":"https://avatars.githubusercontent.com/u/4773042?v=3","gravatar_id":"","url":"https://api.github.com/users/GennadyPonomarev","html_url":"https://github.com/GennadyPonomarev","followers_url":"https://api.github.com/users/GennadyPonomarev/followers","following_url":"https://api.github.com/users/GennadyPonomarev/following{/other_user}","gists_url":"https://api.github.com/users/GennadyPonomarev/gists{/gist_id}","starred_url":"https://api.github.com/users/GennadyPonomarev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GennadyPonomarev/subscriptions","organizations_url":"https://api.github.com/users/GennadyPonomarev/orgs","repos_url":"https://api.github.com/users/GennadyPonomarev/repos","events_url":"https://api.github.com/users/GennadyPonomarev/events{/privacy}","received_events_url":"https://api.github.com/users/GennadyPonomarev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-28T06:17:46Z","updated_at":"2016-10-28T06:17:46Z","closed_at":null,"body":"I'd like to write a webservice which takes template and parameters in and returns rendered text.\r\n\r\nIt looks like to achieve thatI need to run two handlebars instances in parallel, with different configurations. One will be used for html templates and the other for plain text templates (sms). In the latter case I'll provide custom ITextEncoder. I'm afraid that using static HandlebarsConfiguration from Handlebars class will lead to race conditions (constantly changing ITextEncoder in configuration, running Handlebars.Compile with wrong ITextEncoder will lead to errors in the resulting text).\r\n\r\nIs this use case currently supported? I saw a pull request from mikeofireland. He exposed HandlebarsEnvironment, so it can be instancinated with independent configurations. Are there any drawbacks of such approach?"}}
{"actor":{"display_login":"GennadyPonomarev"}}