-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dpg): support
logicalPath
of lro (#3839)
- pass in `logicalPath` info from emitter - in generator, generate conversion method to fetch the return value from `logicalPath` - add test case resolve #3837 --------- Co-authored-by: Mingzhe Huang (from Dev Box) <[email protected]>
- Loading branch information
Showing
18 changed files
with
411 additions
and
310 deletions.
There are no files selected for viewing
This file contains 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 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 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
29 changes: 29 additions & 0 deletions
29
src/AutoRest.CSharp/Common/Output/Models/LongRunningResultRetrievalMethod.cs
This file contains 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using System.Collections.Generic; | ||
using AutoRest.CSharp.Generation.Types; | ||
using AutoRest.CSharp.Output.Models; | ||
using AutoRest.CSharp.Output.Models.Shared; | ||
|
||
namespace AutoRest.CSharp.Common.Output.Models | ||
{ | ||
/// <summary> | ||
/// Method to fetch return value specified by `logicalPath` from raw response. | ||
/// </summary> | ||
/// <param name="ReturnType">Type of the return value specified by <see cref="ResultPath"/>.</param> | ||
/// <param name="ResponseTypeName">Name of the raw response type.</param> | ||
/// <param name="ResultPath">`logicalPath`.</param> | ||
internal record LongRunningResultRetrievalMethod(CSharpType ReturnType, string ResponseTypeName, string ResultPath) | ||
{ | ||
public MethodSignature MethodSignature => new( | ||
Name: $"Fetch{ReturnType.Name}From{ResponseTypeName}", | ||
Summary: null, | ||
Description: null, | ||
Modifiers: MethodSignatureModifiers.Private, | ||
ReturnType: ReturnType, | ||
ReturnDescription: null, | ||
Parameters: new List<Parameter>() { KnownParameters.Response } | ||
); | ||
} | ||
} |
This file contains 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 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 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 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 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 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 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
Oops, something went wrong.