Options validation source generator (#87587)
authorTarek Mahmoud Sayed <tarekms@microsoft.com>
Tue, 20 Jun 2023 21:56:21 +0000 (14:56 -0700)
committerGitHub <noreply@github.com>
Tue, 20 Jun 2023 21:56:21 +0000 (14:56 -0700)
commitde6f07edd281a53669da2a7a19e74b564dcfe55e
treea2243f21c744650a58f6673827c3fda91c02989a
parent7f4334efd55f228f05cc404031afe2533d9a8440
Options validation source generator (#87587)
78 files changed:
docs/project/list-of-diagnostics.md
src/libraries/Common/src/System/ThrowHelper.cs
src/libraries/Microsoft.Extensions.Options/gen/DiagDescriptors.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/DiagDescriptorsBase.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/Emitter.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/EmitterBase.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/Generator.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/Microsoft.Extensions.Options.SourceGeneration.csproj [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/Model/ValidatedMember.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/Model/ValidatedModel.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/Model/ValidationAttributeInfo.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/Model/ValidatorType.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/Parser.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/ParserUtilities.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/Resources/Strings.resx [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/Resources/xlf/Strings.cs.xlf [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/Resources/xlf/Strings.de.xlf [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/Resources/xlf/Strings.es.xlf [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/Resources/xlf/Strings.fr.xlf [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/Resources/xlf/Strings.it.xlf [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/Resources/xlf/Strings.ja.xlf [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/Resources/xlf/Strings.ko.xlf [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/Resources/xlf/Strings.pl.xlf [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/Resources/xlf/Strings.pt-BR.xlf [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/Resources/xlf/Strings.ru.xlf [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/Resources/xlf/Strings.tr.xlf [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/Resources/xlf/Strings.zh-Hans.xlf [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/Resources/xlf/Strings.zh-Hant.xlf [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/SymbolHolder.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/SymbolLoader.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/gen/TypeDeclarationSyntaxReceiver.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/ref/Microsoft.Extensions.Options.cs
src/libraries/Microsoft.Extensions.Options/src/Microsoft.Extensions.Options.csproj
src/libraries/Microsoft.Extensions.Options/src/OptionsValidatorAttribute.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/src/ValidateEnumeratedItemsAttribute.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/src/ValidateObjectMembersAttribute.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Main.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Microsoft.Extensions.Options.SourceGeneration.Unit.Tests.csproj [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Resources/Strings.resx [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Baselines/NetCoreApp/Validators.g.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Baselines/NetFX/Validators.g.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/EmitterTests.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Extensions/EmptyReadOnlyList.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Extensions/EmptyReadonlyDictionary.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Extensions/TimeSpanAttribute.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Extensions/ValidationContextExtensions.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Generated/CustomAttrTests.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Generated/EnumerationTests.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Generated/FieldTests.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Generated/FunnyStringsTests.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Generated/GenericsTests.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Generated/MultiModelValidatorTests.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Generated/NestedTests.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Generated/NoNamespaceTests.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Generated/OptionsValidationTests.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Generated/RandomMembersTests.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Generated/RecordTypesTests.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Generated/RepeatedTypesTests.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Generated/SelfValidationTests.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Generated/Utils.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Generated/ValueTypesTests.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Microsoft.Extensions.Options.SourceGeneration.Tests.csproj [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Resources/Strings.resx [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/TestClasses/CustomAttr.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/TestClasses/Enumeration.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/TestClasses/Fields.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/TestClasses/FileScopedNamespace.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/TestClasses/FunnyStrings.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/TestClasses/Generics.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/TestClasses/Models.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/TestClasses/MultiModelValidator.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/TestClasses/Nested.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/TestClasses/NoNamespace.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/TestClasses/RandomMembers.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/TestClasses/RecordTypes.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/TestClasses/RepeatedTypes.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/TestClasses/SelfValidation.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/TestClasses/ValueTypes.cs [new file with mode: 0644]