{"action":"created","issue":{"url":"https://api.github.com/repos/bridgedotnet/Bridge/issues/1758","repository_url":"https://api.github.com/repos/bridgedotnet/Bridge","labels_url":"https://api.github.com/repos/bridgedotnet/Bridge/issues/1758/labels{/name}","comments_url":"https://api.github.com/repos/bridgedotnet/Bridge/issues/1758/comments","events_url":"https://api.github.com/repos/bridgedotnet/Bridge/issues/1758/events","html_url":"https://github.com/bridgedotnet/Bridge/issues/1758","id":175154525,"number":1758,"title":"New ObjectCreateMode for ObjectLiteralAttribute","user":{"login":"geoffreymcgill","id":62210,"avatar_url":"https://avatars.githubusercontent.com/u/62210?v=3","gravatar_id":"","url":"https://api.github.com/users/geoffreymcgill","html_url":"https://github.com/geoffreymcgill","followers_url":"https://api.github.com/users/geoffreymcgill/followers","following_url":"https://api.github.com/users/geoffreymcgill/following{/other_user}","gists_url":"https://api.github.com/users/geoffreymcgill/gists{/gist_id}","starred_url":"https://api.github.com/users/geoffreymcgill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoffreymcgill/subscriptions","organizations_url":"https://api.github.com/users/geoffreymcgill/orgs","repos_url":"https://api.github.com/users/geoffreymcgill/repos","events_url":"https://api.github.com/users/geoffreymcgill/events{/privacy}","received_events_url":"https://api.github.com/users/geoffreymcgill/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bridgedotnet/Bridge/labels/feature","name":"feature","color":"2ECC40"}],"state":"open","locked":false,"assignee":{"login":"vladsch","id":378225,"avatar_url":"https://avatars.githubusercontent.com/u/378225?v=3","gravatar_id":"","url":"https://api.github.com/users/vladsch","html_url":"https://github.com/vladsch","followers_url":"https://api.github.com/users/vladsch/followers","following_url":"https://api.github.com/users/vladsch/following{/other_user}","gists_url":"https://api.github.com/users/vladsch/gists{/gist_id}","starred_url":"https://api.github.com/users/vladsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladsch/subscriptions","organizations_url":"https://api.github.com/users/vladsch/orgs","repos_url":"https://api.github.com/users/vladsch/repos","events_url":"https://api.github.com/users/vladsch/events{/privacy}","received_events_url":"https://api.github.com/users/vladsch/received_events","type":"User","site_admin":false},"assignees":[{"login":"vladsch","id":378225,"avatar_url":"https://avatars.githubusercontent.com/u/378225?v=3","gravatar_id":"","url":"https://api.github.com/users/vladsch","html_url":"https://github.com/vladsch","followers_url":"https://api.github.com/users/vladsch/followers","following_url":"https://api.github.com/users/vladsch/following{/other_user}","gists_url":"https://api.github.com/users/vladsch/gists{/gist_id}","starred_url":"https://api.github.com/users/vladsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladsch/subscriptions","organizations_url":"https://api.github.com/users/vladsch/orgs","repos_url":"https://api.github.com/users/vladsch/repos","events_url":"https://api.github.com/users/vladsch/events{/privacy}","received_events_url":"https://api.github.com/users/vladsch/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/bridgedotnet/Bridge/milestones/25","html_url":"https://github.com/bridgedotnet/Bridge/milestones/1.15","labels_url":"https://api.github.com/repos/bridgedotnet/Bridge/milestones/25/labels","id":1753384,"number":25,"title":"1.15","description":"","creator":{"login":"geoffreymcgill","id":62210,"avatar_url":"https://avatars.githubusercontent.com/u/62210?v=3","gravatar_id":"","url":"https://api.github.com/users/geoffreymcgill","html_url":"https://github.com/geoffreymcgill","followers_url":"https://api.github.com/users/geoffreymcgill/followers","following_url":"https://api.github.com/users/geoffreymcgill/following{/other_user}","gists_url":"https://api.github.com/users/geoffreymcgill/gists{/gist_id}","starred_url":"https://api.github.com/users/geoffreymcgill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoffreymcgill/subscriptions","organizations_url":"https://api.github.com/users/geoffreymcgill/orgs","repos_url":"https://api.github.com/users/geoffreymcgill/repos","events_url":"https://api.github.com/users/geoffreymcgill/events{/privacy}","received_events_url":"https://api.github.com/users/geoffreymcgill/received_events","type":"User","site_admin":false},"open_issues":43,"closed_issues":149,"state":"open","created_at":"2016-05-07T23:58:29Z","updated_at":"2016-09-06T03:55:58Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-09-06T03:44:46Z","updated_at":"2016-09-06T05:34:02Z","closed_at":null,"body":"**ObjectCreateMode** options include:\r\n\r\n```cs\r\n// Emit default values for all\r\nConstructor // default\r\n\r\n// Emit an object literal configuration\r\nPlain\r\n```\r\n\r\n### Expected\r\n\r\n```js\r\nvar config1 = Demo.Config.ctor(); // returns an object literal\r\nvar config2 = Demo.Config.ctor(); // returns an object literal\r\nvar config3 = { val1: 1, val2: 0 }; // emits an object literal\r\n```\r\n\r\n### Steps To Reproduce\r\n\r\n```csharp\r\npublic class App\r\n{\r\n    public static void Main()\r\n    {\r\n        var config1 = new Config1 { };\r\n        var config2 = new Config2 { };\r\n        var config3 = new Config3 { };\r\n    }\r\n}\r\n\r\n[ObjectLiteral]\r\npublic class Config1\r\n{\r\n    public int Val1 = 1;\r\n    public int Val2;\r\n}\r\n\r\n[ObjectLiteral(ObjectCreateMode.Constructor)]\r\npublic class Config2\r\n{\r\n    public int Val1 = 1;\r\n    public int Val2;\r\n}\r\n\r\n[ObjectLiteral(ObjectCreateMode.Plain)]\r\npublic class Config3\r\n{\r\n    public int Val1 = 1;\r\n    public int Val2;\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/bridgedotnet/Bridge/issues/comments/244853807","html_url":"https://github.com/bridgedotnet/Bridge/issues/1758#issuecomment-244853807","issue_url":"https://api.github.com/repos/bridgedotnet/Bridge/issues/1758","id":244853807,"user":{"login":"kcudnik","id":17052279,"avatar_url":"https://avatars.githubusercontent.com/u/17052279?v=3","gravatar_id":"","url":"https://api.github.com/users/kcudnik","html_url":"https://github.com/kcudnik","followers_url":"https://api.github.com/users/kcudnik/followers","following_url":"https://api.github.com/users/kcudnik/following{/other_user}","gists_url":"https://api.github.com/users/kcudnik/gists{/gist_id}","starred_url":"https://api.github.com/users/kcudnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kcudnik/subscriptions","organizations_url":"https://api.github.com/users/kcudnik/orgs","repos_url":"https://api.github.com/users/kcudnik/repos","events_url":"https://api.github.com/users/kcudnik/events{/privacy}","received_events_url":"https://api.github.com/users/kcudnik/received_events","type":"User","site_admin":false},"created_at":"2016-09-06T05:34:02Z","updated_at":"2016-09-06T05:34:02Z","body":"Will there be similar option like DefaultValueMode.Ignore ? to get \"{ }\" ?"}}
{"actor":{"display_login":"kcudnik"}}