Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ViewMasterPageControlBuilder.cs « System.Web.Mvc « src - github.com/mono/aspnetwebstack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a41556ef841e69269cb8f60e51f5898f3f5c3561 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
using System.CodeDom;
using System.Web.UI;

namespace System.Web.Mvc
{
    internal sealed class ViewMasterPageControlBuilder : FileLevelMasterPageControlBuilder, IMvcControlBuilder
    {
        public string Inherits { get; set; }

        public override void ProcessGeneratedCode(CodeCompileUnit codeCompileUnit, CodeTypeDeclaration baseType, CodeTypeDeclaration derivedType, CodeMemberMethod buildMethod, CodeMemberMethod dataBindingMethod)
        {
            if (!String.IsNullOrWhiteSpace(Inherits))
            {
                derivedType.BaseTypes[0] = new CodeTypeReference(Inherits);
            }
        }
    }
}