public sealed override void WriteCSharpCodeAttributeValue(CodeRenderingContext context, CSharpCodeAttributeValueIntermediateNode node) { // We used to support syntaxes like <elem onsomeevent=@{ /* some C# code */ } /> but this is no longer the // case. // // We provide an error for this case just to be friendly. var content = string.Join("", node.Children.OfType <IntermediateToken>().Select(t => t.Content)); context.Diagnostics.Add(ComponentDiagnosticFactory.Create_CodeBlockInAttribute(node.Source, content)); return; }