// Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.
using System.Web.Razor.Generator;
using System.Web.Razor.Parser;
using Microsoft.CSharp;
namespace System.Web.Razor
{
///
/// Defines the C# Code Language for Razor
///
public class CSharpRazorCodeLanguage : RazorCodeLanguage
{
private const string CSharpLanguageName = "csharp";
///
/// Returns the name of the language: "csharp"
///
public override string LanguageName
{
get { return CSharpLanguageName; }
}
///
/// Returns the type of the CodeDOM provider for this language
///
public override Type CodeDomProviderType
{
get { return typeof(CSharpCodeProvider); }
}
///
/// Constructs a new instance of the code parser for this language
///
public override ParserBase CreateCodeParser()
{
return new CSharpCodeParser();
}
///
/// Constructs a new instance of the code generator for this language with the specified settings
///
public override RazorCodeGenerator CreateCodeGenerator(string className, string rootNamespaceName, string sourceFileName, RazorEngineHost host)
{
return new CSharpRazorCodeGenerator(className, rootNamespaceName, sourceFileName, host);
}
}
}