Exemplo n.º 1
0
 protected async override void OnExecute(object parameter)
 {
     if (parameter is IUserDescriptor userDescriptor)
     {
         await UserUtility.SendMessageAsync(this.authenticator, userDescriptor);
     }
     else if (parameter is IDomainUserDescriptor domainUserDescriptor)
     {
         await DomainUserUtility.SendMessageAsync(this.authenticator, domainUserDescriptor);
     }
 }
Exemplo n.º 2
0
 protected override bool OnCanExecute(object parameter)
 {
     if (parameter is IUserDescriptor userDescriptor)
     {
         return(UserUtility.CanSendMessage(this.authenticator, userDescriptor));
     }
     else if (parameter is IDomainUserDescriptor domainUserDescriptor)
     {
         return(DomainUserUtility.CanSendMessage(this.authenticator, domainUserDescriptor));
     }
     return(false);
 }
 public async Task KickAsync()
 {
     await DomainUserUtility.KickAsync(this.authentication, this);
 }
 public async Task SetOwnerAsync()
 {
     await DomainUserUtility.SetOwnerAsync(this.authentication, this);
 }
 public async Task SendMessageAsync()
 {
     await DomainUserUtility.SendMessageAsync(this.authentication, this);
 }