Skip to content

Commit 1381733

Browse files
authored
Expose public APIs for Azure plugin to generate ResourceData (#5544)
Expose more public APIs: - MrwSerializationtypeDefinition to manipulate serialization in sub-plugin - TypeFacotry.CreateModelCore to create ResourceData in Azure plugin The corresponding Azure plugin PR: Azure/azure-sdk-for-net#47730
1 parent c661686 commit 1381733

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packages/http-client-csharp/generator/Microsoft.Generator.CSharp.ClientModel/src/Providers/MrwSerializationTypeDefinition.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Licensed under the MIT License.
33

44
using System;
5-
using System.ClientModel;
65
using System.ClientModel.Primitives;
76
using System.Collections.Generic;
87
using System.Diagnostics;
@@ -26,7 +25,7 @@ namespace Microsoft.Generator.CSharp.ClientModel.Providers
2625
/// <summary>
2726
/// This class provides the set of serialization models, methods, and interfaces for a given model.
2827
/// </summary>
29-
internal class MrwSerializationTypeDefinition : TypeProvider
28+
public class MrwSerializationTypeDefinition : TypeProvider
3029
{
3130
private const string JsonModelWriteCoreMethodName = "JsonModelWriteCore";
3231
private const string JsonModelCreateCoreMethodName = "JsonModelCreateCore";

packages/http-client-csharp/generator/Microsoft.Generator.CSharp/src/TypeFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ protected internal TypeFactory()
151151
return modelProvider;
152152
}
153153

154-
private ModelProvider? CreateModelCore(InputModelType model)
154+
protected virtual ModelProvider? CreateModelCore(InputModelType model)
155155
{
156156
ModelProvider? type = new ModelProvider(model);
157157
if (Visitors.Count == 0)

0 commit comments

Comments
 (0)