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()"); }
protected virtual void RevocationServiceRequestCompleted(PlayReadyRevocationServiceRequest sender, Exception hrCompletionStatus) { TestLogger.LogImportantMessage("RevocationServiceRequestCompleted"); if (hrCompletionStatus != null) { TestLogger.LogError("RevocationServiceRequestCompleted failed with " + hrCompletionStatus.HResult); } }
protected virtual void RevocationServiceRequestCompleted(PlayReadyRevocationServiceRequest sender, Exception hrCompletionStatus) { Debug.WriteLine("RevocationServiceRequestCompleted"); if (hrCompletionStatus != null) { Debug.WriteLine("RevocationServiceRequestCompleted failed with " + hrCompletionStatus.HResult); } }
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()"); }
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()"); }
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); } } }