Ejemplo n.º 1
0
 public Task DeleteBotCommand(string id)
 {
     if (string.IsNullOrWhiteSpace(id))
     {
         throw new ArgumentNullException(nameof(id));
     }
     return(BotCommandClient.DeleteAsync(id));
 }
Ejemplo n.º 2
0
 public Task <BotCommandResult> PostBotCommand(BotCommand command)
 {
     if (command == null)
     {
         throw new ArgumentNullException(nameof(command));
     }
     return(BotCommandClient.CreateAsync(command));
 }
Ejemplo n.º 3
0
        public Task <BotCommandResult> GetBotCommandAsync(string id)
        {
            if (string.IsNullOrWhiteSpace(id))
            {
                throw new ArgumentNullException(nameof(id));
            }

            return(BotCommandClient.GetOneAsync(id));
        }
Ejemplo n.º 4
0
 public Task <BotCommandResult> PutBotCommand(string id, BotCommand command)
 {
     if (string.IsNullOrWhiteSpace(id))
     {
         throw new ArgumentNullException(nameof(id));
     }
     if (command == null)
     {
         throw new ArgumentNullException(nameof(command));
     }
     return(BotCommandClient.UpdateAsync(id, command));
 }
Ejemplo n.º 5
0
 public Task <List <BotCommandResult> > GetBotCommandsAsync() => BotCommandClient.GetAllAsync();