Skip to content

Commit 52d7f46

Browse files
Remove unnecessary serialization override (Azure#49879)
1 parent d588700 commit 52d7f46

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

eng/packages/http-client-csharp/generator/Azure.Generator/src/AzureTypeFactory.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,6 @@ public class AzureTypeFactory : ScmTypeFactory
9393
return null;
9494
}
9595

96-
/// <inheritdoc/>
97-
protected override IReadOnlyList<TypeProvider> CreateSerializationsCore(InputType inputType, TypeProvider typeProvider)
98-
{
99-
if (KnownAzureTypes.IsModelTypeWithoutSerialization(typeProvider.Type))
100-
{
101-
return [];
102-
}
103-
104-
return base.CreateSerializationsCore(inputType, typeProvider);
105-
}
106-
10796
/// <inheritdoc/>
10897
#pragma warning disable AZC0014 // Avoid using banned types in public API
10998
public override ValueExpression DeserializeJsonValue(Type valueType, ScopedApi<JsonElement> element, SerializationFormat format)

eng/packages/http-client-csharp/generator/Azure.Generator/src/Primitives/KnownAzureTypes.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,6 @@ private static ValueExpression DeserializeResponseError(CSharpType valueType,
8282
[typeof(ResponseError)] = DeserializeResponseError,
8383
};
8484

85-
public static bool IsModelTypeWithoutSerialization(CSharpType type)
86-
{
87-
if (type.Equals(typeof(ResponseError)))
88-
{
89-
return true;
90-
}
91-
92-
return false;
93-
}
94-
9585
public static bool TryGetKnownType(string id, [MaybeNullWhen(false)] out CSharpType type) => _idToTypes.TryGetValue(id, out type);
9686

9787
public static bool TryGetJsonSerializationExpression(Type type, [MaybeNullWhen(false)] out SerializationExpression expression) => _typeToSerializationExpression.TryGetValue(type, out expression);

0 commit comments

Comments
 (0)