示例#1
0
        public async Task <AddResult <User> > CreateUserAsync(UserCreateOptions createOptions)
        {
            var addResult = new AddResult <User>();

            try
            {
            }
            catch (Exception ex)
            {
            }

            return(addResult);
        }
示例#2
0
 /// <summary>Create a new user.</summary>
 /// <remarks>
 /// Create a new user. This user will not have access to any database. You need permission to the _system database in
 /// order to execute this call.
 /// </remarks>
 /// <seealso><a href="https://docs.arangodb.com/current/HTTP/UserManagement/index.html#create-user">API Documentation</a>
 ///     </seealso>
 /// <param name="user">The name of the user</param>
 /// <param name="passwd">The user password</param>
 /// <param name="options">Additional options, can be null</param>
 /// <returns>information about the user</returns>
 /// <exception cref="ArangoDBException"/>
 /// <exception cref="ArangoDBException"/>
 public virtual UserEntity createUser(string user, string passwd
                                      , UserCreateOptions options)
 {
     return(executor.execute(this.createUserRequest(this.db().name(), user, passwd, options),
                             typeof(UserEntity)));
 }
        protected internal virtual Request createUserRequest(string
                                                             database, string user, string passwd, UserCreateOptions options
                                                             )
        {
            Request request;

            request = new Request(database, RequestType
                                  .POST, ArangoDBConstants.PATH_API_USER);
            request.setBody(this.executor.Serialize(OptionsBuilder.build(options
                                                                         != null ? options : new UserCreateOptions(), user, passwd)));
            return(request);
        }