0
|
1 using System;
|
|
2 using System.ComponentModel;
|
|
3
|
|
4 namespace BLToolkit.ComponentModel
|
|
5 {
|
|
6 [System.Diagnostics.DebuggerStepThrough]
|
|
7 public abstract class PropertyDescriptorWrapper : PropertyDescriptor
|
|
8 {
|
|
9 protected PropertyDescriptorWrapper(PropertyDescriptor propertyDescriptor)
|
|
10 : base(propertyDescriptor)
|
|
11 {
|
|
12 if (propertyDescriptor == null) throw new ArgumentNullException("propertyDescriptor");
|
|
13
|
|
14 _pd = propertyDescriptor;
|
|
15 }
|
|
16
|
|
17 private readonly PropertyDescriptor _pd;
|
|
18
|
|
19 public override AttributeCollection Attributes { get { return _pd.Attributes; } }
|
|
20 public override string Category { get { return _pd.Category; } }
|
|
21 public override Type ComponentType { get { return _pd.ComponentType; } }
|
|
22 public override TypeConverter Converter { get { return _pd.Converter; } }
|
|
23 public override string Description { get { return _pd.Description; } }
|
|
24 public override bool DesignTimeOnly { get { return _pd.DesignTimeOnly; } }
|
|
25 public override string DisplayName { get { return _pd.DisplayName; } }
|
|
26 public override bool IsBrowsable { get { return _pd.IsBrowsable; } }
|
|
27 public override bool IsLocalizable { get { return _pd.IsLocalizable; } }
|
|
28 public override bool IsReadOnly { get { return _pd.IsReadOnly; } }
|
|
29 public override string Name { get { return _pd.Name; } }
|
|
30 public override Type PropertyType { get { return _pd.PropertyType; } }
|
|
31
|
|
32 public override bool Equals (object obj) { return _pd.Equals(obj); }
|
|
33 public override object GetEditor (Type editorBaseType) { return _pd.GetEditor(editorBaseType); }
|
|
34 public override int GetHashCode () { return _pd.GetHashCode(); }
|
|
35 public override object GetValue (object component) { return _pd.GetValue(component); }
|
|
36 public override string ToString () { return _pd.ToString(); }
|
|
37 public override bool CanResetValue(object component) { return _pd.CanResetValue(component); }
|
|
38
|
|
39 public override void ResetValue(object component) { _pd.ResetValue(component); }
|
|
40 public override void SetValue (object component, object value) { _pd.SetValue(component, value); }
|
|
41
|
|
42 public override void AddValueChanged(object component, EventHandler handler)
|
|
43 {
|
|
44 _pd.AddValueChanged(component, handler);
|
|
45 }
|
|
46
|
|
47 public override PropertyDescriptorCollection GetChildProperties(object instance, Attribute[] filter)
|
|
48 {
|
|
49 return _pd.GetChildProperties(instance, filter);
|
|
50 }
|
|
51
|
|
52 public override bool ShouldSerializeValue(object component)
|
|
53 {
|
|
54 return _pd.ShouldSerializeValue(component);
|
|
55 }
|
|
56
|
|
57 public override void RemoveValueChanged(object component, EventHandler handler)
|
|
58 {
|
|
59 _pd.RemoveValueChanged(component, handler);
|
|
60 }
|
|
61 }
|
|
62 }
|