Survivalcraft API 1.8.2.3
v1.8.2.3
Survivalcraft 2.4
载入中...
搜索中...
未找到
SingleHumanReadableConverter.cs
浏览该文件的文档.
1
using
System.Globalization;
2
3
namespace
Engine.Serialization
{
4
[
HumanReadableConverter
(typeof(
float
))]
5
public
class
SingleHumanReadableConverter
:
IHumanReadableConverter
{
6
public
string
ConvertToString
(
object
value) => ((float)value).ToString(
"R"
, CultureInfo.InvariantCulture);
7
8
public
object
ConvertFromString
(Type type,
string
data) =>
float
.Parse(data, CultureInfo.InvariantCulture);
9
}
10
}
Engine.Serialization.HumanReadableConverter
定义
HumanReadableConverter.cs:5
Engine.Serialization.SingleHumanReadableConverter
定义
SingleHumanReadableConverter.cs:5
Engine.Serialization.SingleHumanReadableConverter.ConvertFromString
object ConvertFromString(Type type, string data)
定义
SingleHumanReadableConverter.cs:8
Engine.Serialization.SingleHumanReadableConverter.ConvertToString
string ConvertToString(object value)
定义
SingleHumanReadableConverter.cs:6
Engine.Serialization.IHumanReadableConverter
定义
IHumanReadableConverter.cs:2
Engine.Serialization
定义
Archive.cs:4
SurvivalcraftApi 1.8.2.3
Engine
Engine.Serialization
SingleHumanReadableConverter.cs
制作者
1.16.1