Skip to content
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

Update AutoRest C# version to 3.0.0-beta.20231008.1 #39143

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/Packages.Data.props
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,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.20230928.1" PrivateAssets="All" />
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20231008.1" 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.20230928.1"
"@azure-tools/typespec-csharp": "0.2.0-beta.20231008.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result.
TokenCredential credential = new DefaultAzureCredential();
ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new object());
using RequestContent content = RequestContent.Create(new object());
Response response = await client.CreateOrUpdateAsync("<partyId>", "<applicationDataId>", content);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Expand All @@ -193,7 +193,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques
TokenCredential credential = new DefaultAzureCredential();
ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new
using RequestContent content = RequestContent.Create(new
{
applicationProductDetails = new object[]
{
Expand Down Expand Up @@ -262,7 +262,7 @@ This sample shows how to call CreateOrUpdate and parse the result.
TokenCredential credential = new DefaultAzureCredential();
ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new object());
using RequestContent content = RequestContent.Create(new object());
Response response = client.CreateOrUpdate("<partyId>", "<applicationDataId>", content);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Expand All @@ -273,7 +273,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con
TokenCredential credential = new DefaultAzureCredential();
ApplicationData client = new FarmBeatsClient(credential).GetApplicationDataClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new
using RequestContent content = RequestContent.Create(new
{
applicationProductDetails = new object[]
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result.
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");

RequestContent content = null;
using RequestContent content = null;
Response response = await client.CreateOrUpdateAsync("<partyId>", "<attachmentId>", content);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Expand All @@ -91,7 +91,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(File.OpenRead("<filePath>"));
using RequestContent content = RequestContent.Create(File.OpenRead("<filePath>"));
Response response = await client.CreateOrUpdateAsync("<partyId>", "<attachmentId>", content);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Expand All @@ -118,7 +118,7 @@ This sample shows how to call CreateOrUpdate and parse the result.
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");

RequestContent content = null;
using RequestContent content = null;
Response response = client.CreateOrUpdate("<partyId>", "<attachmentId>", content);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Expand All @@ -129,7 +129,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con
TokenCredential credential = new DefaultAzureCredential();
Attachments client = new FarmBeatsClient(credential).GetAttachmentsClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(File.OpenRead("<filePath>"));
using RequestContent content = RequestContent.Create(File.OpenRead("<filePath>"));
Response response = client.CreateOrUpdate("<partyId>", "<attachmentId>", content);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result.
TokenCredential credential = new DefaultAzureCredential();
Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new object());
using RequestContent content = RequestContent.Create(new object());
Response response = await client.CreateOrUpdateAsync("<partyId>", "<boundaryId>", content);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Expand All @@ -91,7 +91,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques
TokenCredential credential = new DefaultAzureCredential();
Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new
using RequestContent content = RequestContent.Create(new
{
geometry = new
{
Expand Down Expand Up @@ -160,7 +160,7 @@ This sample shows how to call CreateOrUpdate and parse the result.
TokenCredential credential = new DefaultAzureCredential();
Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new object());
using RequestContent content = RequestContent.Create(new object());
Response response = client.CreateOrUpdate("<partyId>", "<boundaryId>", content);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Expand All @@ -171,7 +171,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con
TokenCredential credential = new DefaultAzureCredential();
Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new
using RequestContent content = RequestContent.Create(new
{
geometry = new
{
Expand Down Expand Up @@ -500,7 +500,7 @@ This sample shows how to call SearchAsync and parse the result.
TokenCredential credential = new DefaultAzureCredential();
Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new object());
using RequestContent content = RequestContent.Create(new object());
await foreach (BinaryData item in client.SearchAsync(content))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Expand All @@ -512,7 +512,7 @@ This sample shows how to call SearchAsync with all request content and parse the
TokenCredential credential = new DefaultAzureCredential();
Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new
using RequestContent content = RequestContent.Create(new
{
ids = new object[]
{
Expand Down Expand Up @@ -592,7 +592,7 @@ This sample shows how to call Search and parse the result.
TokenCredential credential = new DefaultAzureCredential();
Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new object());
using RequestContent content = RequestContent.Create(new object());
foreach (BinaryData item in client.Search(content))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Expand All @@ -604,7 +604,7 @@ This sample shows how to call Search with all request content and parse the resu
TokenCredential credential = new DefaultAzureCredential();
Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new
using RequestContent content = RequestContent.Create(new
{
ids = new object[]
{
Expand Down Expand Up @@ -766,7 +766,7 @@ This sample shows how to call SearchByPartyIdAsync and parse the result.
TokenCredential credential = new DefaultAzureCredential();
Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new object());
using RequestContent content = RequestContent.Create(new object());
await foreach (BinaryData item in client.SearchByPartyIdAsync("<partyId>", content))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Expand All @@ -778,7 +778,7 @@ This sample shows how to call SearchByPartyIdAsync with all parameters and reque
TokenCredential credential = new DefaultAzureCredential();
Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new
using RequestContent content = RequestContent.Create(new
{
ids = new object[]
{
Expand Down Expand Up @@ -858,7 +858,7 @@ This sample shows how to call SearchByPartyId and parse the result.
TokenCredential credential = new DefaultAzureCredential();
Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new object());
using RequestContent content = RequestContent.Create(new object());
foreach (BinaryData item in client.SearchByPartyId("<partyId>", content))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Expand All @@ -870,7 +870,7 @@ This sample shows how to call SearchByPartyId with all parameters and request co
TokenCredential credential = new DefaultAzureCredential();
Boundaries client = new FarmBeatsClient(credential).GetBoundariesClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new
using RequestContent content = RequestContent.Create(new
{
ids = new object[]
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result.
TokenCredential credential = new DefaultAzureCredential();
CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new object());
using RequestContent content = RequestContent.Create(new object());
Response response = await client.CreateOrUpdateAsync("<cropProductId>", content);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Expand All @@ -99,7 +99,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques
TokenCredential credential = new DefaultAzureCredential();
CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new
using RequestContent content = RequestContent.Create(new
{
cropIds = new object[]
{
Expand Down Expand Up @@ -156,7 +156,7 @@ This sample shows how to call CreateOrUpdate and parse the result.
TokenCredential credential = new DefaultAzureCredential();
CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new object());
using RequestContent content = RequestContent.Create(new object());
Response response = client.CreateOrUpdate("<cropProductId>", content);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Expand All @@ -167,7 +167,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con
TokenCredential credential = new DefaultAzureCredential();
CropProducts client = new FarmBeatsClient(credential).GetCropProductsClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new
using RequestContent content = RequestContent.Create(new
{
cropIds = new object[]
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result.
TokenCredential credential = new DefaultAzureCredential();
Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new object());
using RequestContent content = RequestContent.Create(new object());
Response response = await client.CreateOrUpdateAsync("<cropId>", content);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Expand All @@ -93,7 +93,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques
TokenCredential credential = new DefaultAzureCredential();
Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new
using RequestContent content = RequestContent.Create(new
{
phenotype = "<phenotype>",
breedingMethod = "VARIETY",
Expand Down Expand Up @@ -141,7 +141,7 @@ This sample shows how to call CreateOrUpdate and parse the result.
TokenCredential credential = new DefaultAzureCredential();
Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new object());
using RequestContent content = RequestContent.Create(new object());
Response response = client.CreateOrUpdate("<cropId>", content);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Expand All @@ -152,7 +152,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con
TokenCredential credential = new DefaultAzureCredential();
Crops client = new FarmBeatsClient(credential).GetCropsClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new
using RequestContent content = RequestContent.Create(new
{
phenotype = "<phenotype>",
breedingMethod = "VARIETY",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result.
TokenCredential credential = new DefaultAzureCredential();
DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new object());
using RequestContent content = RequestContent.Create(new object());
Response response = await client.CreateOrUpdateAsync("<sensorPartnerId>", "<deviceDataModelId>", content);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Expand All @@ -19,7 +19,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques
TokenCredential credential = new DefaultAzureCredential();
DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new
using RequestContent content = RequestContent.Create(new
{
type = "<type>",
manufacturer = "<manufacturer>",
Expand Down Expand Up @@ -68,7 +68,7 @@ This sample shows how to call CreateOrUpdate and parse the result.
TokenCredential credential = new DefaultAzureCredential();
DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new object());
using RequestContent content = RequestContent.Create(new object());
Response response = client.CreateOrUpdate("<sensorPartnerId>", "<deviceDataModelId>", content);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Expand All @@ -79,7 +79,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con
TokenCredential credential = new DefaultAzureCredential();
DeviceDataModels client = new FarmBeatsClient(credential).GetDeviceDataModelsClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new
using RequestContent content = RequestContent.Create(new
{
type = "<type>",
manufacturer = "<manufacturer>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This sample shows how to call CreateOrUpdateAsync and parse the result.
TokenCredential credential = new DefaultAzureCredential();
Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new object());
using RequestContent content = RequestContent.Create(new object());
Response response = await client.CreateOrUpdateAsync("<sensorPartnerId>", "<deviceId>", content);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Expand All @@ -19,7 +19,7 @@ This sample shows how to call CreateOrUpdateAsync with all parameters and reques
TokenCredential credential = new DefaultAzureCredential();
Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new
using RequestContent content = RequestContent.Create(new
{
deviceDataModelId = "<deviceDataModelId>",
integrationId = "<integrationId>",
Expand Down Expand Up @@ -71,7 +71,7 @@ This sample shows how to call CreateOrUpdate and parse the result.
TokenCredential credential = new DefaultAzureCredential();
Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new object());
using RequestContent content = RequestContent.Create(new object());
Response response = client.CreateOrUpdate("<sensorPartnerId>", "<deviceId>", content);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Expand All @@ -82,7 +82,7 @@ This sample shows how to call CreateOrUpdate with all parameters and request con
TokenCredential credential = new DefaultAzureCredential();
Devices client = new FarmBeatsClient(credential).GetDevicesClient(apiVersion: "2022-11-01-preview");

RequestContent content = RequestContent.Create(new
using RequestContent content = RequestContent.Create(new
{
deviceDataModelId = "<deviceDataModelId>",
integrationId = "<integrationId>",
Expand Down
Loading
Loading