olegsych

Stories submitted by olegsych

POCO and Unity Application Block Part II(randypatterson.com)

submitted by olegsycholegsych(335) 3 years, 7 months ago

In this post, Randy Patterson shows how to use property injection in Unity application block with plain CLR objects using programmatic and XML-based configuration. read more...

add a comment |category: |Views: 37

tags: another

Creating complex code generators(olegsych.com)

submitted by olegsycholegsych(335) 3 years, 7 months ago

This article is a part of a series that introduces code generation using C# and Text Templates (also known as T4 Templates) in Visual Studio; explains how to create reusable templates and combine them in complex code generators. read more...

add a comment |category: |Views: 45

tags: another

Creating reusable code generation templates(olegsych.com)

submitted by olegsycholegsych(335) 3 years, 8 months ago

This article is a part of a series that introduces code generation using C# and Text Templates (also known as T4 Templates) in Visual Studio; explains how to create reusable templates and combine them in complex code generators. read more...

add a comment |category: |Views: 54

tags: another

Debugging Code Generation Files(olegsych.com)

submitted by olegsycholegsych(335) 3 years, 8 months ago

This article is a part of a series that introduces code generation using C# and Text Templates (also known as T4 Templates) in Visual Studio; explains how to create reusable templates and combine them in complex code generators. read more...

add a comment |category: |Views: 5

tags: another

Troubleshooting Code Generation Errors(olegsych.com)

submitted by olegsycholegsych(335) 3 years, 8 months ago

This article is a part of a series that introduces code generation using C# and Text Templates (also known as T4 Templates) in Visual Studio; explains how to create reusable templates and combine them in complex code generators. read more...

add a comment |category: |Views: 4

tags: another

Creating your first code generator(olegsych.com)

submitted by olegsycholegsych(335) 3 years, 8 months ago

This is the first post in a series that introduces code generation using C# and Text Templates (also known as T4 Templates) in Visual Studio; explains how to create reusable templates and combine them in complex code generators. read more...

add a comment |category: |Views: 20

tags: another

Extending T4: <#@ xsd #> directive(olegsych.com)

submitted by olegsycholegsych(335) 3 years, 9 months ago

This article describes a custom T4 directive processor for converting XML schema definitions into .NET classes, which allows using strongly-typed code to extract information from various XML files. In particular, this simplifies creating custom T4 code generation templates for LINQ to SQL .dbml files and ADO.NET Entity Framework .edmx files. The article includes links to ready to use xsd directive processor and sample source code. read more...

add a comment |category: |Views: 81

tags: another

Simplifying WCF: Using Exceptions as Faults(olegsych.com)

submitted by olegsycholegsych(335) 3 years, 10 months ago

This article describes an overview of error handling in WCF, discusses its advantages and drawbacks and shows how to extend WCF to marshal .NET exceptions as SOAP faults. Ready-to-use source code and examples are available for download. read more...

add a comment |category: |Views: 26

tags: another

T4 template for generating SQL view from C# enumeration(olegsych.com)

submitted by olegsycholegsych(335) 3 years, 10 months ago

Database tables often contain columns that store “codes”, or values with special meaning. In application code, these special values can be encapsulated as enumerations. This article demonstrates how to use T4 code generation templates and Visual Studio CodeModel API to generate SQL views that encapsulate the special values for use in SQL code. read more...

add a comment |category: |Views: 132

tags: another

Test runner for T4 unit tests(olegsych.com)

submitted by olegsycholegsych(335) 3 years, 11 months ago

This post shows how to create unit tests that run during T4 template transformation. This approach allows creating automated tests for template code that relies on specific capabilities of a T4 host, such as access to Visual Studio extensibility APIs. The post includes a ready to use test runner for T4 unit tests. read more...

add a comment |category: |Views: 9

tags: another

T4 Architecture(olegsych.com)

submitted by olegsycholegsych(335) 4 years ago

This article provides an in-depth look at the architecture of T4 template transformation process, discusses some constraints that limit template design, describes techniques that can be used to work around these limitations and points out some (sometimes undocumented) mechanisms for making your T4 templates more powerful. read more...

add a comment |category: |Views: 24

tags: another

T4 Template Design(olegsych.com)

submitted by olegsycholegsych(335) 4 years, 1 month ago

This article discusses design challenges developers face as complexity of their T4 templates increases; defines qualities of a reusable T4 templates; discusses techniques that can be used to achieve these qualities and compares their pros and cons. read more...

add a comment |category: |Views: 32

tags: another

How to generate multiple outputs from single T4 template(olegsych.com)

submitted by olegsycholegsych(335) 4 years, 1 month ago

For some code generation tasks, like generating SELECT stored procedures based on indexes of a given database table, number of output artifacts may not be known upfront. Because T4 was designed to generate a single output file from one template file, developers are forced to generate multiple code artifacts in the same source file. This conflicts with the widely used practice of using one source file per code artifact. This article demonstrates how to work around this limitation of T4, generate multiple files from a single template and automatically add them to a Visual Studio project. read more...

add a comment |category: |Views: 269

tags: another

T4 How-to video and Visual Studio project items (dotnet.org.za)

submitted by olegsycholegsych(335) 4 years, 2 months ago

Hilton Giesenow posted a link to the new MSDN how-to video about creating T4 templates and several ready-to-use project item templates that make T4 items available in the Add New Item dialog box of Visual Studio. read more...

add a comment |category: |Views: 28

tags: another

How to use T4 to generate strongly-typed navication class in ASP.NET(blog.devarchive.net)

submitted by olegsycholegsych(335) 4 years, 3 months ago

In this article Kirill Chilingarashvili demonstrates how to use a T4 template to generate a navigation class in ASP.NET. This class contains nested classes that represent folders and string constants that represent users control (.ascx) files in the application. Using such navigation class helps to avoid hardcoding file paths as string literals and because it is automatically generated there is no need to maintain string constants manually. read more...

1 comment |category: |Views: 25

tags: another

Understanding T4 template transformation(olegsych.spaces.live.com)

submitted by olegsycholegsych(335) 4 years, 3 months ago

T4 (Text Template Transformation Toolkit) is a template-based code generation engine. It is available in Visual Studio 2008 and as a download in DSL and GAT toolkits for Visual Studio 2005. This article provides an overview of the template transformation process and demonstrate how different types of template blocks and processing instructions are transformed into code. Each example includes template text, compiled template code and output text. read more...

add a comment |category: |Views: 79

tags: another