本文整理汇总了C#中Serializer.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Serializer.ToString方法的具体用法?C# Serializer.ToString怎么用?C# Serializer.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Serializer
的用法示例。
在下文中一共展示了Serializer.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ToString
public string ToString()
{
// serialize and return
Serializer<CaseOptionData> serializer = new Serializer<CaseOptionData>();
return serializer.ToString(this);
}
示例2: setValidCases
public void setValidCases( List<string> cases )
{
Serializer<List<string>> serializer = new Serializer<List<string>>();
string caseData = serializer.ToString(cases);
WWWForm form = new WWWForm();
form.AddField("command","setValidCases");
form.AddField("username", username);
form.AddField("data", caseData);
DatabaseMgr.GetInstance().DBCall(GameMgr.GetInstance().DatabaseURL,form,null);
}
示例3: CreateUser
public void CreateUser( string username, string password, string first, string last, bool admin, bool tutorial, DatabaseMgr.Callback createCallback )
{
// create empty case list
Serializer<List<string>> serializer = new Serializer<List<string>>();
string emptyCaseList = serializer.ToString(new List<string>());
// create user in logins
WWWForm form = new WWWForm();
form.AddField("command","createUser");
form.AddField("username",username);
form.AddField("password",password);
form.AddField("first",first);
form.AddField("last",last);
form.AddField("admin",(admin==true)?"1":"0");
form.AddField("tutorial",(tutorial==true)?"1":"0");
form.AddField("data",emptyCaseList);
DatabaseMgr.GetInstance().DBCall(GameMgr.GetInstance().DatabaseURL,form,createCallback);
}
示例4: ToString
public string ToString()
{
// serialize and return
Serializer<TraumaScenarioReport> serializer = new Serializer<TraumaScenarioReport>();
return serializer.ToString(this);
}