/// <summary> /// Initializes a new instance of the <see cref="ReadOnlyPropertyDescriptor"/> class. /// </summary> /// <param name="originalPropertyDescriptor">The original property descriptor.</param> public ReadOnlyPropertyDescriptor(PropertyDescriptor originalPropertyDescriptor) : base(originalPropertyDescriptor) { _originalPropertyDescriptor = originalPropertyDescriptor; _typeConverter = new ReadOnlyConverter(originalPropertyDescriptor.Converter); }
/// <summary> /// Initializes a new instance of the <see cref="ReadOnlyWrapper"/> class. /// </summary> /// <param name="wrappedObject">The selected object.</param> public ReadOnlyWrapper(object wrappedObject) { _wrappedObject = wrappedObject; _typeConverter = new ReadOnlyConverter(TypeDescriptor.GetConverter(_wrappedObject)); }