Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
MultilineStringConverter.cs
Go to the documentation of this file.
1
using
System.Diagnostics.CodeAnalysis
;
2
using
System.Globalization
;
3
4
namespace
System.ComponentModel
;
5
6
public
class
MultilineStringConverter
:
TypeConverter
7
{
8
public
override
object
?
ConvertTo
(
ITypeDescriptorContext
? context,
CultureInfo
?
culture
,
object
?
value
,
Type
destinationType)
9
{
10
if
(destinationType ==
null
)
11
{
12
throw
new
ArgumentNullException
(
"destinationType"
);
13
}
14
if
(destinationType == typeof(
string
) &&
value
is
string
)
15
{
16
return
System
.
SR
.
Text
;
17
}
18
return
base.ConvertTo(context,
culture
,
value
, destinationType);
19
}
20
21
[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."
)]
22
public
override
PropertyDescriptorCollection
?
GetProperties
(
ITypeDescriptorContext
? context,
object
value
,
Attribute
[]? attributes)
23
{
24
return
null
;
25
}
26
27
public
override
bool
GetPropertiesSupported
(
ITypeDescriptorContext
? context)
28
{
29
return
false
;
30
}
31
}
System.ArgumentNullException
Definition
ArgumentNullException.cs:10
System.Attribute
Definition
Attribute.cs:12
System.ComponentModel.MultilineStringConverter.GetProperties
override? PropertyDescriptorCollection GetProperties(ITypeDescriptorContext? context, object value, Attribute[]? attributes)
Definition
MultilineStringConverter.cs:22
System.ComponentModel.MultilineStringConverter.ConvertTo
override? object ConvertTo(ITypeDescriptorContext? context, CultureInfo? culture, object? value, Type destinationType)
Definition
MultilineStringConverter.cs:8
System.ComponentModel.MultilineStringConverter.GetPropertiesSupported
override bool GetPropertiesSupported(ITypeDescriptorContext? context)
Definition
MultilineStringConverter.cs:27
System.ComponentModel.MultilineStringConverter
Definition
MultilineStringConverter.cs:7
System.ComponentModel.PropertyDescriptorCollection
Definition
PropertyDescriptorCollection.cs:7
System.ComponentModel.TypeConverter
Definition
TypeConverter.cs:9
System.Globalization.CultureInfo
Definition
CultureInfo.cs:8
System.SR.Text
static string Text
Definition
SR.cs:44
System.SR
Definition
SR.cs:7
System.Type
Definition
Type.cs:14
System.ComponentModel.ITypeDescriptorContext
Definition
ITypeDescriptorContext.cs:4
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
MultilineStringConverter.cs
Generated by
1.10.0