{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/Vipr/issues/38","labels_url":"https://api.github.com/repos/Microsoft/Vipr/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/Vipr/issues/38/comments","events_url":"https://api.github.com/repos/Microsoft/Vipr/issues/38/events","html_url":"https://github.com/Microsoft/Vipr/issues/38","id":58272739,"number":38,"title":"IOdcmWriter intent and design ","user":{"login":"marcote","id":2897427,"avatar_url":"https://avatars.githubusercontent.com/u/2897427?v=3","gravatar_id":"","url":"https://api.github.com/users/marcote","html_url":"https://github.com/marcote","followers_url":"https://api.github.com/users/marcote/followers","following_url":"https://api.github.com/users/marcote/following{/other_user}","gists_url":"https://api.github.com/users/marcote/gists{/gist_id}","starred_url":"https://api.github.com/users/marcote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcote/subscriptions","organizations_url":"https://api.github.com/users/marcote/orgs","repos_url":"https://api.github.com/users/marcote/repos","events_url":"https://api.github.com/users/marcote/events{/privacy}","received_events_url":"https://api.github.com/users/marcote/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-19T21:29:36Z","updated_at":"2015-02-19T22:34:36Z","closed_at":null,"body":"Hi there,\r\n\r\nWe want to implement the newly IOdcmWriter interface, but after reviewing some code, specially in the SourceCodeGenerator, I'm not sure about the intent.\r\nhttps://github.com/Microsoft/Vipr/blob/master/src/Core/Vipr.Core/IOdcmWriter.cs#L11 \r\n\r\nI understand the purpose separating the source (or generated code) from the storage implementation, but I have concerns about using a Dictionary as the placeholder in terms of flexibility. \r\n\r\nIn the case of the CSharpWriter, there's only one file involved, but on the T4-based writer (Java and iOS) side we have multiple files generated (75 file if we use the Exchange metadata as example).\r\n\r\nIn our current implementation, we simply pass the output of the T4 Engine to a IFileWriter implementation: \r\n\r\nhttps://github.com/MSOpenTech/Vipr/blob/dev/src/CLI/Vipr.CLI/Strategies/BaseTemplateProcessor.cs#L137\r\n\r\nPerhaps returning an Action and delegating to the implementor what's the next step required to store the files can be more flexible rather than using a plain data structure as a placeholder.\r\n\r\nIs it possible to review the design and intent and consider our scenario? \r\n\r\nThanks in advance.\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/Vipr/issues/comments/75153319","html_url":"https://github.com/Microsoft/Vipr/issues/38#issuecomment-75153319","issue_url":"https://api.github.com/repos/Microsoft/Vipr/issues/38","id":75153319,"user":{"login":"piotrpMSFT","id":2379589,"avatar_url":"https://avatars.githubusercontent.com/u/2379589?v=3","gravatar_id":"","url":"https://api.github.com/users/piotrpMSFT","html_url":"https://github.com/piotrpMSFT","followers_url":"https://api.github.com/users/piotrpMSFT/followers","following_url":"https://api.github.com/users/piotrpMSFT/following{/other_user}","gists_url":"https://api.github.com/users/piotrpMSFT/gists{/gist_id}","starred_url":"https://api.github.com/users/piotrpMSFT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piotrpMSFT/subscriptions","organizations_url":"https://api.github.com/users/piotrpMSFT/orgs","repos_url":"https://api.github.com/users/piotrpMSFT/repos","events_url":"https://api.github.com/users/piotrpMSFT/events{/privacy}","received_events_url":"https://api.github.com/users/piotrpMSFT/received_events","type":"User","site_admin":false},"created_at":"2015-02-19T22:34:36Z","updated_at":"2015-02-19T22:34:36Z","body":"I'll throw out one alternate design to get us started. Instead of a Dictionary<string, string> we can have an IEnumerable<OutputFile>\r\n\r\n    public struct OutputFile\r\n    {\r\n        string RelativePath {get;set;}\r\n        string FileContents {get; set;}\r\n    }\r\n\r\nThis does a much better job of expressing the intent of the Writer's output, I think."}}