Survivalcraft API 1.8.2.3
v1.8.2.3
Survivalcraft 2.4
载入中...
搜索中...
未找到
BooleanHumanReadableConverter.cs
浏览该文件的文档.
1
namespace
Engine.Serialization
{
2
[
HumanReadableConverter
(typeof(
bool
))]
3
public
class
BooleanHumanReadableConverter
:
IHumanReadableConverter
{
4
public
string
ConvertToString
(
object
value) => !(bool)value ?
"False"
:
"True"
;
5
6
public
object
ConvertFromString
(Type type,
string
data) =>
string
.Equals(data,
"True"
, StringComparison.OrdinalIgnoreCase) ? true :
7
string
.Equals(data,
"False"
, StringComparison.OrdinalIgnoreCase) ? (object)
false
: throw new Exception();
8
}
9
}
Engine.Serialization.BooleanHumanReadableConverter
定义
BooleanHumanReadableConverter.cs:3
Engine.Serialization.BooleanHumanReadableConverter.ConvertFromString
object ConvertFromString(Type type, string data)
定义
BooleanHumanReadableConverter.cs:6
Engine.Serialization.BooleanHumanReadableConverter.ConvertToString
string ConvertToString(object value)
定义
BooleanHumanReadableConverter.cs:4
Engine.Serialization.HumanReadableConverter
定义
HumanReadableConverter.cs:5
Engine.Serialization.IHumanReadableConverter
定义
IHumanReadableConverter.cs:2
Engine.Serialization
定义
Archive.cs:4
SurvivalcraftApi 1.8.2.3
Engine
Engine.Serialization
BooleanHumanReadableConverter.cs
制作者
1.16.1