Exemplo n.º 1
0
 /// <summary>Initializes a new instance of the <see cref="ActivatableHostfileEntry"/> class.</summary>
 /// <param name="entryType">The entry type.</param>
 /// <param name="parent">The parent <see cref="IHostfileEntry"/>.</param>
 /// <param name="name">The name of the enntry.</param>
 /// <param name="description">The description text.</param>
 /// <param name="childs">The childs.</param>
 /// <param name="propertyChangedCallBack">This event is fired whenever a property of this object changes.</param>
 protected ActivatableHostfileEntry(HostfileEntryType entryType, IHostfileEntry parent, string name, string description, HostfileEntryCollection childs, EventHandler propertyChangedCallBack)
     : base(entryType, parent, name, description, childs, propertyChangedCallBack)
 {
     this.IsActivatable = true;
 }
Exemplo n.º 2
0
        /// <summary>Initializes a new instance of the <see cref="HostfileEntry"/> class. </summary>
        /// <param name="type">The entry type (e.g. <see cref="HostfileEntryType.Host"/>).</param>
        /// <param name="parent">The parent.</param>
        /// <param name="name">The name of this <see cref="HostfileEntry"/> instance.</param>
        /// <param name="description">A description text.</param>
        /// <param name="childs">The childs.</param>
        /// <param name="propertyChangedCallBack">This event is fired whenever a property of this object changes.</param>
        protected HostfileEntry(HostfileEntryType type, IHostfileEntry parent, string name, string description, HostfileEntryCollection childs, EventHandler propertyChangedCallBack)
        {
            if (type.Equals(HostfileEntryType.NotSet) || string.IsNullOrEmpty(name))
            {
                throw new ArgumentException("name");
            }

            this.EntryType   = type;
            this.Name        = name;
            this.Description = description;
            this.Parent      = parent;
            this.Childs      = childs;

            this.PropertyChangedCallBack = propertyChangedCallBack;
        }