void HandleLicenseAcquisitionServiceRequest(PlayReadyLicenseAcquisitionServiceRequest serviceRequest) { TestLogger.LogMessage(" "); TestLogger.LogMessage("Enter RequestChain.HandleLicenseAcquisitionServiceRequest()"); _licenseAcquisition = new LAAndReportResult(new ReportResultDelegate(HandleServiceRequest_Finished)); _licenseAcquisition.RequestConfigData = _requestConfigData; _licenseAcquisition.AcquireLicenseReactively(serviceRequest); TestLogger.LogMessage("Leave RequestChain.HandleLicenseAcquisitionServiceRequest()"); }
public void Test_CocktailContentResolver(string strContentHeader, string strLAURL, string strExpectServiceRequest) { TestLogger.LogMessage("Enter Test_CocktailContentResolver()"); bool bExpectServiceRequest = ActionParamConvertToBool(strExpectServiceRequest); Uri uri = ActionParamConvertToUri(strLAURL); TestLogger.LogMessage(strContentHeader); PlayReadyContentHeader contentHeader = new PlayReadyContentHeader( new System.Text.UnicodeEncoding().GetBytes(strContentHeader), uri, uri, String.Empty, Guid.Empty ); LicenseAcquisition.DumpContentHeaderValues(contentHeader); TestLogger.LogMessage("Using PlayReadyContentResolver..."); IPlayReadyServiceRequest serviceRequest = PlayReadyContentResolver.ServiceRequest(contentHeader); if (serviceRequest == null && !bExpectServiceRequest) { TestLogger.LogMessage("ServiceRequest not needed!!!"); TestActionFinished(true, null); } else { TestLogger.LogMessage("Servicing request..."); PlayReadyLicenseAcquisitionServiceRequest licenseServiceRequest = serviceRequest as PlayReadyLicenseAcquisitionServiceRequest; LAAndReportResult licenseAcquisition = new LAAndReportResult(new ReportResultDelegate(TestActionFinished), null); licenseAcquisition.AcquireLicenseReactively(serviceRequest as PlayReadyLicenseAcquisitionServiceRequest); } TestLogger.LogMessage("Leave Test_CocktailContentResolver()"); }