public Task <Packet> Decrypt(CancellationToken token) { if (DrmSession == null) { throw new InvalidOperationException("Decrypt called without DrmSession"); } return(DrmSession.DecryptPacket(this, token)); }
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 } }