Ejemplo n.º 1
0
        public async Task <Profile> BanProfile(Guid profileId, DateTimeOffset bannedAt, CancellationToken cancellationToken)
        {
            Ensure.Guid.IsNotEmpty(profileId, nameof(profileId));

            var profile = await _store.BanProfile(profileId, bannedAt, cancellationToken).ConfigureAwait(false);

            if (profile == null)
            {
                return(null);
            }

            await HideProfile(profile, cancellationToken).ConfigureAwait(false);

            return(profile);
        }