/// <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="propertyChangedCallBack">This event is fired whenever a property of this object changes.</param> protected HostfileEntry(HostfileEntryType type, IHostfileEntry parent, string name, EventHandler propertyChangedCallBack) { if (type.Equals(HostfileEntryType.NotSet) || name == null) { throw new ArgumentException("name"); } this.EntryType = type; this.Name = name; this.Parent = parent; this.PropertyChangedCallBack = propertyChangedCallBack; }
/// <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; }