StreetFoo.Client.RegisterServiceProxy.RegisterAsync C# (CSharp) 메소드

RegisterAsync() 공개 메소드

public RegisterAsync ( string username, string email, string password, string confirm ) : Task
username string
email string
password string
confirm string
리턴 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);
        }
    }