public virtual async Task SubscribeToAllAvailablePushRequestsAsync(IUserIdentifier user)
        {
            var pushRequestDefinitions = (await DefinitionManager
                                          .GetAllAvailableAsync(user))
                                         .Where(nd => nd.EntityType == null)
                                         .ToList();

            foreach (var notificationDefinition in pushRequestDefinitions)
            {
                await SubscribeAsync(user, notificationDefinition.Name);
            }
        }
 /// <summary>
 /// Gets all available push definitions for given user.
 /// </summary>
 /// <param name="pushDefinitionManager">Push definition manager</param>
 /// <param name="user">User</param>
 public static IReadOnlyList <PushDefinition> GetAllAvailable(this IPushDefinitionManager pushDefinitionManager, UserIdentifier user)
 {
     return(AsyncHelper.RunSync(() => pushDefinitionManager.GetAllAvailableAsync(user)));
 }