00001 using System; 00002 using System.Collections.Generic; 00003 using N2.Definitions; 00004 using N2.Installation; 00005 00006 namespace N2 00007 { 00013 [AttributeUsage(AttributeTargets.Class, Inherited = false)] 00014 public class DefinitionAttribute : AbstractDefinition 00015 { 00016 public DefinitionAttribute() 00017 { 00018 Installer = InstallerHint.Default; 00019 IsPage = true; 00020 IconUrl = "{ManagementUrl}/Resources/icons/page.png"; 00021 } 00022 00025 public DefinitionAttribute(string title) 00026 : this() 00027 { 00028 Title = title; 00029 } 00030 00034 public DefinitionAttribute(string title, string name) 00035 : this(title) 00036 { 00037 Name = name; 00038 } 00039 00046 public DefinitionAttribute(string title, string name, string description, string toolTip, int sortOrder) 00047 : this(title, name) 00048 { 00049 Description = description; 00050 ToolTip = toolTip; 00051 SortOrder = sortOrder; 00052 } 00053 00057 public InstallerHint Installer { get; set; } 00058 00060 public override void Refine(ItemDefinition definition, IList<ItemDefinition> allDefinitions) 00061 { 00062 base.Refine(definition, allDefinitions); 00063 00064 definition.Installer = Installer; 00065 } 00066 } 00067 }