CodeConstructType MapTagTypeToConstructType (TagType tagtype)
{
switch (tagtype) {
case TagType.CodeRenderExpression:
return CodeConstructType.ExpressionSnippet;
case TagType.CodeRender:
#if NET_4_0
case TagType.CodeRenderEncode:
#endif
return CodeConstructType.CodeSnippet;
case TagType.DataBinding:
return CodeConstructType.DataBindingSnippet;
default:
throw new InvalidOperationException ("Unexpected tag type.");
}
}