-
Notifications
You must be signed in to change notification settings - Fork 5
Add sample of calling of codegeneration out of T4 template #37
Comments
Hi asd-and-Rizzo! Thank you for the comment, and apologies for the slow reply, I've been out for vacation. I'm not sure I understand your post, can you expand? Are you looking to run pMixins as part of a T4 pipeline? As for supporting MonoDevelop or SharpDevelop, this is unfortunately outside the scope for pMixins. I do not have enough familiarity with these IDEs to know what it would take to create a pMixins plugin targeting them. However, the code generation portion of pMixins is isolated from the host IDE such that, an instance of |
Once I used NRefractory to read cs files in project to generated try/catch wrappers during compilation when IDE called T4 (https://gitorious.org/asdandrizzo/clr/source/1fa0b825dbb9ce9e34e88e3a551dca052bb8b0d9:tools/MetaSharp/MetaSharp.Samples/ExceptionWrapper.tt). Seems I can try check if pMixing work well out of T4. If I can write try/catch decorator with pMixins. I hope pMixins support such scenarios or at least provide good DSL to work with such. |
I'm not very familiar with the inner workings of T4, but if you look at CopaceticSoftware.pMixins.CodeGenerator.Tests.IntegrationTests, this has an example in the
The most complicated part is loading the T4 in Visual Studio has access to the |
Thanks. This seems enough information to try some things to work. |
Actually what I want step by step integration of pipeline like "Read Code -> Generate Code" so existing projects can migrate by small step. Real situations I solved once times:
So I come up with solution to use NRefactory+T4 and it took me 2 days to replace runtime via compile time. Mobile solution for .NET CF of Xamarin iOS could have similar issue. And if consider that Xamarin Studio with T4 is used, I need to dig way to use pMixing without special add-in. E.g. starting with manual listing of files pMixing should now, and not dependency on whatever DI container. Starting small to inject pMixin into dev pipeline can be rather important. |
If want to support MonoDevelop or SharpDevelop, may you provide sample how to run mixing engine out of .tt file?
I did such metaprograming to generate try/catch code with NRefactory, seems for mixins if may be OK.
The text was updated successfully, but these errors were encountered: