// The Nova Project by Ken Beckett.
// Copyright (C) 2007-2012 Inevitable Software, all rights reserved.
// Released under the Common Development and Distribution License, CDDL-1.0: http://opensource.org/licenses/cddl1.php
using System.Collections.Generic;
using Nova.CodeDOM;
namespace Nova.UI
{
/// <summary>
/// The view model for a <see cref="CodeDOM.DestructorDecl"/>.
/// </summary>
public class DestructorDeclVM : MethodDeclBaseVM
{
#region /* STATICS */
internal static void AddViewModelMapping()
{
CreateViewModel.Add(typeof(DestructorDecl),
delegate(CodeObject codeObject, bool isDescription, Dictionary<CodeObject, CodeObjectVM> dictionary) { return new DestructorDeclVM((DestructorDecl)codeObject, isDescription, dictionary); });
}
#endregion
#region /* CONSTRUCTORS */
/// <summary>
/// Create a view model instance for the specified <see cref="CodeDOM.DestructorDecl"/>.
/// </summary>
public DestructorDeclVM(DestructorDecl destructorDecl, bool isDescription, Dictionary<CodeObject, CodeObjectVM> dictionary)
: base(destructorDecl, isDescription, false, true, dictionary)
{ }
#endregion
#region /* PROPERTIES */
/// <summary>
/// The underlying <see cref="CodeDOM.DestructorDecl"/> model.
/// </summary>
public DestructorDecl DestructorDecl
{
get { return (DestructorDecl)CodeObject; }
}
#endregion
#region /* RENDERING */
internal override void RenderName(CodeRenderer renderer, RenderFlags flags)
{
renderer.RenderText(DestructorDecl.ParseToken + DestructorDecl.Name, TYPE_BRUSH, this);
}
#endregion
}
}