00001 using System; 00002 using System.Collections.Generic; 00003 using N2.Definitions; 00004 using N2.Installation; 00005 00006 namespace N2 00007 { 00014 [AttributeUsage(AttributeTargets.Class, Inherited = false)] 00015 public class PageDefinitionAttribute : AbstractDefinition 00016 { 00018 public InstallerHint InstallerVisibility { get; set; } 00019 00020 public PageDefinitionAttribute(string title) 00021 :this() 00022 { 00023 Title = title; 00024 } 00025 00026 public PageDefinitionAttribute() 00027 { 00028 InstallerVisibility = InstallerHint.Default; 00029 IsPage = true; 00030 IconUrl = "{ManagementUrl}/Resources/icons/page.png"; 00031 } 00032 00033 public override void Refine(ItemDefinition currentDefinition, IList<ItemDefinition> allDefinitions) 00034 { 00035 currentDefinition.Installer = InstallerVisibility; 00036 base.Refine(currentDefinition, allDefinitions); 00037 } 00038 } 00039 }