StreetFoo.Client.RegisterServiceProxy.RegisterAsync C# (CSharp) Method

RegisterAsync() public method

public RegisterAsync ( string username, string email, string password, string confirm ) : Task
username string
email string
password string
confirm string
return Task
        public async Task<RegisterResult> RegisterAsync(string username, string email, string password, string confirm)
        {
            // package up the request...
            var input = new JsonObject();
            input.Add("username", username);
            input.Add("email", email);
            input.Add("password", password);
            input.Add("confirm", confirm);

            // call...
            var executeResult = await this.Execute(input);

            // get the user ID from the server result...
            if (!(executeResult.HasErrors))
            {
                string userId = executeResult.Output.GetNamedString("userId");
                return new RegisterResult(userId);
            }
            else
                return new RegisterResult(executeResult);
        }
    }