Files
linux-packaging-mono/external/aspnetwebstack/src/System.Web.Razor/CSharpRazorCodeLanguage.cs
Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

49 lines
1.5 KiB
C#

// 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
{
/// <summary>
/// Defines the C# Code Language for Razor
/// </summary>
public class CSharpRazorCodeLanguage : RazorCodeLanguage
{
private const string CSharpLanguageName = "csharp";
/// <summary>
/// Returns the name of the language: "csharp"
/// </summary>
public override string LanguageName
{
get { return CSharpLanguageName; }
}
/// <summary>
/// Returns the type of the CodeDOM provider for this language
/// </summary>
public override Type CodeDomProviderType
{
get { return typeof(CSharpCodeProvider); }
}
/// <summary>
/// Constructs a new instance of the code parser for this language
/// </summary>
public override ParserBase CreateCodeParser()
{
return new CSharpCodeParser();
}
/// <summary>
/// Constructs a new instance of the code generator for this language with the specified settings
/// </summary>
public override RazorCodeGenerator CreateCodeGenerator(string className, string rootNamespaceName, string sourceFileName, RazorEngineHost host)
{
return new CSharpRazorCodeGenerator(className, rootNamespaceName, sourceFileName, host);
}
}
}