Skip to content

Commit

Permalink
Fix: use operation.Value to get Response (Azure#35248)
Browse files Browse the repository at this point in the history
* Fix: use operation.Value to get Response

* fix typo in readme snippet
  • Loading branch information
asaflevi-ms authored Mar 30, 2023
1 parent d0eb2bb commit 5459122
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ OncoPhenotypeResult oncoPhenotypeResult = default;
try
{
Operation<OncoPhenotypeResult> operation = await client.InferCancerProfileAsync(WaitUntil.Completed, oncoPhenotypeData);
Response resp = operation.GetRawResponse();
oncoPhenotypeResult = OncoPhenotypeResult.FromResponse(resp);
oncoPhenotypeResult = operation.Value;
}
catch (Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ OncoPhenotypeResult oncoPhenotypeResult = default;
try
{
Operation<OncoPhenotypeResult> operation = client.InferCancerProfile(WaitUntil.Completed, oncoPhenotypeData);
Response resp = operation.GetRawResponse();
oncoPhenotypeResult = OncoPhenotypeResult.FromResponse(resp);
oncoPhenotypeResult = operation.Value;
}
catch (Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ OncoPhenotypeResult oncoPhenotypeResult = default;
try
{
Operation<OncoPhenotypeResult> operation = await client.InferCancerProfileAsync(WaitUntil.Completed, oncoPhenotypeData);
Response resp = operation.GetRawResponse();
oncoPhenotypeResult = OncoPhenotypeResult.FromResponse(resp);
oncoPhenotypeResult = operation.Value;
}
catch (Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ Ductal carcinoma in situ (DCIS): Present
try
{
Operation<OncoPhenotypeResult> operation = client.InferCancerProfile(WaitUntil.Completed, oncoPhenotypeData);
Response resp = operation.GetRawResponse();
oncoPhenotypeResult = OncoPhenotypeResult.FromResponse(resp);
oncoPhenotypeResult = operation.Value;
}
catch (Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ Ductal carcinoma in situ (DCIS): Present
try
{
Operation<OncoPhenotypeResult> operation = await client.InferCancerProfileAsync(WaitUntil.Completed, oncoPhenotypeData);
Response resp = operation.GetRawResponse();
oncoPhenotypeResult = OncoPhenotypeResult.FromResponse(resp);
oncoPhenotypeResult = operation.Value;
}
catch (Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ try
{
// Using ClinicalMatchingClient + MatchTrialsAsync
Operation<TrialMatcherResult> operation = await clinicalMatchingClient.MatchTrialsAsync(WaitUntil.Completed, trialMatcherData);
Response resp = operation.GetRawResponse();
trialMatcherResult = TrialMatcherResult.FromResponse(resp);
trialMatcherResult = operation.Value;
}
catch (Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ try
{
// Using ClinicalMatchingClient + MatchTrials
Operation<TrialMatcherResult> operation = clinicalMatchingClient.MatchTrials(WaitUntil.Completed, trialMatcherData);
Response resp = operation.GetRawResponse();
trialMatcherResult = TrialMatcherResult.FromResponse(resp);
trialMatcherResult = operation.Value;
}
catch (Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ try
{
// Using ClinicalMatchingClient + MatchTrialsAsync
Operation<TrialMatcherResult> operation = await clinicalMatchingClient.MatchTrialsAsync(WaitUntil.Completed, trialMatcherData);
Response resp = operation.GetRawResponse();
trialMatcherResult = TrialMatcherResult.FromResponse(resp);
trialMatcherResult = operation.Value;
}
catch (Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ public void MatchTrials()
{
// Using ClinicalMatchingClient + MatchTrials
Operation<TrialMatcherResult> operation = clinicalMatchingClient.MatchTrials(WaitUntil.Completed, trialMatcherData);
Response resp = operation.GetRawResponse();
trialMatcherResult = TrialMatcherResult.FromResponse(resp);
trialMatcherResult = operation.Value;
}
catch (Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ public async Task MatchTrialsAsync()
{
// Using ClinicalMatchingClient + MatchTrialsAsync
Operation<TrialMatcherResult> operation = await clinicalMatchingClient.MatchTrialsAsync(WaitUntil.Completed, trialMatcherData);
Response resp = operation.GetRawResponse();
trialMatcherResult = TrialMatcherResult.FromResponse(resp);
trialMatcherResult = operation.Value;
}
catch (Exception ex)
{
Expand Down

0 comments on commit 5459122

Please sign in to comment.