-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[http-client-csharp] Fix: remove setters for props in readonly structs (
#4809) Removes the invalid setters from auto-implemented properties in read-only structs. fixes: #4351
- Loading branch information
1 parent
1a27660
commit b33fe85
Showing
5 changed files
with
58 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...p-client-csharp/generator/Microsoft.Generator.CSharp/test/TestHelpers/TestTypeProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,25 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using Microsoft.Generator.CSharp.Primitives; | ||
using Microsoft.Generator.CSharp.Providers; | ||
|
||
namespace Microsoft.Generator.CSharp.Tests | ||
{ | ||
internal class TestTypeProvider : TypeProvider | ||
{ | ||
private readonly TypeSignatureModifiers? _declarationModifiers; | ||
protected override string BuildRelativeFilePath() => $"{Name}.cs"; | ||
|
||
protected override string BuildName() => "TestName"; | ||
|
||
public static readonly TypeProvider Empty = new TestTypeProvider(); | ||
|
||
internal TestTypeProvider(TypeSignatureModifiers? declarationModifiers = null) | ||
{ | ||
_declarationModifiers = declarationModifiers; | ||
} | ||
|
||
protected override TypeSignatureModifiers GetDeclarationModifiers() => _declarationModifiers ?? base.GetDeclarationModifiers(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters