using System;
namespace Umbraco.Web.Trees
{
///
/// Identifies an application tree
///
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public class TreeAttribute : Attribute
{
///
/// Initializes a new instance of the class.
///
/// The app alias.
/// The alias.
public TreeAttribute(string appAlias,
string alias) : this(appAlias, alias, null)
{
}
///
/// Initializes a new instance of the class.
///
/// The app alias.
/// The alias.
/// The title.
/// The icon closed.
/// The icon open.
/// if set to true [initialize].
/// The sort order.
/// Flag to define if this tree is a single node tree (will never contain child nodes, full screen app)
public TreeAttribute(string appAlias,
string alias,
string title,
string iconClosed = "icon-folder",
string iconOpen = "icon-folder-open",
bool initialize = true,
int sortOrder = 0,
bool isSingleNodeTree = false)
{
ApplicationAlias = appAlias;
Alias = alias;
Title = title;
IconClosed = iconClosed;
IconOpen = iconOpen;
Initialize = initialize;
SortOrder = sortOrder;
IsSingleNodeTree = isSingleNodeTree;
}
public string ApplicationAlias { get; private set; }
public string Alias { get; private set; }
public string Title { get; private set; }
public string IconClosed { get; private set; }
public string IconOpen { get; private set; }
public bool Initialize { get; private set; }
public int SortOrder { get; private set; }
///
/// Flag to define if this tree is a single node tree (will never contain child nodes, full screen app)
///
public bool IsSingleNodeTree { get; private set; }
}
}