Use string.IsNullOrEmpty and ArgumentException.ThrowIfNullOrEmpty in many more places...
authorStephen Toub <stoub@microsoft.com>
Tue, 9 May 2023 22:15:38 +0000 (18:15 -0400)
committerGitHub <noreply@github.com>
Tue, 9 May 2023 22:15:38 +0000 (18:15 -0400)
commitc0bb81807a3f4aeecfc63da31a32cc963ff0532c
tree02d967423e51d011a6416f249a81d0b7d68616be
parent7f356580ef111f3c6f2e6e47b05f8fdd97b78e4f
Use string.IsNullOrEmpty and ArgumentException.ThrowIfNullOrEmpty in many more places (#85858)
150 files changed:
src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/MaskedTextProvider.cs
src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/PropertyDescriptor.cs
src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/TypeDescriptor.cs
src/libraries/System.Data.Common/src/System/Data/Common/ObjectStorage.cs
src/libraries/System.Data.Common/src/System/Data/DataError.cs
src/libraries/System.Data.Common/src/System/Data/DataSet.cs
src/libraries/System.Data.Common/src/System/Data/SimpleType.cs
src/libraries/System.Data.Common/src/System/Data/XDRSchema.cs
src/libraries/System.Data.Common/src/System/Data/XMLSchema.cs
src/libraries/System.Data.Common/src/System/Data/xmlsaver.cs
src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/EventLog.cs
src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/ProviderMetadata.cs
src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounter.cs
src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterCategory.cs
src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/SharedPerformanceCounter.cs
src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreKey.cs
src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMUtils.cs
src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapConnection.cs
src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryEntry.cs
src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectorySearcher.cs
src/libraries/System.DirectoryServices/src/System/DirectoryServices/PropertyValueCollection.cs
src/libraries/System.Globalization/tests/CultureInfo/CultureInfoAll.cs
src/libraries/System.IO.Compression/src/Resources/Strings.resx
src/libraries/System.IO.Compression/src/System/IO/Compression/ZipArchive.cs
src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.Unix.cs
src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.Windows.cs
src/libraries/System.Management/src/System/Management/WMIGenerator.cs
src/libraries/System.Net.HttpListener/src/System/Net/HttpListenerResponse.cs
src/libraries/System.Net.HttpListener/src/System/Net/Managed/HttpListenerRequest.Managed.cs
src/libraries/System.Net.Mail/src/System/Net/Mail/Attachment.cs
src/libraries/System.Net.Mail/src/System/Net/Mail/SmtpClient.cs
src/libraries/System.Net.Mail/src/System/Net/Mime/ContentType.cs
src/libraries/System.Net.Primitives/src/System/Net/CookieContainer.cs
src/libraries/System.Net.Requests/src/Resources/Strings.resx
src/libraries/System.Net.Requests/src/System/Net/FileWebRequest.cs
src/libraries/System.Net.Requests/src/System/Net/FtpWebRequest.cs
src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs
src/libraries/System.Net.Requests/tests/FileWebRequestTest.cs
src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs
src/libraries/System.Private.CoreLib/src/System/DateOnly.cs
src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/TypeNameBuilder.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.cs
src/libraries/System.Private.CoreLib/src/System/TimeOnly.cs
src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ClassDataContract.cs
src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/CollectionDataContract.cs
src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs
src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/EnumDataContract.cs
src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonReaderDelegator.cs
src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/SchemaExporter.cs
src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/SchemaHelper.cs
src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XPathQueryGenerator.cs
src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlDataContract.cs
src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlObjectSerializerReadContext.cs
src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlReaderDelegator.cs
src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBinaryWriter.cs
src/libraries/System.Private.Xml.Linq/tests/SDMSample/SDMXName.cs
src/libraries/System.Private.Xml.Linq/tests/misc/RegressionTests.cs
src/libraries/System.Private.Xml.Linq/tests/misc/XNameAPI.cs
src/libraries/System.Private.Xml/src/System/Xml/Core/HtmlEncodedRawTextWriter.cs
src/libraries/System.Private.Xml/src/System/Xml/Core/HtmlRawTextWriterGenerator.ttinclude
src/libraries/System.Private.Xml/src/System/Xml/Core/HtmlUtf8RawTextWriter.cs
src/libraries/System.Private.Xml/src/System/Xml/Core/XmlCharCheckingWriter.cs
src/libraries/System.Private.Xml/src/System/Xml/Core/XmlCharCheckingWriterAsync.cs
src/libraries/System.Private.Xml/src/System/Xml/Core/XmlEncodedRawTextWriter.cs
src/libraries/System.Private.Xml/src/System/Xml/Core/XmlEncodedRawTextWriterAsync.cs
src/libraries/System.Private.Xml/src/System/Xml/Core/XmlRawTextWriterGenerator.ttinclude
src/libraries/System.Private.Xml/src/System/Xml/Core/XmlRawTextWriterGeneratorAsync.ttinclude
src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImpl.cs
src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextWriter.cs
src/libraries/System.Private.Xml/src/System/Xml/Core/XmlUtf8RawTextWriter.cs
src/libraries/System.Private.Xml/src/System/Xml/Core/XmlUtf8RawTextWriterAsync.cs
src/libraries/System.Private.Xml/src/System/Xml/Core/XmlValidatingReaderImpl.cs
src/libraries/System.Private.Xml/src/System/Xml/Core/XmlValidatingReaderImplAsync.cs
src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriter.cs
src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterAsync.cs
src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWriter.cs
src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWriterAsync.cs
src/libraries/System.Private.Xml/src/System/Xml/Core/XsdValidatingReader.cs
src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlNodeReader.cs
src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlProcessingInstruction.cs
src/libraries/System.Private.Xml/src/System/Xml/Schema/DataTypeImplementation.cs
src/libraries/System.Private.Xml/src/System/Xml/Schema/FacetChecker.cs
src/libraries/System.Private.Xml/src/System/Xml/Schema/Preprocessor.cs
src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaCollectionpreProcessor.cs
src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchema.cs
src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaAny.cs
src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaCollection.cs
src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaSet.cs
src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaValidator.cs
src/libraries/System.Private.Xml/src/System/Xml/Serialization/CodeIdentifier.cs
src/libraries/System.Private.Xml/src/System/Xml/Serialization/Mappings.cs
src/libraries/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationReader.cs
src/libraries/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationWriter.cs
src/libraries/System.Private.Xml/src/System/Xml/Serialization/SchemaObjectWriter.cs
src/libraries/System.Private.Xml/src/System/Xml/Serialization/SoapReflectionImporter.cs
src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlAttributes.cs
src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlReflectionImporter.cs
src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSchemaExporter.cs
src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSchemaImporter.cs
src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSchemas.cs
src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationReader.cs
src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationReaderILGen.cs
src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationWriter.cs
src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationWriterILGen.cs
src/libraries/System.Private.Xml/src/System/Xml/XmlConvert.cs
src/libraries/System.Private.Xml/src/System/Xml/XmlQualifiedName.cs
src/libraries/System.Private.Xml/src/System/Xml/XmlResolver.cs
src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/XmlILModule.cs
src/libraries/System.Private.Xml/src/System/Xml/Xsl/QIL/QilXmlWriter.cs
src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlAttributeCache.cs
src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlQueryOutput.cs
src/libraries/System.Private.Xml/src/System/Xml/Xsl/XPath/XPathCompileException.cs
src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/XsltLoader.cs
src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/BuilderInfo.cs
src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/Compiler.cs
src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/InputScopeManager.cs
src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/NumberAction.cs
src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/OutputScopeManager.cs
src/libraries/System.Private.Xml/tests/Writers/RwFactory/CXmlDriverEngine.cs
src/libraries/System.Private.Xml/tests/XmlConvert/VerifyNameTests3.cs
src/libraries/System.Private.Xml/tests/XmlSchema/XmlSchemaValidatorApi/ValidateMisc.cs
src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentList.cs
src/libraries/System.Private.Xml/tests/Xslt/XslTransformApi/CXslTArgumentList.cs
src/libraries/System.Reflection.Emit/src/Resources/Strings.resx
src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/AssemblyBuilderImpl.cs
src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/PseudoCustomAttributesData.cs
src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Assemblies/Ecma/EcmaAssembly.Modules.cs
src/libraries/System.Runtime.Serialization.Schema/src/System/Runtime/Serialization/Schema/CodeExporter.cs
src/libraries/System.Runtime.Serialization.Xml/tests/Canonicalization/CryptoCanonicalization/CanonicalEncoder.cs
src/libraries/System.Runtime.Serialization.Xml/tests/Canonicalization/CryptoCanonicalization/CanonicalWriter.cs
src/libraries/System.Runtime.Serialization.Xml/tests/SerializationTestTypes/DataContract.cs
src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/SignedXml.cs
src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/Utils.cs
src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/XmlDecryptionTransform.cs
src/libraries/System.Security.Cryptography/src/Resources/Strings.resx
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CryptoConfig.cs
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X500DistinguishedNameBuilder.cs
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509AuthorityInformationAccessExtension.cs
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Extension.cs
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Pal.Android.cs
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Pal.iOS.cs
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Pal.macOS.cs
src/libraries/System.Security.Cryptography/tests/CryptoConfigTests.cs
src/libraries/System.Security.Cryptography/tests/X509Certificates/ExtensionsTests/AuthorityInformationAccessTests.cs
src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/NTAccount.cs
src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/WindowsPrincipal.cs
src/libraries/System.ServiceProcess.ServiceController/src/System/ServiceProcess/ServiceController.cs
src/libraries/System.ServiceProcess.ServiceController/tests/SafeServiceControllerTests.cs
src/libraries/System.Speech/src/Result/RecognizedWordUnit.cs
src/libraries/System.Transactions.Local/src/System/Transactions/TransactionManager.cs