Example #1
0
 public static async Task <TResult> Get <TResult>(
     this IRetrievable <TResult> resource
     ) where TResult : BaseModel
 {
     return(await resource.Request.StartRequest <TResult>(
                resource.Endpoint,
                "GET",
                resource.BasePath
                ));
 }
Example #2
0
 public static async Task <TResult> Get <TResult>(
     this IRetrievable <TResult> resource
     ) where TResult : ModelBase
 {
     return(await resource.Requester.Request <TResult>(
                resource.Endpoint,
                "GET",
                resource.BasePath
                ).ConfigureAwait(false));
 }
 public UserAuthenticationProvider(
     ITranslate<User, UserAccount> translateDataUserToUserAccount, 
     IRetrievable<ByUserEmail, User> retrieveUserByEmail, 
     IBulkRetrievable<ByEncodedUserId, UserAuthentication> retrieveAllUserAuthenticationByEncodedUserId, 
     IUpdatable<UserAuthentication> userAuthUpdater, 
     ICreatable<UserAuthentication> userAuthCreator, 
     IPasswords passwords, 
     IDeletable<UserAuthentication> userAuthDeleter)
 {
     _translateDataUserToUserAccount = translateDataUserToUserAccount;
     _retrieveUserByEmail = retrieveUserByEmail;
     _retrieveAllUserAuthenticationByEncodedUserId = retrieveAllUserAuthenticationByEncodedUserId;
     _userAuthUpdater = userAuthUpdater;
     _userAuthCreator = userAuthCreator;
     _passwords = passwords;
     _userAuthDeleter = userAuthDeleter;
 }
 public UserAccountProvider(
     IUserAuthenticationProvider userAuthProvider, 
     ICreatable<User> userCreator, 
     IRetrievable<ByUserId, User> userGetByUserId, 
     IRetrievable<ByUserEmail, User> retrieveUserByEmail, 
     IDeletable<User> userDeleter, 
     IUpdatable<User> userUpdater, 
     ITranslate<User, UserAccount> translateDataUserToUserAccount, 
     ISystemTime systemTime)
 {
     _userAuthProvider = userAuthProvider;
     _userCreator = userCreator;
     _userGetByUserId = userGetByUserId;
     _retrieveUserByEmail = retrieveUserByEmail;
     _userDeleter = userDeleter;
     _userUpdater = userUpdater;
     _translateDataUserToUserAccount = translateDataUserToUserAccount;
     _systemTime = systemTime;
 }
Example #5
0
        public IDiscordUriBuilder AddPath(IRetrievable obj)
        {
            Uri += obj.PathUrl;

            return(this);
        }