Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
CollectionConverter.cs
Go to the documentation of this file.
1
using
System.Collections
;
2
using
System.Diagnostics.CodeAnalysis
;
3
using
System.Globalization
;
4
5
namespace
System.ComponentModel
;
6
7
public
class
CollectionConverter
:
TypeConverter
8
{
9
public
override
object
?
ConvertTo
(
ITypeDescriptorContext
? context,
CultureInfo
?
culture
,
object
?
value
,
Type
destinationType)
10
{
11
if
(destinationType == typeof(
string
) &&
value
is
ICollection
)
12
{
13
return
System
.
SR
.
Collection
;
14
}
15
return
base.ConvertTo(context,
culture
,
value
, destinationType);
16
}
17
18
[RequiresUnreferencedCode(
"The Type of value cannot be statically discovered. The public parameterless constructor or the 'Default' static field may be trimmed from the Attribute's Type."
)]
19
public
override
PropertyDescriptorCollection
GetProperties
(
ITypeDescriptorContext
? context,
object
value
,
Attribute
[]? attributes)
20
{
21
return
new
PropertyDescriptorCollection
(
null
);
22
}
23
}
System.Attribute
Definition
Attribute.cs:12
System.ComponentModel.CollectionConverter.GetProperties
override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext? context, object value, Attribute[]? attributes)
Definition
CollectionConverter.cs:19
System.ComponentModel.CollectionConverter.ConvertTo
override? object ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType)
Definition
CollectionConverter.cs:9
System.ComponentModel.CollectionConverter
Definition
CollectionConverter.cs:8
System.ComponentModel.PropertyDescriptorCollection
Definition
PropertyDescriptorCollection.cs:7
System.ComponentModel.TypeConverter
Definition
TypeConverter.cs:9
System.Globalization.CultureInfo
Definition
CultureInfo.cs:8
System.SR.Collection
static string Collection
Definition
SR.cs:16
System.SR
Definition
SR.cs:7
System.Type
Definition
Type.cs:14
System.Collections.ICollection
Definition
ICollection.cs:4
System.ComponentModel.ITypeDescriptorContext
Definition
ITypeDescriptorContext.cs:4
System.Collections
Definition
BlockingCollection.cs:8
System.ComponentModel
Definition
ColumnAttribute.cs:3
System.Diagnostics.CodeAnalysis
Definition
AllowNullAttribute.cs:1
System.Globalization
Definition
Calendar.cs:1
System.ExceptionArgument.value
@ value
System.ExceptionArgument.culture
@ culture
System
Definition
BlockingCollection.cs:8
source
System.ComponentModel.TypeConverter
System.ComponentModel
CollectionConverter.cs
Generated by
1.10.0