Beispiel #1
0
        async public void  HandleRevocationReactively(PlayReadyRevocationServiceRequest request)
        {
            TestLogger.LogMessage("Enter Revocation.HandleRevocationReactively()");
            Exception exception = null;

            try
            {
                _serviceRequest = request;

                TestLogger.LogMessage("Begin revocation service request...");
                await request.BeginServiceRequest();
            }
            catch (Exception ex)
            {
                TestLogger.LogMessage("Saving exception..");
                exception = ex;
            }
            finally
            {
                TestLogger.LogMessage("Post-RevocationServiceRequest Values:");
                if (exception == null)
                {
                    TestLogger.LogMessage("ResponseCustomData = " + request.ResponseCustomData);
                    TestLogger.LogMessage("ProtectionSystem   = " + request.ProtectionSystem.ToString());
                    TestLogger.LogMessage("Type = " + request.Type.ToString());
                }

                RevocationServiceRequestCompleted(request, exception);
            }

            TestLogger.LogMessage("Leave Revocation.HandleRevocationReactively()");
        }
Beispiel #2
0
        protected virtual void RevocationServiceRequestCompleted(PlayReadyRevocationServiceRequest sender, Exception hrCompletionStatus)
        {
            TestLogger.LogImportantMessage("RevocationServiceRequestCompleted");

            if (hrCompletionStatus != null)
            {
                TestLogger.LogError("RevocationServiceRequestCompleted failed with " + hrCompletionStatus.HResult);
            }
        }
Beispiel #3
0
        protected virtual void RevocationServiceRequestCompleted(PlayReadyRevocationServiceRequest sender, Exception hrCompletionStatus)
        {
            Debug.WriteLine("RevocationServiceRequestCompleted");

            if (hrCompletionStatus != null)
            {
                Debug.WriteLine("RevocationServiceRequestCompleted failed with " + hrCompletionStatus.HResult);
            }
        }
Beispiel #4
0
        void HandleRevocationServiceRequest(PlayReadyRevocationServiceRequest serviceRequest)
        {
            Debug.WriteLine(" ");
            Debug.WriteLine("Enter RequestChain.HandleRevocationServiceRequest()");

            _revocationAndReportResult = new RevocationAndReportResult(new ReportResultDelegate(HandleServiceRequest_Finished));
            _revocationAndReportResult.RequestConfigData = _requestConfigData;
            _revocationAndReportResult.HandleRevocationReactively(serviceRequest);

            Debug.WriteLine("Leave RequestChain.HandleRevocationServiceRequest()");
        }
Beispiel #5
0
        protected override void RevocationServiceRequestCompleted(PlayReadyRevocationServiceRequest sender, Exception hrCompletionStatus)
        {
            TestLogger.LogMessage("Enter RevocationAndReportResult.RevocationServiceRequestCompleted()");

            if (hrCompletionStatus == null)
            {
                TestLogger.LogMessage("********************************************Revocation handling succeeded**************************************************");
                _reportResult(true, null);
            }
            else
            {
                if (!PerformEnablingActionIfRequested(hrCompletionStatus))
                {
                    TestLogger.LogError("RevocationServiceRequestCompleted ERROR: " + hrCompletionStatus.ToString());
                    _reportResult(false, null);
                }
            }

            TestLogger.LogMessage("Leave RevocationAndReportResult.RevocationServiceRequestCompleted()");
        }
Beispiel #6
0
        public void  HandleRevocationProactively()
        {
            try
            {
                PlayReadyRevocationServiceRequest request = new PlayReadyRevocationServiceRequest();
                HandleRevocationReactively(request);
            }
            catch (Exception ex)
            {
                if (ex.HResult == ServiceRequest.MSPR_E_NEEDS_INDIVIDUALIZATION)
                {
                    PlayReadyIndividualizationServiceRequest indivServiceRequest = new PlayReadyIndividualizationServiceRequest();

                    RequestChain requestChain = new RequestChain(indivServiceRequest);
                    requestChain.FinishAndReportResult(new ReportResultDelegate(HandleIndivServiceRequest_Finished));
                }
                else
                {
                    TestLogger.LogImportantMessage("HandleRevocationProactively failed:" + ex.HResult);
                }
            }
        }