Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 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 @@ -253,7 +253,7 @@
</ItemGroup>

<ItemGroup Condition="'$(IsGeneratorLibrary)' == 'true'">
<PackageReference Update="Microsoft.Generator.CSharp.ClientModel" Version="1.0.0-alpha.20241113.8" />
<PackageReference Update="Microsoft.Generator.CSharp.ClientModel" Version="1.0.0-alpha.20241121.2" />
</ItemGroup>

<!--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@

<!-- Include shared code from Azure.Core -->
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\..\sdk\core\Azure.Core\src\Shared\AzureKeyCredentialPolicy.cs" LinkBase="Shared/Core" />
<Compile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\..\sdk\core\Azure.Core\src\Shared\AzureKeyCredentialPolicy.cs" LinkBase="Shared/Core">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\..\sdk\core\Azure.Core\src\Shared\RawRequestUriBuilder.cs" LinkBase="Shared/Core">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
using Microsoft.Generator.CSharp;
using Microsoft.Generator.CSharp.ClientModel;
using System;
using System.ClientModel;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.IO;
using System.Reflection;

namespace Azure.Generator;

Expand Down Expand Up @@ -46,6 +46,8 @@ public override void Configure()
{
base.Configure();
AddMetadataReference(MetadataReference.CreateFromFile(typeof(Response).Assembly.Location));
var sharedSourceDirectory = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!, "Shared/Core");
AddSharedSourceDirectory(sharedSourceDirectory);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using Azure.Core;
using Azure.Generator.Primitives;
using Azure.Generator.Providers;
using Azure.Generator.Providers.Abstraction;
Expand All @@ -18,9 +17,6 @@ public class AzureTypeFactory : ScmTypeFactory
/// <inheritdoc/>
public override CSharpType KeyCredentialType => typeof(AzureKeyCredential);

/// <inheritdoc/>
public override CSharpType ClientUriBuilderBaseType => typeof(RequestUriBuilder);

/// <inheritdoc/>
public override IClientResponseApi ClientResponseApi => AzureClientResponseProvider.Instance;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public HttpRequestProvider(ValueExpression original) : base(typeof(Request), ori
{
}

public override Type UriBuilderType => typeof(RawRequestUriBuilder);

public override ValueExpression Content()
=> Original.Property(nameof(Request.Content));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
<!-- Include shared code from Azure.Core -->
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\..\..\..\sdk\core\Azure.Core\src\Shared\AzureKeyCredentialPolicy.cs" LinkBase="Shared/Core" />
<Compile Include="$(MSBuildThisFileDirectory)..\..\..\..\..\..\..\..\sdk\core\Azure.Core\src\Shared\RawRequestUriBuilder.cs" LinkBase="Shared/Core" />
</ItemGroup>
</Project>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading