Skip to content

Commit d356c75

Browse files
author
SDKAuto
committed
CodeGen from PR 30424 in Azure/azure-rest-api-specs
Merge d59f0a2985a56c308a73bc85384aeee1e0edff62 into 39cc29c14aa67059b22e1fca64eafa53c9c3a593
1 parent 5e5feb2 commit d356c75

30 files changed

+4140
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
Microsoft Visual Studio Solution File, Format Version 12.00
2+
# Visual Studio Version 16
3+
VisualStudioVersion = 16.0.29709.97
4+
MinimumVisualStudioVersion = 10.0.40219.1
5+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.App.DynamicSessions", "src\Microsoft.App.DynamicSessions.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}"
6+
EndProject
7+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.App.DynamicSessions.Tests", "tests\Microsoft.App.DynamicSessions.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}"
8+
EndProject
9+
Global
10+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
11+
Debug|Any CPU = Debug|Any CPU
12+
Release|Any CPU = Release|Any CPU
13+
EndGlobalSection
14+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
15+
{B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16+
{B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
17+
{B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
18+
{B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU
19+
{8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20+
{8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU
21+
{8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU
22+
{8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU
23+
{A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24+
{A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU
25+
{A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU
26+
{A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU
27+
{FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
28+
{FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU
29+
{FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU
30+
{FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU
31+
{85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
32+
{85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
33+
{85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
34+
{85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU
35+
{28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
36+
{28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU
37+
{28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU
38+
{28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU
39+
{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
40+
{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU
41+
{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU
42+
{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU
43+
EndGlobalSection
44+
GlobalSection(SolutionProperties) = preSolution
45+
HideSolutionNode = FALSE
46+
EndGlobalSection
47+
GlobalSection(ExtensibilityGlobals) = postSolution
48+
SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE}
49+
EndGlobalSection
50+
EndGlobal

sdk/microsoft.app/Microsoft.App.DynamicSessions/src/Generated/CodeExecution.cs

Lines changed: 338 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/microsoft.app/Microsoft.App.DynamicSessions/src/Generated/CodeExecutionStatus.cs

Lines changed: 54 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/microsoft.app/Microsoft.App.DynamicSessions/src/Generated/CodeInputType.cs

Lines changed: 54 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<doc>
3+
<members>
4+
<member name="GetResultAsync(string,string,CancellationToken)">
5+
<example>
6+
This sample shows how to call GetResultAsync.
7+
<code><![CDATA[
8+
Uri endpoint = new Uri("<endpoint>");
9+
TokenCredential credential = new DefaultAzureCredential();
10+
CodeExecution client = new DynamicSessionsClient(endpoint, credential).GetCodeExecutionClient(apiVersion: "2024-09-01");
11+
12+
Response<SessionCodeExecutionResponse> response = await client.GetResultAsync("testexecutionid", "testidentidier");
13+
]]></code></example>
14+
</member>
15+
<member name="GetResult(string,string,CancellationToken)">
16+
<example>
17+
This sample shows how to call GetResult.
18+
<code><![CDATA[
19+
Uri endpoint = new Uri("<endpoint>");
20+
TokenCredential credential = new DefaultAzureCredential();
21+
CodeExecution client = new DynamicSessionsClient(endpoint, credential).GetCodeExecutionClient(apiVersion: "2024-09-01");
22+
23+
Response<SessionCodeExecutionResponse> response = client.GetResult("testexecutionid", "testidentidier");
24+
]]></code></example>
25+
</member>
26+
<member name="GetResultAsync(string,string,RequestContext)">
27+
<example>
28+
This sample shows how to call GetResultAsync and parse the result.
29+
<code><![CDATA[
30+
Uri endpoint = new Uri("<endpoint>");
31+
TokenCredential credential = new DefaultAzureCredential();
32+
CodeExecution client = new DynamicSessionsClient(endpoint, credential).GetCodeExecutionClient(apiVersion: "2024-09-01");
33+
34+
Response response = await client.GetResultAsync("testexecutionid", "testidentidier", null);
35+
36+
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
37+
Console.WriteLine(result.GetProperty("id").ToString());
38+
Console.WriteLine(result.GetProperty("status").ToString());
39+
Console.WriteLine(result.GetProperty("stdout").ToString());
40+
Console.WriteLine(result.GetProperty("stderr").ToString());
41+
Console.WriteLine(result.GetProperty("result").ToString());
42+
Console.WriteLine(result.GetProperty("executionTimeInMilliseconds").ToString());
43+
]]></code></example>
44+
</member>
45+
<member name="GetResult(string,string,RequestContext)">
46+
<example>
47+
This sample shows how to call GetResult and parse the result.
48+
<code><![CDATA[
49+
Uri endpoint = new Uri("<endpoint>");
50+
TokenCredential credential = new DefaultAzureCredential();
51+
CodeExecution client = new DynamicSessionsClient(endpoint, credential).GetCodeExecutionClient(apiVersion: "2024-09-01");
52+
53+
Response response = client.GetResult("testexecutionid", "testidentidier", null);
54+
55+
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
56+
Console.WriteLine(result.GetProperty("id").ToString());
57+
Console.WriteLine(result.GetProperty("status").ToString());
58+
Console.WriteLine(result.GetProperty("stdout").ToString());
59+
Console.WriteLine(result.GetProperty("stderr").ToString());
60+
Console.WriteLine(result.GetProperty("result").ToString());
61+
Console.WriteLine(result.GetProperty("executionTimeInMilliseconds").ToString());
62+
]]></code></example>
63+
</member>
64+
<member name="ExecuteCodeAsync(WaitUntil,string,SessionCodeExecutionRequest,CancellationToken)">
65+
<example>
66+
This sample shows how to call ExecuteCodeAsync.
67+
<code><![CDATA[
68+
Uri endpoint = new Uri("<endpoint>");
69+
TokenCredential credential = new DefaultAzureCredential();
70+
CodeExecution client = new DynamicSessionsClient(endpoint, credential).GetCodeExecutionClient(apiVersion: "2024-09-01");
71+
72+
SessionCodeExecutionRequest codeExecutionRequest = new SessionCodeExecutionRequest(CodeInputType.Inline, ExecutionType.Synchronous, "print(7*9)", 60);
73+
Operation operation = await client.ExecuteCodeAsync(WaitUntil.Completed, "testidentidier", codeExecutionRequest);
74+
]]></code></example>
75+
</member>
76+
<member name="ExecuteCode(WaitUntil,string,SessionCodeExecutionRequest,CancellationToken)">
77+
<example>
78+
This sample shows how to call ExecuteCode.
79+
<code><![CDATA[
80+
Uri endpoint = new Uri("<endpoint>");
81+
TokenCredential credential = new DefaultAzureCredential();
82+
CodeExecution client = new DynamicSessionsClient(endpoint, credential).GetCodeExecutionClient(apiVersion: "2024-09-01");
83+
84+
SessionCodeExecutionRequest codeExecutionRequest = new SessionCodeExecutionRequest(CodeInputType.Inline, ExecutionType.Synchronous, "print(7*9)", 60);
85+
Operation operation = client.ExecuteCode(WaitUntil.Completed, "testidentidier", codeExecutionRequest);
86+
]]></code></example>
87+
</member>
88+
<member name="ExecuteCodeAsync(WaitUntil,string,RequestContent,RequestContext)">
89+
<example>
90+
This sample shows how to call ExecuteCodeAsync.
91+
<code><![CDATA[
92+
Uri endpoint = new Uri("<endpoint>");
93+
TokenCredential credential = new DefaultAzureCredential();
94+
CodeExecution client = new DynamicSessionsClient(endpoint, credential).GetCodeExecutionClient(apiVersion: "2024-09-01");
95+
96+
using RequestContent content = RequestContent.Create(new
97+
{
98+
codeInputType = "Inline",
99+
executionType = "Synchronous",
100+
code = "print(7*9)",
101+
timeoutInSeconds = 60,
102+
});
103+
Operation operation = await client.ExecuteCodeAsync(WaitUntil.Completed, "testidentidier", content);
104+
]]></code></example>
105+
</member>
106+
<member name="ExecuteCode(WaitUntil,string,RequestContent,RequestContext)">
107+
<example>
108+
This sample shows how to call ExecuteCode.
109+
<code><![CDATA[
110+
Uri endpoint = new Uri("<endpoint>");
111+
TokenCredential credential = new DefaultAzureCredential();
112+
CodeExecution client = new DynamicSessionsClient(endpoint, credential).GetCodeExecutionClient(apiVersion: "2024-09-01");
113+
114+
using RequestContent content = RequestContent.Create(new
115+
{
116+
codeInputType = "Inline",
117+
executionType = "Synchronous",
118+
code = "print(7*9)",
119+
timeoutInSeconds = 60,
120+
});
121+
Operation operation = client.ExecuteCode(WaitUntil.Completed, "testidentidier", content);
122+
]]></code></example>
123+
</member>
124+
</members>
125+
</doc>

0 commit comments

Comments
 (0)