Skip to content

Commit

Permalink
Expose public APIs for Azure plugin to generate ResourceData (#5544)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
live1206 authored Jan 15, 2025
1 parent c661686 commit 1381733
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Licensed under the MIT License.

using System;
using System.ClientModel;
using System.ClientModel.Primitives;
using System.Collections.Generic;
using System.Diagnostics;
Expand All @@ -26,7 +25,7 @@ namespace Microsoft.Generator.CSharp.ClientModel.Providers
/// <summary>
/// This class provides the set of serialization models, methods, and interfaces for a given model.
/// </summary>
internal class MrwSerializationTypeDefinition : TypeProvider
public class MrwSerializationTypeDefinition : TypeProvider
{
private const string JsonModelWriteCoreMethodName = "JsonModelWriteCore";
private const string JsonModelCreateCoreMethodName = "JsonModelCreateCore";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ protected internal TypeFactory()
return modelProvider;
}

private ModelProvider? CreateModelCore(InputModelType model)
protected virtual ModelProvider? CreateModelCore(InputModelType model)
{
ModelProvider? type = new ModelProvider(model);
if (Visitors.Count == 0)
Expand Down

0 comments on commit 1381733

Please sign in to comment.