本文整理汇总了C#中Credentials.doSignUp方法的典型用法代码示例。如果您正苦于以下问题:C# Credentials.doSignUp方法的具体用法?C# Credentials.doSignUp怎么用?C# Credentials.doSignUp使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Credentials
的用法示例。
在下文中一共展示了Credentials.doSignUp方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TryToSignUp
/// <summary>
/// Do the sign up procedure
/// </summary>
/// <param name="username"> the user's username, gotten from the gui</param>
/// <param name="password"> the user's password, gotten from the gui</param>
/// <returns> whether or not the user was successfully signed up</returns>
private async Task<Boolean> TryToSignUp (string username, string password)
{
credentials = new Credentials (username);
try
{
//Try to register the user with the system
if (await credentials.doSignUp(password, serverURL + login_ext))
{
//If registration was successful, send a request to create a new entry in the table with GCM ids
return await Poster.PostObject (new { token = credentials.token, username = username, gcm_regid = gcm_token }, serverURL + gcm_regid_ext);
}
else
{
return false;
}
}
catch
{
return false;
}
}