private void AddNewAction(StorageActionType actionType, IEnumerable <IStorageEntity> entities)
        {
            StorageAction storageAction = new StorageAction(actionType, entities);

            if (_isSuspended)
            {
                _storageActions.Enqueue(storageAction);
            }
            else
            {
                ApplyAction(storageAction);
            }
        }
        private void ApplyAction(StorageAction storageAction)
        {
            switch (storageAction.StorageActionType)
            {
            case StorageActionType.Add:
                _securityStorage.AddItems(storageAction.Entities);
                break;

            case StorageActionType.Remove:
                _securityStorage.RemoveItems(storageAction.Entities);
                break;

            case StorageActionType.Update:
                _securityStorage.UpdateItems(storageAction.Entities);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }