Exemplo n.º 1
0
        public Task <Packet> Decrypt(CancellationToken token)
        {
            if (DrmSession == null)
            {
                throw new InvalidOperationException("Decrypt called without DrmSession");
            }

            return(DrmSession.DecryptPacket(this, token));
        }
Exemplo n.º 2
0
        public Packet Decrypt(CancellationToken token)
        {
            if (DrmSession == null)
            {
                throw new InvalidOperationException("Decrypt called without DrmSession");
            }

            try
            {
                return(DrmSession.DecryptPacket(this, token).Result);
            }
            catch (AggregateException ex)
            {
                ExceptionDispatchInfo.Capture(ex.InnerException).Throw();
                throw; // wont be executed as above method always throws
            }
        }