-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Update arm response types to match current Azure.Core pattern #20738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
m-nash
merged 24 commits into
Azure:feature/mgmt-track2
from
AME-Redmond:mnash-5118-responseTypes
May 5, 2021
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
0f3f806
WIP
m-nash 0f52a38
wip
m-nash 10f6ad0
Change the accessbility to virtual for Resource.Id
1f81d59
merge from feature/mgmt-track2
c192698
update strawman for operation changes
ccc17c7
merge from usptream
5060f5c
Merge branch 'feature/mgmt-track2' of https://github.com/Azure/azure-…
m-nash 795c706
merge from mgmt-track2
m-nash 2f90c91
finalize changes before testing
m-nash d0407f6
update ph overloads
m-nash c7305e8
move pipeline creation into armoperation
m-nash 30e529d
wip
m-nash e358938
merge
m-nash 7db165a
updates based on new OperationInternals
m-nash a4e5bae
Merge branch 'feature/mgmt-track2' of https://github.com/Azure/azure-…
m-nash ec173e7
address PR comments
m-nash 5a9fff2
update test classes to use new pattern
m-nash 381cc03
merge from upstream
m-nash a6217d6
Merge branch 'feature/mgmt-track2' of https://github.com/Azure/azure-…
m-nash d7c8171
Merge branch 'feature/mgmt-track2' of https://github.com/Azure/azure-…
m-nash cd712bb
final fixes for arm core tests
m-nash 8649b18
use mock response instead of null
m-nash 09bb02b
updates to proto code
m-nash f888e32
add null check around basetype
m-nash File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 29 additions & 2 deletions
31
sdk/core/Azure.Core/tests/TestClients/PhArmOperationTest.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,44 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System; | ||
| using System.Threading; | ||
| using System.Threading.Tasks; | ||
| using Azure.Core.TestFramework; | ||
| using Azure.ResourceManager.Core; | ||
|
|
||
| namespace Azure.Core.Tests | ||
| { | ||
| public class PhArmOperationTest<T> : ArmOperationTest<T> | ||
| public class PhArmOperationTest<T> : ArmOperation<T> | ||
| where T : class | ||
| { | ||
| private OperationOrResponseInternals<T> _operationHelper; | ||
|
|
||
| public override T Value => _operationHelper.Value; | ||
|
|
||
| public override bool HasValue => _operationHelper.HasValue; | ||
|
|
||
| public override string Id => "MyId"; | ||
|
|
||
| public override bool HasCompleted => _operationHelper.HasCompleted; | ||
|
|
||
| protected PhArmOperationTest() | ||
| { | ||
| } | ||
|
|
||
| public PhArmOperationTest(T value) : base(value) | ||
| public PhArmOperationTest(T value) | ||
| { | ||
| _operationHelper = new OperationOrResponseInternals<T>(Response.FromValue(value, new MockResponse(200))); | ||
| } | ||
|
|
||
| public override ValueTask<Response<T>> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operationHelper.WaitForCompletionAsync(cancellationToken); | ||
|
|
||
| public override ValueTask<Response<T>> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken) => _operationHelper.WaitForCompletionAsync(pollingInterval, cancellationToken); | ||
|
|
||
| public override Response GetRawResponse() => _operationHelper.GetRawResponse(); | ||
|
|
||
| public override ValueTask<Response> UpdateStatusAsync(CancellationToken cancellationToken = default) => _operationHelper.UpdateStatusAsync(cancellationToken); | ||
|
|
||
| public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operationHelper.UpdateStatus(cancellationToken); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 0 additions & 83 deletions
83
sdk/resourcemanager/Azure.ResourceManager.Core/src/ArmOperation.cs
This file was deleted.
Oops, something went wrong.
46 changes: 0 additions & 46 deletions
46
sdk/resourcemanager/Azure.ResourceManager.Core/src/ArmResponse.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.