Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
PrimaryKeyTypeConverter.cs
Go to the documentation of this file.
3
4namespace System.Data;
5
7{
9 : base(typeof(DataColumn[]))
10 {
11 }
12
13 public override bool GetPropertiesSupported(ITypeDescriptorContext context)
14 {
15 return false;
16 }
17
18 public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
19 {
20 if (!(destinationType == typeof(string)))
21 {
22 return base.CanConvertTo(context, destinationType);
23 }
24 return true;
25 }
26
27 public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
28 {
29 if (destinationType == null)
30 {
31 throw new ArgumentNullException("destinationType");
32 }
33 if (!(destinationType == typeof(string)))
34 {
35 return base.ConvertTo(context, culture, value, destinationType);
36 }
37 return Array.Empty<DataColumn>().GetType().Name;
38 }
39}
override bool GetPropertiesSupported(ITypeDescriptorContext context)
override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)