Ejemplo n.º 1
0
 public void SetPermissions(SocketEntity <ulong> entity, Permissions permissions)
 {
     if (!(entity is SocketUser) && !(entity is SocketRole))
     {
         throw new ArgumentException("entity");
     }
     this.permissions[entity.Id] = permissions;
     IsDirty = true;
     PermissionsChanged?.Invoke(this, entity.Id);
 }
Ejemplo n.º 2
0
 protected virtual void RaisePermissionsChanged()
 {
     PermissionsChanged?.Invoke(this, EventArgs.Empty);
 }
Ejemplo n.º 3
0
 void RaisePermissionsChanged()
 {
     PermissionsChanged?.Invoke(this, EventArgs.Empty);
 }
Ejemplo n.º 4
0
 public void SetPermission(ConnectionType conntype, DownloadContentType type, bool val)
 {
     _platformCodeService.SetLocalSetting(GenerateSettingKey(conntype, type), val);
     PermissionsChanged?.Invoke(this, EventArgs.Empty);
     _lastTimeRequested = DateTime.MinValue;
 }
    protected static void NotifyPropertyChanged([CallerMemberName] string propertyName = "")
    {
        EventHandler temp = Volatile.Read(ref PermissionsChanged);

        PermissionsChanged?.Invoke(null, new EventArgs());
    }
Ejemplo n.º 6
0
 void RaisePermissionsModifiedEvent(object sender, List <WindowsGroupPermission> windowsGroupPermissions)
 {
     Permissions = windowsGroupPermissions.Select(permission => permission as IWindowsGroupPermission).ToList();
     PermissionsChanged?.Invoke(new PermissionsChangedArgs(windowsGroupPermissions.Cast <IWindowsGroupPermission>().ToList()));
 }