Skip to content

Commit

Permalink
Update AutoRest C# version to 3.0.0-beta.20230927.3 (#39013)
Browse files Browse the repository at this point in the history
  • Loading branch information
azure-sdk authored Sep 28, 2023
1 parent e5aae77 commit 2f11d17
Show file tree
Hide file tree
Showing 171 changed files with 13,625 additions and 16,229 deletions.
2 changes: 1 addition & 1 deletion eng/Packages.Data.props
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
All should have PrivateAssets="All" set so they don't become package dependencies
-->
<ItemGroup>
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20230927.1" PrivateAssets="All" />
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20230927.3" PrivateAssets="All" />
<PackageReference Update="Azure.ClientSdk.Analyzers" Version="0.1.1-dev.20230927.2" PrivateAssets="All" />
<PackageReference Update="coverlet.collector" Version="3.2.0" PrivateAssets="All" />
<PackageReference Update="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.1" PrivateAssets="All" />
Expand Down
2 changes: 1 addition & 1 deletion eng/emitter-package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"main": "dist/src/index.js",
"dependencies": {
"@azure-tools/typespec-csharp": "0.2.0-beta.20230927.1"
"@azure-tools/typespec-csharp": "0.2.0-beta.20230927.3"
}
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Response response = await client.DeleteAsync("<partyId>", "<attachmentId>");
Console.WriteLine(response.Status);
]]></code>
This sample shows how to call DeleteAsync with all parameters.
Expand All @@ -165,6 +166,7 @@ TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Response response = await client.DeleteAsync("<partyId>", "<attachmentId>");
Console.WriteLine(response.Status);
]]></code></example>
</member>
Expand All @@ -176,6 +178,7 @@ TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Response response = client.Delete("<partyId>", "<attachmentId>");
Console.WriteLine(response.Status);
]]></code>
This sample shows how to call Delete with all parameters.
Expand All @@ -184,6 +187,7 @@ TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Response response = client.Delete("<partyId>", "<attachmentId>");
Console.WriteLine(response.Status);
]]></code></example>
</member>
Expand All @@ -195,12 +199,11 @@ TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Response response = await client.DownloadAsync("<partyId>", "<attachmentId>", null);
if (response.ContentStream != null)
{
using (Stream outFileStream = File.OpenWrite("<filepath>"))
{
response.ContentStream.CopyTo(outFileStream);
}
using Stream outFileStream = File.OpenWrite("<filepath>");
response.ContentStream.CopyTo(outFileStream);
}
]]></code>
This sample shows how to call DownloadAsync with all parameters and parse the result.
Expand All @@ -209,12 +212,11 @@ TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Response response = await client.DownloadAsync("<partyId>", "<attachmentId>", null);
if (response.ContentStream != null)
{
using (Stream outFileStream = File.OpenWrite("<filepath>"))
{
response.ContentStream.CopyTo(outFileStream);
}
using Stream outFileStream = File.OpenWrite("<filepath>");
response.ContentStream.CopyTo(outFileStream);
}
]]></code></example>
</member>
Expand All @@ -226,12 +228,11 @@ TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Response response = client.Download("<partyId>", "<attachmentId>", null);
if (response.ContentStream != null)
{
using (Stream outFileStream = File.OpenWrite("<filepath>"))
{
response.ContentStream.CopyTo(outFileStream);
}
using Stream outFileStream = File.OpenWrite("<filepath>");
response.ContentStream.CopyTo(outFileStream);
}
]]></code>
This sample shows how to call Download with all parameters and parse the result.
Expand All @@ -240,12 +241,11 @@ TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
Response response = client.Download("<partyId>", "<attachmentId>", null);
if (response.ContentStream != null)
{
using (Stream outFileStream = File.OpenWrite("<filepath>"))
{
response.ContentStream.CopyTo(outFileStream);
}
using Stream outFileStream = File.OpenWrite("<filepath>");
response.ContentStream.CopyTo(outFileStream);
}
]]></code></example>
</member>
Expand All @@ -259,49 +259,31 @@ Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVer
await foreach (BinaryData item in client.GetAttachmentsByPartyIdAsync("<partyId>", null, null, null, null, null, null, null, null, null, null, null, null, null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result[0].ToString());
Console.WriteLine(result.ToString());
}
]]></code>
This sample shows how to call GetAttachmentsByPartyIdAsync with all parameters and parse the result.
<code><![CDATA[
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
await foreach (BinaryData item in client.GetAttachmentsByPartyIdAsync("<partyId>", new List<string>()
{
"<resourceIds>"
}, new List<string>()
{
"<resourceTypes>"
}, new List<string>()
{
"<ids>"
}, new List<string>()
{
"<names>"
}, new List<string>()
{
"<propertyFilters>"
}, new List<string>()
{
"<statuses>"
}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "<skipToken>", null))
await foreach (BinaryData item in client.GetAttachmentsByPartyIdAsync("<partyId>", new string[] { "<resourceIds>" }, new string[] { "<resourceTypes>" }, new string[] { "<ids>" }, new string[] { "<names>" }, new string[] { "<propertyFilters>" }, new string[] { "<statuses>" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "<skipToken>", null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result[0].GetProperty("resourceId").ToString());
Console.WriteLine(result[0].GetProperty("resourceType").ToString());
Console.WriteLine(result[0].GetProperty("originalFileName").ToString());
Console.WriteLine(result[0].GetProperty("partyId").ToString());
Console.WriteLine(result[0].GetProperty("id").ToString());
Console.WriteLine(result[0].GetProperty("status").ToString());
Console.WriteLine(result[0].GetProperty("createdDateTime").ToString());
Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString());
Console.WriteLine(result[0].GetProperty("source").ToString());
Console.WriteLine(result[0].GetProperty("name").ToString());
Console.WriteLine(result[0].GetProperty("description").ToString());
Console.WriteLine(result[0].GetProperty("createdBy").ToString());
Console.WriteLine(result[0].GetProperty("modifiedBy").ToString());
Console.WriteLine(result[0].GetProperty("eTag").ToString());
Console.WriteLine(result.GetProperty("resourceId").ToString());
Console.WriteLine(result.GetProperty("resourceType").ToString());
Console.WriteLine(result.GetProperty("originalFileName").ToString());
Console.WriteLine(result.GetProperty("partyId").ToString());
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("createdDateTime").ToString());
Console.WriteLine(result.GetProperty("modifiedDateTime").ToString());
Console.WriteLine(result.GetProperty("source").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("createdBy").ToString());
Console.WriteLine(result.GetProperty("modifiedBy").ToString());
Console.WriteLine(result.GetProperty("eTag").ToString());
}
]]></code></example>
</member>
Expand All @@ -315,49 +297,31 @@ Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVer
foreach (BinaryData item in client.GetAttachmentsByPartyId("<partyId>", null, null, null, null, null, null, null, null, null, null, null, null, null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result[0].ToString());
Console.WriteLine(result.ToString());
}
]]></code>
This sample shows how to call GetAttachmentsByPartyId with all parameters and parse the result.
<code><![CDATA[
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");
foreach (BinaryData item in client.GetAttachmentsByPartyId("<partyId>", new List<string>()
{
"<resourceIds>"
}, new List<string>()
{
"<resourceTypes>"
}, new List<string>()
{
"<ids>"
}, new List<string>()
{
"<names>"
}, new List<string>()
{
"<propertyFilters>"
}, new List<string>()
{
"<statuses>"
}, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "<skipToken>", null))
foreach (BinaryData item in client.GetAttachmentsByPartyId("<partyId>", new string[] { "<resourceIds>" }, new string[] { "<resourceTypes>" }, new string[] { "<ids>" }, new string[] { "<names>" }, new string[] { "<propertyFilters>" }, new string[] { "<statuses>" }, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), 1234, "<skipToken>", null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result[0].GetProperty("resourceId").ToString());
Console.WriteLine(result[0].GetProperty("resourceType").ToString());
Console.WriteLine(result[0].GetProperty("originalFileName").ToString());
Console.WriteLine(result[0].GetProperty("partyId").ToString());
Console.WriteLine(result[0].GetProperty("id").ToString());
Console.WriteLine(result[0].GetProperty("status").ToString());
Console.WriteLine(result[0].GetProperty("createdDateTime").ToString());
Console.WriteLine(result[0].GetProperty("modifiedDateTime").ToString());
Console.WriteLine(result[0].GetProperty("source").ToString());
Console.WriteLine(result[0].GetProperty("name").ToString());
Console.WriteLine(result[0].GetProperty("description").ToString());
Console.WriteLine(result[0].GetProperty("createdBy").ToString());
Console.WriteLine(result[0].GetProperty("modifiedBy").ToString());
Console.WriteLine(result[0].GetProperty("eTag").ToString());
Console.WriteLine(result.GetProperty("resourceId").ToString());
Console.WriteLine(result.GetProperty("resourceType").ToString());
Console.WriteLine(result.GetProperty("originalFileName").ToString());
Console.WriteLine(result.GetProperty("partyId").ToString());
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("createdDateTime").ToString());
Console.WriteLine(result.GetProperty("modifiedDateTime").ToString());
Console.WriteLine(result.GetProperty("source").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("createdBy").ToString());
Console.WriteLine(result.GetProperty("modifiedBy").ToString());
Console.WriteLine(result.GetProperty("eTag").ToString());
}
]]></code></example>
</member>
Expand Down
Loading

0 comments on commit 2f11d17

Please sign in to comment.