/// <summary> /// Initialise a new <see cref="ReflectionItemTreeNode"/>. /// </summary> /// <param name="value">The associated data item.</param> /// <param name="source">The source of the data.</param> public ReflectionItemTreeNode(ICCNetObject value, ListTreeNodeAttribute source) : base(value) { this.source = source; if (value != null) { Text = value.ToString(); if (value is INotifyPropertyChanged) { (value as INotifyPropertyChanged).PropertyChanged += OnPropertyChanged; } } }
/// <summary> /// Initialise a new <see cref="ReflectionInstanceTreeNode"/>. /// </summary> /// <param name="value">The associated data item.</param> /// <param name="source">The source of the data.</param> public ReflectionInstanceTreeNode(ICCNetObject value, InstanceTreeNodeAttribute source) : base(value) { this.source = source; if (value != null) { Text = value.ToString(); if (value is INotifyPropertyChanged) { (value as INotifyPropertyChanged).PropertyChanged += OnPropertyChanged; } } this.parent = value; DataItem = RetrieveDataValue(); ReflectionHelper.GenerateChildNodes(this, DataItem); }
/// <summary> /// Initializes a new instance of the <see cref="RequiredAttributeException"/> class. /// </summary> /// <param name="owner">The owner.</param> /// <param name="name">The name.</param> public RequiredAttributeException(ICCNetObject owner, string name) : base(string.Format("Value of {0} in {1} can not be null or Empty", name, string.IsNullOrEmpty(owner.ToString()) ? owner.GetType().Name : owner.ToString())) { }