Particle.ParticleCloud.SignupWithUserAsync C# (CSharp) Méthode

SignupWithUserAsync() public méthode

Sign up with new account credentials to Particle cloud
public SignupWithUserAsync ( String username, String password ) : Task
username String Required user name, must be a valid email address
password String Required password
Résultat Task
		public async Task<Result> SignupWithUserAsync(String username, String password)
		{
			if (String.IsNullOrWhiteSpace(username))
			{
				throw new ArgumentNullException(nameof(username));
			}
			if (String.IsNullOrWhiteSpace(password))
			{
				throw new ArgumentNullException(nameof(password));
			}

			try
			{
				var result = await MakePostRequestWithoutAuthAsync("users", new KeyValuePair<string, string>("username", username), new KeyValuePair<string, string>("password", password));

				return result.AsResult();
			}
			catch (HttpRequestException re)
			{
				return new Result
				{
					Success = false,
					Error = re.Message,
					Exception = re
				};
			}
		}