-
Custom T4 host for asp.net mvc
T4 template can be hosted by different environment. By default template is not HostSpecific. When you want to reuse a template to generate different file, you can customize the generation process by providing a dialog window. This is what MvcTextTemplateHost does. ASP.NET MVC tools is included in C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Microsoft.VisualStudio.Web.Extensions.dll , which is not a open source project. But you can use Reflector to view some of its implementation. The dll provide some context menu to add view , add controller , and some dialog box for use to customize the code generation. Here is article about the MvcTextTemplateHost
-
Using lambda expression to remove string expression
public class Customer { public string Name { get; set; } }
-
A dummy example of html helper
public static class HtmlHelperExt { public static string GetDebugInfo(this HtmlHelper html) { return "Hello"; }
-
definition of two kinds of test
- State-based testing (also called state verification)
-
ResourceManager notes
The benefit to ResourceManager is that it can smartly load differently resource based on the current UI culture. ResourceManager basically it is used to read embedded resource or file based resource. But it is extensible. It has three constructor, and one static factory method