1 // Licensed to the .NET Foundation under one or more agreements. 2 // The .NET Foundation licenses this file to you under the MIT license. 3 // See the LICENSE file in the project root for more information. 4 5 using Microsoft.Win32; 6 using System.Collections; 7 using System.ComponentModel.Design; 8 using System.Diagnostics; 9 using System.Security.Permissions; 10 11 namespace System.ComponentModel 12 { 13 /// <summary> 14 /// <para>Provides 15 /// a type converter to convert expandable objects to and from various 16 /// other representations.</para> 17 /// </summary> 18 public class ExpandableObjectConverter : TypeConverter 19 { 20 /// <summary> 21 /// <para> 22 /// Initializes a new instance of the System.ComponentModel.ExpandableObjectConverter class. 23 /// </para> 24 /// </summary> ExpandableObjectConverter()25 public ExpandableObjectConverter() 26 { 27 } 28 29 30 /// <internalonly/> 31 /// <summary> 32 /// <para>Gets a collection of properties for the type of object 33 /// specified by the value 34 /// parameter.</para> 35 /// </summary> GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)36 public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes) 37 { 38 return TypeDescriptor.GetProperties(value, attributes); 39 } 40 41 /// <internalonly/> 42 /// <summary> 43 /// <para>Gets a value indicating 44 /// whether this object supports properties using the 45 /// specified context.</para> 46 /// </summary> GetPropertiesSupported(ITypeDescriptorContext context)47 public override bool GetPropertiesSupported(ITypeDescriptorContext context) 48 { 49 return true; 50 } 51 } 52 } 53 54