609 instantiations of InvalidDataException
aspire (7)
Acquisition\InstallSidecarWriter.cs (3)
63throw new InvalidDataException( 88throw new InvalidDataException( 97throw new InvalidDataException("Install sidecar root must be a JSON object.");
Agents\AspireSkills\AspireSkillsBundleProvider.cs (3)
519throw new InvalidDataException(string.Format(CultureInfo.InvariantCulture, "Aspire skills archive entry '{0}' has unsupported type '{1}'.", entry.Name, entry.EntryType)); 562throw new InvalidDataException(string.Format(CultureInfo.InvariantCulture, "Aspire skills archive entry '{0}' is not safe.", entryName)); 569throw new InvalidDataException(string.Format(CultureInfo.InvariantCulture, "Aspire skills archive entry '{0}' escapes the extraction directory.", entryName));
Agents\AspireSkills\AspireSkillsInstaller.cs (1)
222throw new InvalidDataException(string.Format(
Aspire.Dashboard (1)
ServiceClient\DashboardRunStore.cs (1)
288throw new InvalidDataException($"Dashboard run metadata for '{run.RunId}' is invalid.");
Aspire.Hosting (13)
Dcp\ContainerCreator.cs (1)
447throw new InvalidDataException($"Host endpoint '{endpoint.Name}' on resource '{re.Resource.Name}' should have an associated DCP Service resource already set up");
Dcp\DcpModelUtilities.cs (5)
181throw new InvalidDataException($"Service {svc.Metadata.Name} should have valid address at this point"); 201throw new InvalidDataException($"Service {svc.Metadata.Name} should have valid address at this point"); 300throw new InvalidDataException($"Service '{ts.Service!.Metadata.Name}' refers to endpoint '{ts.EndpointName}' that does not exist"); 306throw new InvalidDataException($"Container tunnel service {ts.Service?.Metadata.Name} should have valid address at this point"); 316throw new InvalidDataException($"The '{endpoint.Name}' on resource '{ts.ResourceName}' should have an associated DCP Service resource already set up");
Pipelines\Internal\DeploymentStateManagerBase.cs (1)
138throw new InvalidDataException("Deployment state must contain a JSON object.");
Pipelines\Internal\FileDeploymentStateManager.cs (5)
753_ => throw new InvalidDataException($"'{LegacyStateProperty}' must be a JSON object.") 759_ => throw new InvalidDataException($"'{ClaimedSectionsProperty}' must be a JSON string.") 765?? throw new InvalidDataException($"'{CurrentStateProperty}' must contain a JSON object."), 766_ => throw new InvalidDataException($"'{CurrentStateProperty}' must be a JSON string.") 779throw new InvalidDataException(
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
72throw new InvalidDataException(message, ex);
Aspire.Hosting.Azure.Functions (1)
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
72throw new InvalidDataException(message, ex);
Aspire.Hosting.Dotnet (1)
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
72throw new InvalidDataException(message, ex);
Aspire.Hosting.Testing (1)
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
72throw new InvalidDataException(message, ex);
dotnet-aot (5)
parent\dotnet\Commands\Test\MTP\IPC\HttpTestHostGateway.cs (3)
293throw new InvalidDataException("The dotnet test HTTP request is too large."); 308throw new InvalidDataException("The dotnet test HTTP request is too large."); 316throw new InvalidDataException("The dotnet test HTTP request ended before its declared content length.");
parent\dotnet\Commands\Test\MTP\IPC\ProtocolMessageSerializer.cs (2)
16throw new InvalidDataException("The dotnet test protocol frame is shorter than its header."); 22throw new InvalidDataException("The dotnet test protocol frame length is invalid.");
dotnet-sourcelink (3)
dotnet-svcutil-lib (21)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BinaryMessageEncoder.cs (4)
441throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataException(SRServiceModel.BinaryEncoderSessionInvalid)); 457throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataException(SRServiceModel.BinaryEncoderSessionMalformed)); 463throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataException(SRServiceModel.BinaryEncoderSessionMalformed)); 494throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataException(SRServiceModel.BinaryEncoderSessionMalformed));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\FramingDecoders.cs (17)
68throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataException(SRServiceModel.FramingSizeTooLarge)); 166throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataException(SRServiceModel.InvalidDecoderStateMachine)); 216Exception result = new InvalidDataException(string.Format(SRServiceModel.FramingViaTooLong, size)); 230throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataException(string.Format(SRServiceModel.FramingViaNotUri, value), exception)); 256return new InvalidDataException(string.Format(SRServiceModel.FramingFaultTooLong, size)); 328Exception result = new InvalidDataException(string.Format(SRServiceModel.FramingContentTypeTooLong, size)); 393Exception exception = CreateException(new InvalidDataException(string.Format( 429return new InvalidDataException(string.Format(SRServiceModel.FramingRecordTypeMismatch, expectedType.ToString(), foundType.ToString())); 436Exception exception = CreateException(new InvalidDataException(string.Format( 444return CreateException(new InvalidDataException(SRServiceModel.FramingPrematureEOF)); 557CreateException(new InvalidDataException(SRServiceModel.FramingAtEnd))); 561CreateException(new InvalidDataException(SRServiceModel.InvalidDecoderStateMachine))); 784CreateException(new InvalidDataException(SRServiceModel.FramingAtEnd))); 787CreateException(new InvalidDataException(SRServiceModel.InvalidDecoderStateMachine))); 889CreateException(new InvalidDataException(SRServiceModel.FramingAtEnd))); 907CreateException(new InvalidDataException(SRServiceModel.FramingAtEnd))); 910CreateException(new InvalidDataException(SRServiceModel.InvalidDecoderStateMachine)));
GenerateAnalyzerNuspec (1)
Program.cs (1)
261throw new InvalidDataException($"Encountered a file with unexpected extension: {globalconfig}");
GenerateDocumentationAndConfigFiles (1)
src\roslyn\src\Compilers\Core\Portable\EncodedStringText.cs (1)
131throw new InvalidDataException(e.Message);
ILCompiler.Compiler (4)
parent\parent\Common\Compiler\ObjectWriter\Dwarf\DwarfHelper.cs (1)
146throw new InvalidDataException("Unexpected end of stream while reading a ULEB128 value.");
parent\parent\Common\Microsoft\SourceLink\Tools\SourceLinkMap.cs (3)
68throw new InvalidDataException(); 81throw new InvalidDataException(); 89throw new InvalidDataException();
ILCompiler.ReadyToRun (9)
IBC\MIbcProfileParser.cs (1)
116throw new InvalidDataException("Could not find input assembly in compressed MIBC file (expected archive to contain a single .dll file)");
parent\parent\Common\Compiler\ObjectWriter\Dwarf\DwarfHelper.cs (1)
146throw new InvalidDataException("Unexpected end of stream while reading a ULEB128 value.");
parent\parent\Common\Compiler\ObjectWriter\WebCilObjectWriter.cs (7)
338throw new InvalidDataException( 347throw new InvalidDataException( 359throw new InvalidDataException("Wasm async resume info fixups are not ordered by location."); 370throw new InvalidDataException("Wasm async resume info fixup chunks must not be empty."); 656throw new InvalidDataException(); 895throw new InvalidDataException($"WASM_MEMORY_ADDR_REL_SLEB: symbol '{reloc.SymbolName}' (sectionIndex {definedSymbol.SectionIndex}, section type {_sections[definedSymbol.SectionIndex]?.GetType().Name}) is not in a WebcilSection. Reloc in section {sectionIndex} ({_sections[sectionIndex]?.GetType().Name}), offset {reloc.Offset:X}."); 919throw new InvalidDataException($"WASM_MEMORY_ADDR_REL_LEB: symbol '{reloc.SymbolName}' (sectionIndex {definedSymbol.SectionIndex}, section type {_sections[definedSymbol.SectionIndex]?.GetType().Name}) is not in a WebcilSection. Reloc in section {sectionIndex} ({_sections[sectionIndex]?.GetType().Name}), offset {reloc.Offset:X}.");
ILCompiler.RyuJit (1)
parent\ILCompiler.ReadyToRun\IBC\MIbcProfileParser.cs (1)
116throw new InvalidDataException("Could not find input assembly in compressed MIBC file (expected archive to contain a single .dll file)");
Microsoft.Analyzers.Extra.Tests (1)
Resources\RoslynTestUtils.cs (1)
130throw new InvalidDataException($"Missing end marker for span {index}");
Microsoft.Analyzers.Local.Tests (1)
Resources\RoslynTestUtils.cs (1)
130throw new InvalidDataException($"Missing end marker for span {index}");
Microsoft.Arcade.Common (2)
NupkgInfoFactory.cs (2)
43throw new InvalidDataException(string.Format(CultureInfo.CurrentCulture, "Did not extract nuspec file from package: {0}", path)); 47throw new InvalidDataException(string.Format(CultureInfo.CurrentCulture, "Invalid package: {0}", path), ex);
Microsoft.AspNetCore.Components.Server (13)
BlazorPack\BlazorPackHubProtocolWorker.cs (1)
65throw new InvalidDataException($"Deserializing object of the `{type.Name}` type for '{field}' failed.", ex);
src\aspnetcore\src\SignalR\common\Protocols.MessagePack\src\Protocol\MessagePackHubProtocolWorker.cs (12)
207throw new InvalidDataException("Invalid invocation result kind."); 302throw new InvalidDataException( 318throw new InvalidDataException("Error binding arguments. Make sure that the types of the provided values match the types of the hub method being invoked.", ex); 419throw new InvalidDataException($"Unexpected message type: {message.GetType().Name}"); 623throw new InvalidDataException($"Reading '{field}' as Boolean failed.", ex); 635throw new InvalidDataException($"Reading '{field}' as Int32 failed.", ex); 647throw new InvalidDataException($"Reading '{field}' as Int64 failed.", ex); 667throw new InvalidDataException($"Reading '{field}' as String failed.", ex); 679throw new InvalidDataException($"Reading '{field}' as String failed.", ex); 691throw new InvalidDataException($"Reading map length for '{field}' failed.", ex); 703throw new InvalidDataException($"Reading array length for '{field}' failed.", ex); 711throw new InvalidDataException($"Null or empty {message}.");
Microsoft.AspNetCore.Http (4)
Features\FormFeature.cs (4)
241throw new InvalidDataException($"Form value count limit {_options.ValueCountLimit} exceeded."); 246throw new InvalidDataException("Form section has invalid Content-Disposition value: " + section.ContentDisposition); 387throw new InvalidDataException("Missing content-type boundary."); 391throw new InvalidDataException($"Multipart boundary length limit {lengthLimit} exceeded.");
Microsoft.AspNetCore.Http.Connections.Client (1)
HttpConnection.cs (1)
831throw new System.IO.InvalidDataException("Invalid refresh response JSON: expected an object.");
Microsoft.AspNetCore.Http.Connections.Common (17)
NegotiateProtocol.cs (10)
241throw new InvalidDataException($"Unexpected token '{reader.TokenType}' when reading negotiation response JSON."); 250throw new InvalidDataException($"Missing required property '{ConnectionIdPropertyName}'."); 257throw new InvalidDataException($"Missing required property '{ConnectionTokenPropertyName}'."); 263throw new InvalidDataException($"Missing required property '{AvailableTransportsPropertyName}'."); 282throw new InvalidDataException("Invalid negotiation response received.", ex); 318throw new InvalidDataException($"Unexpected token '{reader.TokenType}' when reading transfer formats JSON."); 330throw new InvalidDataException($"Missing required property '{TransportPropertyName}'."); 335throw new InvalidDataException($"Missing required property '{TransferFormatsPropertyName}'."); 340throw new InvalidDataException($"Unexpected token '{reader.TokenType}' when reading available transport JSON."); 344throw new InvalidDataException("Unexpected end when reading JSON.");
src\aspnetcore\src\SignalR\common\Shared\SystemTextJsonExtensions.cs (7)
15throw new InvalidDataException("Unexpected end when reading JSON."); 25throw new InvalidDataException($"Unexpected JSON Token Type '{reader.GetTokenString()}'. Expected a JSON Object."); 56throw new InvalidDataException($"Unexpected JSON Token Type '{reader.GetTokenString()}'. Expected a JSON Array."); 68_ => throw new InvalidDataException($"Expected '{propertyName}' to be true or false."), 78throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.String}."); 95throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.Number}."); 112throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.Number}.");
Microsoft.AspNetCore.InternalTesting (1)
HttpClientSlim.cs (1)
140throw new InvalidDataException($"No StatusCode found in '{response}'");
Microsoft.AspNetCore.SignalR.Client.Core (1)
HubConnection.cs (1)
1998throw new InvalidDataException("Connection terminated while reading a message.");
Microsoft.AspNetCore.SignalR.Common (12)
Protocol\HandshakeProtocol.cs (5)
139throw new InvalidDataException("Expected a handshake response from the server."); 156throw new InvalidDataException($"Unexpected token '{reader.TokenType}' when reading handshake response JSON."); 209throw new InvalidDataException($"Unexpected token '{reader.TokenType}' when reading handshake request JSON. Message content: {GetPayloadAsString()}"); 215throw new InvalidDataException($"Missing required property '{ProtocolPropertyName}'. Message content: {GetPayloadAsString()}"); 219throw new InvalidDataException($"Missing required property '{ProtocolVersionPropertyName}'. Message content: {GetPayloadAsString()}");
src\aspnetcore\src\SignalR\common\Shared\SystemTextJsonExtensions.cs (7)
15throw new InvalidDataException("Unexpected end when reading JSON."); 25throw new InvalidDataException($"Unexpected JSON Token Type '{reader.GetTokenString()}'. Expected a JSON Object."); 56throw new InvalidDataException($"Unexpected JSON Token Type '{reader.GetTokenString()}'. Expected a JSON Array."); 68_ => throw new InvalidDataException($"Expected '{propertyName}' to be true or false."), 78throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.String}."); 95throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.Number}."); 112throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.Number}.");
Microsoft.AspNetCore.SignalR.Core (2)
HubConnectionHandler.cs (2)
547throw new InvalidDataException($"The maximum message size of {maxMessageSize}B was exceeded. The message size can be configured in AddHubOptions."); 570throw new InvalidDataException("Connection terminated while reading a message.");
Microsoft.AspNetCore.SignalR.Protocols.Json (35)
Protocol\JsonHubProtocol.cs (28)
164throw new InvalidDataException($"Expected '{TypePropertyName}' to be of type {JsonTokenType.Number}."); 177throw new InvalidDataException( 186newStreamIds.Add(reader.GetString() ?? throw new InvalidDataException($"Null value for '{StreamIdsPropertyName}' is not valid.")); 199throw new InvalidDataException($"Expected '{TargetPropertyName}' to be of type {JsonTokenType.String}."); 293throw new InvalidDataException($"Expected '{ArgumentsPropertyName}' to be of type {SystemTextJsonExtensions.GetTokenString(JsonTokenType.StartArray)}."); 356throw new InvalidDataException($"Missing required property '{TargetPropertyName}'."); 382throw new InvalidDataException($"Missing required property '{TargetPropertyName}'."); 407throw new InvalidDataException($"Missing required property '{InvocationIdPropertyName}'."); 429throw new InvalidDataException($"Missing required property '{InvocationIdPropertyName}'."); 467throw new InvalidDataException($"Missing required property '{TypePropertyName}'."); 477throw new InvalidDataException("Error reading JSON.", jrex); 487throw new InvalidDataException($"Expected '{HeadersPropertyName}' to be of type {JsonTokenType.StartObject}."); 501throw new InvalidDataException($"Expected header '{propertyName}' to be of type {JsonTokenType.String}."); 513throw new InvalidDataException("Unexpected end when reading message headers"); 732throw new InvalidDataException($"Missing required property '{InvocationIdPropertyName}'."); 742throw new InvalidDataException($"Missing required property '{InvocationIdPropertyName}'."); 747throw new InvalidDataException("The 'error' and 'result' properties are mutually exclusive."); 762throw new InvalidDataException($"Missing required property '{InvocationIdPropertyName}'."); 767throw new InvalidDataException($"Missing required property '{ItemPropertyName}'."); 778throw new InvalidDataException($"Missing required property '{InvocationIdPropertyName}'."); 783throw new InvalidDataException($"Missing required property '{ArgumentsPropertyName}'."); 788throw new InvalidDataException($"Missing required property '{TargetPropertyName}'."); 801throw new InvalidDataException($"Missing required property '{TargetPropertyName}'."); 806throw new InvalidDataException($"Missing required property '{ArgumentsPropertyName}'."); 853throw new InvalidDataException("Error binding arguments. Make sure that the types of the provided values match the types of the hub method being invoked.", ex); 867throw new InvalidDataException($"Invocation provides {paramIndex} argument(s) but target expects {paramCount}."); 888throw new InvalidDataException("Missing required property 'sequenceId'."); 898throw new InvalidDataException("Missing required property 'sequenceId'.");
src\aspnetcore\src\SignalR\common\Shared\SystemTextJsonExtensions.cs (7)
15throw new InvalidDataException("Unexpected end when reading JSON."); 25throw new InvalidDataException($"Unexpected JSON Token Type '{reader.GetTokenString()}'. Expected a JSON Object."); 56throw new InvalidDataException($"Unexpected JSON Token Type '{reader.GetTokenString()}'. Expected a JSON Array."); 68_ => throw new InvalidDataException($"Expected '{propertyName}' to be true or false."), 78throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.String}."); 95throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.Number}."); 112throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.Number}.");
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (13)
Protocol\DefaultMessagePackHubProtocolWorker.cs (1)
27throw new InvalidDataException($"Deserializing object of the `{type.Name}` type for '{field}' failed.", ex);
Protocol\MessagePackHubProtocolWorker.cs (12)
207throw new InvalidDataException("Invalid invocation result kind."); 302throw new InvalidDataException( 318throw new InvalidDataException("Error binding arguments. Make sure that the types of the provided values match the types of the hub method being invoked.", ex); 419throw new InvalidDataException($"Unexpected message type: {message.GetType().Name}"); 623throw new InvalidDataException($"Reading '{field}' as Boolean failed.", ex); 635throw new InvalidDataException($"Reading '{field}' as Int32 failed.", ex); 647throw new InvalidDataException($"Reading '{field}' as Int64 failed.", ex); 667throw new InvalidDataException($"Reading '{field}' as String failed.", ex); 679throw new InvalidDataException($"Reading '{field}' as String failed.", ex); 691throw new InvalidDataException($"Reading map length for '{field}' failed.", ex); 703throw new InvalidDataException($"Reading array length for '{field}' failed.", ex); 711throw new InvalidDataException($"Null or empty {message}.");
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (39)
Protocol\NewtonsoftJsonHubProtocol.cs (29)
165throw new InvalidDataException($"Missing required property '{TypePropertyName}'."); 178throw new InvalidDataException($"Expected '{StreamIdsPropertyName}' to be of type {JTokenType.Array}."); 186newStreamIds.Add(reader.Value?.ToString() ?? throw new InvalidDataException($"Null value for '{StreamIdsPropertyName}' is not valid.")); 280throw new InvalidDataException($"Expected '{ArgumentsPropertyName}' to be of type {JTokenType.Array}."); 319throw new InvalidDataException($"Missing required property '{SequenceIdPropertyName}'."); 346throw new InvalidDataException($"Missing required property '{TargetPropertyName}'."); 372throw new InvalidDataException($"Missing required property '{TargetPropertyName}'."); 397throw new InvalidDataException($"Missing required property '{InvocationIdPropertyName}'."); 419throw new InvalidDataException($"Missing required property '{InvocationIdPropertyName}'."); 464throw new InvalidDataException($"Missing required property '{TypePropertyName}'."); 474throw new InvalidDataException("Error reading JSON.", jrex); 484throw new InvalidDataException($"Expected '{HeadersPropertyName}' to be of type {JTokenType.Object}."); 498throw new InvalidDataException($"Expected header '{propertyName}' to be of type {JTokenType.String}."); 725throw new InvalidDataException($"Missing required property '{InvocationIdPropertyName}'."); 735throw new InvalidDataException($"Missing required property '{InvocationIdPropertyName}'."); 740throw new InvalidDataException("The 'error' and 'result' properties are mutually exclusive."); 755throw new InvalidDataException($"Missing required property '{InvocationIdPropertyName}'."); 760throw new InvalidDataException($"Missing required property '{ItemPropertyName}'."); 770throw new InvalidDataException($"Missing required property '{InvocationIdPropertyName}'."); 775throw new InvalidDataException($"Missing required property '{ArgumentsPropertyName}'."); 780throw new InvalidDataException($"Missing required property '{TargetPropertyName}'."); 792throw new InvalidDataException($"Missing required property '{TargetPropertyName}'."); 797throw new InvalidDataException($"Missing required property '{ArgumentsPropertyName}'."); 830throw new InvalidDataException($"Invocation provides {argumentsCount} argument(s) but target expects {paramCount}."); 857throw new InvalidDataException("Error binding arguments. Make sure that the types of the provided values match the types of the hub method being invoked.", ex); 879throw new InvalidDataException($"Missing required property '{SequenceIdPropertyName}'."); 889throw new InvalidDataException($"Missing required property '{SequenceIdPropertyName}'."); 901throw new InvalidDataException($"Invocation provides {argCount} argument(s) but target expects {paramCount}."); 923throw new InvalidDataException("Error binding arguments. Make sure that the types of the provided values match the types of the hub method being invoked.", ex);
src\aspnetcore\src\SignalR\common\Shared\JsonUtils.cs (10)
44throw new InvalidDataException($"Unexpected JSON Token Type '{token?.Type}'. Expected a JSON Object."); 56throw new InvalidDataException($"Missing required property '{property}'."); 66throw new InvalidDataException($"Expected '{property}' to be of type {expectedType}."); 93throw new InvalidDataException($"Unexpected JSON Token Type '{GetTokenString(reader.TokenType)}'. Expected a JSON Object."); 101throw new InvalidDataException($"Unexpected JSON Token Type '{GetTokenString(reader.TokenType)}'. Expected a JSON Array."); 111throw new InvalidDataException($"Expected '{propertyName}' to be of type {JTokenType.Boolean}."); 123throw new InvalidDataException($"Expected '{propertyName}' to be of type {JTokenType.Integer}."); 140throw new InvalidDataException($"Expected '{propertyName}' to be of type {JTokenType.Integer}."); 157throw new InvalidDataException($"Expected '{propertyName}' to be of type {JTokenType.String}."); 167throw new InvalidDataException("Unexpected end when reading JSON.");
Microsoft.AspNetCore.SignalR.StackExchangeRedis (8)
Internal\RedisProtocol.cs (1)
281throw new InvalidDataException($"Insufficient items in {messageType} array.");
src\aspnetcore\src\SignalR\common\Shared\SystemTextJsonExtensions.cs (7)
15throw new InvalidDataException("Unexpected end when reading JSON."); 25throw new InvalidDataException($"Unexpected JSON Token Type '{reader.GetTokenString()}'. Expected a JSON Object."); 56throw new InvalidDataException($"Unexpected JSON Token Type '{reader.GetTokenString()}'. Expected a JSON Array."); 68_ => throw new InvalidDataException($"Expected '{propertyName}' to be true or false."), 78throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.String}."); 95throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.Number}."); 112throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.Number}.");
Microsoft.AspNetCore.WebUtilities (14)
BufferedReadStream.cs (1)
413throw new InvalidDataException($"Line length limit {lengthLimit} exceeded.");
FormPipeReader.cs (5)
318throw new InvalidDataException( 328throw new InvalidDataException( 337throw new InvalidDataException( 382throw new InvalidDataException($"Form value count limit {ValueCountLimit} exceeded."); 409throw new InvalidDataException("The form value contains invalid characters.", ex);
FormReader.cs (2)
247throw new InvalidDataException($"Form key or value length limit {limit} exceeded."); 323throw new InvalidDataException($"Form value count limit {ValueCountLimit} exceeded.");
MultipartReader.cs (3)
115throw new InvalidDataException($"Multipart headers length limit {HeadersLengthLimit} exceeded."); 121throw new InvalidDataException($"Invalid header line: {line}"); 129throw new InvalidDataException($"Multipart headers count limit {HeadersCountLimit} exceeded.");
MultipartReaderStream.cs (2)
155throw new InvalidDataException($"Multipart header length limit {lengthLimit} exceeded. Too much data before the first boundary."); 159throw new InvalidDataException($"Multipart body length limit {lengthLimit} exceeded.");
StreamHelperExtensions.cs (1)
69throw new InvalidDataException($"The stream exceeded the data limit {limit.GetValueOrDefault()}.");
Microsoft.Build (7)
BackEnd\Components\Scheduler\SchedulingPlan.cs (2)
376throw new InvalidDataException("Too few values in hierarchy"); 406throw new InvalidDataException("Too few values in build plan.");
Logging\BinaryLogger\BuildEventArgsReader.cs (4)
294throw new InvalidDataException(msgFactory(), innerException); 448error => throw new InvalidDataException(error)); 511throw new InvalidDataException( 1781throw new InvalidDataException(
Logging\BinaryLogger\Postprocessing\StreamExtensions.cs (1)
49throw new InvalidDataException("Unexpected end of stream.");
Microsoft.Build.Tasks.Git (34)
GitDataReader\GitConfig.cs (2)
47_ => throw new InvalidDataException(), 54_ => throw new InvalidDataException(),
GitDataReader\GitConfig.Reader.cs (3)
45=> throw new InvalidDataException(string.Format(Resources.ErrorParsingConfigLineInFile, _lineNumber, path, 202throw new InvalidDataException(string.Format(Resources.ConfigurationFileRecursionExceededMaximumAllowedDepth, MaxIncludeDepth)); 292throw new InvalidDataException(string.Format(Resources.ValueOfIsNotValidPath, key.ToString(), relativePath));
GitDataReader\GitReferenceResolver.cs (5)
103throw new InvalidDataException($"Expected header not found at the beginning of file '{path}'."); 115Exception invalidData() => new InvalidDataException($"Invalid packed references specification in '{path}': '{line}'"); 222throw new InvalidDataException(); 272throw new InvalidDataException(string.Format(Resources.InvalidReference, value)); 289throw new InvalidDataException(string.Format(Resources.RecursionDetectedWhileResolvingReference, referenceName));
GitDataReader\GitRefTableReader.cs (19)
66throw new InvalidDataException(); 94throw new InvalidDataException(); 97return isFirstBlock ? throw new InvalidDataException() : null; 142throw new InvalidDataException(); 148throw new InvalidDataException(); 171_ => throw new InvalidDataException(), 194throw new InvalidDataException(); 220throw new InvalidDataException(); 316_ => throw new InvalidDataException(), 401throw new InvalidDataException(); 412throw new InvalidDataException(); 426throw new InvalidDataException(); 437throw new InvalidDataException(); 443throw new InvalidDataException(); 448throw new InvalidDataException(); 478throw new InvalidDataException(); 487throw new InvalidDataException(); 533throw new InvalidDataException(); 555throw new InvalidDataException();
GitDataReader\GitRefTableReader.Primitives.cs (2)
52throw new InvalidDataException(); 123throw new InvalidDataException();
GitDataReader\GitRepository.cs (3)
143throw new InvalidDataException(string.Format(Resources.ValueOfIsNotValidPath, "core.worktree", value)); 441throw new InvalidDataException(string.Format(Resources.FormatOfFileIsInvalid, path)); 453throw new InvalidDataException(string.Format(Resources.PathSpecifiedInFileIsInvalid, path, link));
Microsoft.CodeAnalysis (5)
Emit\EditAndContinueMethodDebugInformation.cs (1)
83throw new InvalidDataException(string.Format(CodeAnalysisResources.InvalidDataAtOffset,
EncodedStringText.cs (1)
131throw new InvalidDataException(e.Message);
Text\LargeText.cs (1)
137throw new InvalidDataException();
Text\SourceText.cs (2)
233throw new InvalidDataException(); 292throw new InvalidDataException();
Microsoft.CodeAnalysis.Analyzers (1)
src\roslyn\src\Compilers\Core\Portable\EncodedStringText.cs (1)
131throw new InvalidDataException(e.Message);
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\roslyn\src\Compilers\Core\Portable\EncodedStringText.cs (1)
131throw new InvalidDataException(e.Message);
Microsoft.CodeAnalysis.CodeStyle (1)
src\roslyn\src\Compilers\Core\Portable\EncodedStringText.cs (1)
131throw new InvalidDataException(e.Message);
Microsoft.CodeAnalysis.Features (5)
EditAndContinue\EditAndContinueDebugInfoReader.cs (2)
85throw new InvalidDataException(e.Message, e); 107throw new InvalidDataException(e.Message, e);
PdbSourceDocument\SourceLinkMap.cs (3)
75throw new InvalidDataException(); 88throw new InvalidDataException(); 96throw new InvalidDataException();
Microsoft.CodeAnalysis.Rebuild (5)
CompilationFactory.cs (1)
40var language => throw new InvalidDataException($"{assemblyFileName} has unsupported language {language}")
CompilationOptionsReader.cs (3)
235throw new InvalidDataException(); 396throw new InvalidDataException(string.Format(RebuildResources.Unexpected_value_for_EmbedInteropTypes_MetadataImageKind_0, embedInteropTypesAndKind)); 480throw new InvalidDataException(RebuildResources.Encountered_null_or_empty_key_for_compilation_options_pairs);
Extensions.cs (1)
20throw new InvalidDataException(string.Format(RebuildResources.Encountered_unexpected_byte_0_when_expecting_a_null_terminator, b));
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\roslyn\src\Compilers\Core\Portable\EncodedStringText.cs (1)
131throw new InvalidDataException(e.Message);
Microsoft.CodeAnalysis.Workspaces (2)
src\roslyn\src\Compilers\Core\Portable\EncodedStringText.cs (1)
131throw new InvalidDataException(e.Message);
Workspace\Solution\FileTextLoader.cs (1)
253throw new InvalidDataException(message);
Microsoft.Deployment.DotNet.Releases (1)
ReleaseFile.cs (1)
127throw new InvalidDataException(string.Format(ReleasesResources.HashMismatch, Hash, actualHash, destinationPath));
Microsoft.Diagnostics.DataContractReader.Contracts (1)
parent\parent\parent\parent\coreclr\tools\Common\Compiler\ObjectWriter\Dwarf\DwarfHelper.cs (1)
146throw new InvalidDataException("Unexpected end of stream while reading a ULEB128 value.");
Microsoft.DiaSymReader (3)
Extensions\SymUnmanagedExtensions.Document.cs (3)
108throw new InvalidDataException(); 115throw new InvalidDataException(); 144throw new InvalidDataException();
Microsoft.DotNet.Build.Tasks.Installers (8)
src\ArReader.cs (2)
28throw new InvalidDataException("Invalid archive magic"); 69throw new InvalidDataException("Invalid archive magic");
src\CpioReader.cs (1)
30throw new InvalidDataException("Invalid header magic");
src\RpmHeader.cs (3)
97throw new InvalidDataException("Invalid RPM header magic"); 104throw new InvalidDataException("Unsupported RPM header version"); 109throw new InvalidDataException("Invalid RPM header reserved bytes");
src\RpmLead.cs (1)
30throw new InvalidDataException("Invalid RPM magic");
src\RpmPackage.cs (1)
32throw new InvalidDataException("Unsupported payload compressor");
Microsoft.DotNet.Build.Tasks.Packaging (3)
NugetPropertyStringProvider.cs (3)
49throw new InvalidDataException($"Nuspec property {propertyString} does not have an \'=\' character in it"); 54throw new InvalidDataException($"Nuspec property {propertyString} does not have a value"); 59throw new InvalidDataException($"Nuspec property {propertyString} does not have a key");
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
OptProf\GetRunSettingsSessionConfiguration.cs (1)
91throw new InvalidDataException(
Microsoft.DotNet.HotReload.Watch (3)
src\sdk\src\Dotnet.Watch\HotReloadAgent.PipeRpc\StreamExtensions.cs (2)
209throw new InvalidDataException(); 254throw new InvalidDataException();
src\sdk\src\Dotnet.Watch\HotReloadClient\Web\AbstractBrowserRefreshServer.cs (1)
246=> JsonSerializer.Deserialize<TValue>(value, s_jsonSerializerOptions) ?? throw new InvalidDataException("Unexpected null object");
Microsoft.DotNet.NuGetRepack.Tasks (10)
src\NuGetVersionUpdater.cs (10)
143throw new InvalidDataException($"'{packagePath}' has invalid nuspec: missing 'metadata' element"); 149throw new InvalidDataException($"'{packagePath}' has invalid nuspec: missing 'id' element"); 156throw new InvalidDataException($"'{packagePath}' has invalid nuspec: missing 'version' element"); 161throw new InvalidDataException($"'{packagePath}' has invalid nuspec: invalid 'version' value '{packageVersionStr}'"); 222throw new InvalidDataException($"'{packagePath}' is missing .nuspec file"); 227throw new InvalidDataException($"Multiple packages of name '{packageId}' specified"); 291throw new InvalidDataException($"'{package.Id}' has invalid format: element 'dependency' is missing 'id' attribute"); 297throw new InvalidDataException($"'{package.Id}' has invalid format: element 'dependency' is missing 'version' attribute"); 302throw new InvalidDataException($"'{id}' has invalid version range: '{versionRangeAttribute.Value}'"); 310throw new InvalidDataException($"Unexpected dependency version range: '{id}, {versionRangeAttribute.Value}'");
Microsoft.Extensions.Configuration.FileExtensions (1)
FileConfigurationProvider.cs (1)
137var wrapped = new InvalidDataException(SR.Format(SR.Error_FailedToLoad, filePath), ex);
Microsoft.Extensions.DotNetDeltaApplier (2)
src\sdk\src\Dotnet.Watch\HotReloadAgent.PipeRpc\StreamExtensions.cs (2)
209throw new InvalidDataException(); 254throw new InvalidDataException();
Microsoft.Maui.Controls (1)
Shapes\PathFigureCollectionConverter.cs (1)
684 throw new InvalidDataException($"Value is not of type {nameof(PathFigureCollection)}");
Microsoft.Maui.Resizetizer (2)
ResizeImageInfo.cs (2)
104 throw new InvalidDataException($"Unable to parse color value '{tintColor}' for '{info.Filename}'."); 109 throw new InvalidDataException($"Unable to parse color value '{color}' for '{info.Filename}'.");
Microsoft.ML.Parquet (2)
ParquetLoader.cs (2)
167throw new InvalidDataException("Cannot read Parquet file", ex); 227throw new InvalidDataException("Cannot read Parquet file", ex);
Microsoft.ML.Tokenizers (40)
Model\SentencePieceTokenizer.cs (20)
579throw new InvalidDataException("The tokenizer.json does not contain a 'model' property."); 584throw new InvalidDataException("The tokenizer.json 'model' property must be a JSON object."); 595throw new InvalidDataException($"Expected model type 'Unigram' but found '{modelTypeElement.GetString()}'."); 600throw new InvalidDataException("The tokenizer.json 'model' has no 'type' and contains 'merges'; this factory only supports 'Unigram' models."); 605throw new InvalidDataException("The tokenizer.json model does not contain an 'unk_id' property."); 613throw new InvalidDataException("The tokenizer.json model 'unk_id' property must be a number or null."); 624throw new InvalidDataException("The tokenizer.json model does not contain a valid 'vocab' array."); 632throw new InvalidDataException("Each entry in 'model.vocab' must be a [piece, score] array."); 637throw new InvalidDataException("Each entry in 'model.vocab' must be a [string piece, number score] pair."); 643throw new InvalidDataException("A piece string in 'model.vocab' is null."); 661throw new InvalidDataException($"The tokenizer.json model 'unk_id' ({unkId}) is out of range for a vocabulary of {vocab.Count} pieces."); 786throw new InvalidDataException("An 'added_tokens' entry must have a string 'content' and a numeric 'id'."); 901throw new InvalidDataException("A post_processor template 'SpecialToken.id' must be a string."); 930throw new InvalidDataException($"The tokenizer.json post_processor special token '{tokenName}' has a non-numeric id."); 941throw new InvalidDataException($"The tokenizer.json post_processor special token '{tokenName}' maps to id {id}, which does not match the vocabulary or added tokens."); 955throw new InvalidDataException($"The tokenizer.json post_processor references special token '{tokenName}' that is not present in the vocabulary."); 981throw new InvalidDataException($"The post-processor '{property}' token '{token}' with id {id} does not match the vocabulary or added tokens."); 1002throw new InvalidDataException($"The tokenizer.json does not contain the required special token '{tokenName}'."); 1227throw new InvalidDataException("The pre_tokenizer 'add_prefix_space' must be a boolean."); 1237throw new InvalidDataException("The pre_tokenizer 'replacement' must be a string.");
Model\SentencePieceUnigramModel.cs (1)
220throw new InvalidDataException("The tokenizer.json model enables byte_fallback but does not contain a contiguous <0x00>..<0xFF> byte-piece block required to represent it.");
Normalizer\SentencePieceNormalizationStep.cs (8)
131throw new InvalidDataException("A tokenizer.json normalizer entry must be a JSON object."); 156throw new InvalidDataException("The Precompiled normalizer 'precompiled_charsmap' must be a string."); 193throw new InvalidDataException("The Prepend normalizer 'prepend' must be a string."); 219throw new InvalidDataException("The tokenizer.json normalizer 'precompiled_charsmap' is not valid base64.", ex); 421throw new InvalidDataException("Replace normalizer is missing its pattern."); 428throw new InvalidDataException("Replace normalizer 'String' pattern must be a string."); 438throw new InvalidDataException("Replace normalizer 'Regex' pattern must be a string."); 448throw new InvalidDataException($"Replace normalizer has an invalid Regex pattern '{regexPattern}'.", ex);
SentencepieceModel.cs (11)
24throw new InvalidDataException("Unexpected end of data while reading varint."); 38throw new InvalidDataException("Unexpected end of data while reading varint."); 54throw new InvalidDataException("Unexpected end of data while reading varint."); 63throw new InvalidDataException("Malformed varint."); 71throw new InvalidDataException("Invalid length-delimited field size."); 89throw new InvalidDataException("Unexpected end of data while reading float."); 121throw new InvalidDataException("Unexpected end of data while skipping varint."); 131throw new InvalidDataException("Malformed varint."); 139throw new InvalidDataException("Unexpected end of data while skipping fixed64."); 152throw new InvalidDataException("Unexpected end of data while skipping fixed32."); 158throw new InvalidDataException($"Unknown or unsupported protobuf wire type {wireType}.");
Microsoft.ML.TorchSharp (1)
Utils\FileUtils.cs (1)
58throw new InvalidDataException(
Microsoft.NET.Build.Tasks (1)
ResolvePackageAssets.cs (1)
631throw new InvalidDataException();
Microsoft.NET.HostModel (11)
AppHost\HostWriter.cs (1)
140throw new InvalidDataException("Cannot sign a non-Mach-O file.");
MachO\BinaryFormat\Blobs\CodeDirectoryBlob.cs (1)
321throw new InvalidDataException("Code hashes are all zero");
MachO\BinaryFormat\Blobs\EmbeddedSignatureBlob.cs (1)
28throw new InvalidDataException($"Invalid magic for EmbeddedSignatureBlob: {superBlob.Magic}");
MachO\MachObjectFile.cs (6)
94throw new InvalidDataException("File is not a Mach-O image"); 283throw new InvalidDataException("Mach-O headers are not equivalent."); 285throw new InvalidDataException("Mach-O code signature load commands are not equivalent."); 287throw new InvalidDataException("Mach-O text segments are not equivalent."); 289throw new InvalidDataException("Mach-O link edit segments are not equivalent."); 291throw new InvalidDataException("Mach-O code signature blobs are not equivalent.");
src\runtime\src\coreclr\tools\Common\MachO\MachMagicExtensions.cs (2)
23_ => throw new InvalidDataException($"Invalid magic value 0x{magic:X}") 35_ => throw new InvalidDataException($"Invalid magic value 0x{magic:X}")
Microsoft.SourceLink.Tools.Package (3)
SourceLinkMap.cs (3)
95throw new InvalidDataException(); 108throw new InvalidDataException(); 116throw new InvalidDataException();
NuGet.Build.Tasks (1)
GetRestoreDotnetCliToolsTask.cs (1)
70throw new InvalidDataException($"Invalid DotnetCliToolReference in {ProjectPath}");
NuGet.PackageManagement (1)
FileModifiers\XdtTransformer.cs (1)
136throw new InvalidDataException(
NuGet.Packaging (19)
NupkgMetadata\NupkgMetadataFileFormat.cs (2)
50throw new InvalidDataException(); 69return new InvalidDataException(message, ex);
PackageArchiveReader.cs (1)
144throw new InvalidDataException(string.Format(CultureInfo.CurrentCulture, Strings.InvalidPackageNupkg, filePath), ex);
PackageCreation\Authoring\ManifestMetadata.cs (1)
77throw new InvalidDataException(NuGetResources.Manifest_InvalidMinClientVersion);
PackageCreation\Authoring\ManifestReader.cs (10)
29throw new InvalidDataException( 62throw new InvalidDataException( 172throw new InvalidDataException(string.Format(CultureInfo.CurrentCulture, NuGetResources.Manifest_PropertyValueReadFailure, value, element.Name.LocalName), ex); 189throw new InvalidDataException(string.Format(CultureInfo.CurrentCulture, Strings.NuGetLicense_InvalidLicenseType, type)); 194throw new InvalidDataException(string.Format(CultureInfo.CurrentCulture, Strings.NuGetLicense_MissingRequiredValue)); 240throw new InvalidDataException(string.Format(CultureInfo.CurrentCulture, Strings.NuGetLicense_InvalidLicenseType, type)); 280throw new InvalidDataException(NuGetResources.Manifest_ReferencesHasMixedElements); 309throw new InvalidDataException(NuGetResources.Manifest_ReferencesIsEmpty); 344throw new InvalidDataException(NuGetResources.Manifest_DependenciesHasMixedElements); 369throw new InvalidDataException(string.Format(CultureInfo.CurrentCulture, Strings.Error_InvalidTargetFramework, targetFrameworkName));
Signing\Archive\EndOfCentralDirectoryRecord.cs (1)
107throw new InvalidDataException(
Signing\Archive\SignedPackageArchiveIOUtility.cs (2)
275throw new InvalidDataException(Strings.ErrorInvalidPackageArchive); 363throw new InvalidDataException(Strings.ErrorInvalidPackageArchive);
Signing\Archive\SignedPackageArchiveUtility.cs (1)
55throw new InvalidDataException(Strings.ErrorInvalidPackageArchive);
Signing\Timestamp\Rfc3161TimestampVerificationUtility.cs (1)
65throw new InvalidDataException(Strings.VerifyError_TimestampInvalid);
NuGet.ProjectModel (3)
DependencyGraphSpec.cs (2)
259throw new InvalidDataException(); 297throw new InvalidDataException();
JsonUtility.cs (1)
42throw new InvalidDataException();
NuGet.Protocol (24)
DependencyInfo\ResolverMetadataClient.cs (5)
70throw new InvalidDataException(registrationUri.AbsoluteUri); 111throw new InvalidDataException(registrationUri.AbsoluteUri); 116throw new InvalidDataException(registrationUri.AbsoluteUri); 123throw new InvalidDataException(registrationUri.AbsoluteUri); 154throw new InvalidDataException(registrationUri.AbsoluteUri);
HttpSource\HttpStreamValidation.cs (5)
71throw new InvalidDataException(message, e); 110throw new InvalidDataException(message, e); 143throw new InvalidDataException(message, e); 195throw new InvalidDataException(message, e); 234throw new InvalidDataException(message, e);
Model\ServiceIndexModel.cs (1)
24throw new InvalidDataException(Strings.Protocol_MissingVersion);
PackagesFolder\LocalPackageFileCache.cs (1)
96?? throw new InvalidDataException("The nupkg metadata file does not contain a content hash.");
Providers\ServiceIndexResourceV3Provider.cs (5)
225throw new InvalidDataException(string.Format( 233throw new InvalidDataException(string.Format( 242throw new InvalidDataException(string.Format( 278throw new InvalidDataException(errorMessage); 283throw new InvalidDataException(Strings.Protocol_MissingVersion);
Resources\MetadataResourceV3.cs (2)
174throw new InvalidDataException(packageId); 201throw new InvalidDataException(packageId);
Resources\PackageMetadataResourceV3.cs (2)
136throw new InvalidDataException(registrationUri.AbsoluteUri); 151throw new InvalidDataException(registrationUri.AbsoluteUri);
Resources\RegistrationResourceV3.cs (3)
140throw new InvalidDataException(registrationUri.AbsoluteUri); 203throw new InvalidDataException(registrationUri.AbsoluteUri); 210throw new InvalidDataException(registrationUri.AbsoluteUri);
PresentationFramework (1)
MS\Internal\Annotations\Component\HighlightComponent.cs (1)
594throw new InvalidDataException(SR.MissingAnnotationHighlightLayer);
PresentationUI (1)
MS\Internal\Documents\Application\DocumentStream.cs (1)
958throw new InvalidDataException(
ReachFramework (9)
Packaging\XpsFixedDocumentReaderWriter.cs (1)
1043throw new InvalidDataException(SR.ReachPackaging_MoreThanOneDocStructure);
Packaging\XpsFixedPageReaderWriter.cs (1)
1579throw new InvalidDataException(SR.ReachPackaging_MoreThanOneStoryFragment);
Packaging\XpsManager.cs (7)
579throw new InvalidDataException(SR.ReachPackaging_InvalidDocUri); 591throw new InvalidDataException(SR.ReachPackaging_MoreThanOneSigDefParts); 651throw new InvalidDataException(SR.ReachPackaging_MoreThanOneThumbnailPart); 671throw new InvalidDataException(SR.ReachPackaging_InvalidDocUri); 683throw new InvalidDataException(SR.ReachPackaging_MoreThanOnePrintTicketPart); 1250throw new InvalidDataException(SR.ReachPackaging_MoreThanOneMetaDataParts); 1415throw new InvalidDataException(SR.ReachPackaging_MoreThanOneStartingParts);
Roslyn.Diagnostics.Analyzers (1)
src\roslyn\src\Compilers\Core\Portable\EncodedStringText.cs (1)
131throw new InvalidDataException(e.Message);
System.Diagnostics.Process (1)
src\runtime\src\libraries\Common\src\System\IO\StringParser.cs (1)
257throw new InvalidDataException();
System.Formats.Tar (32)
System\Formats\Tar\GnuSparseStream.cs (7)
81throw new InvalidDataException(SR.TarInvalidNumber); 92throw new InvalidDataException(SR.TarInvalidNumber, ex); 485throw new InvalidDataException(SR.TarInvalidNumber); 495throw new InvalidDataException(SR.TarInvalidNumber); 501throw new InvalidDataException(SR.TarInvalidNumber); 511throw new InvalidDataException(SR.TarInvalidNumber); 521throw new InvalidDataException(SR.TarInvalidNumber);
System\Formats\Tar\TarHeader.Read.cs (17)
198throw new InvalidDataException(SR.Format(SR.TarSizeFieldNegative)); 220throw new InvalidDataException(SR.TarSizeFieldNegative); 317throw new InvalidDataException(SR.Format(SR.TarSizeFieldTooLargeForEntryType, _typeFlag)); 388throw new InvalidDataException(SR.TarSizeFieldExceedsStreamLength); 438throw new InvalidDataException(SR.TarInvalidChecksum); 444throw new InvalidDataException(SR.TarSizeFieldNegative); 560throw new InvalidDataException(SR.Format(SR.TarPosixFormatExpected, _name)); 578throw new InvalidDataException(SR.Format(SR.TarGnuFormatExpected, _name)); 698throw new InvalidDataException(SR.Format(SR.TarDuplicateExtendedAttribute, name)); 704throw new InvalidDataException(SR.ExtHeaderInvalidRecords); 827throw new InvalidDataException(SR.Format(SR.TarCompressionArchiveDetected, "7-Zip")); 834throw new InvalidDataException(SR.Format(SR.TarCompressionArchiveDetected, "ZIP")); 841throw new InvalidDataException(SR.Format(SR.TarCompressionArchiveDetected, "GZIP")); 848throw new InvalidDataException(SR.Format(SR.TarCompressionArchiveDetected, "BZIP2")); 857throw new InvalidDataException(SR.Format(SR.TarCompressionArchiveDetected, "XZ")); 865throw new InvalidDataException(SR.Format(SR.TarCompressionArchiveDetected, "Zstandard")); 885throw new InvalidDataException(SR.Format(SR.TarCompressionArchiveDetected, "ZLIB"));
System\Formats\Tar\TarHelpers.cs (2)
265throw new InvalidDataException(SR.TarInvalidNumber); 370throw new InvalidDataException(SR.Format(SR.TarInvalidFormat, archiveFormat));
System\Formats\Tar\TarReader.cs (3)
300throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, actualHeader._typeFlag, TarEntryType.ExtendedAttributes)); 327throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, secondHeader._typeFlag, header._typeFlag)); 346throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, thirdHeader._typeFlag, secondHeader._typeFlag));
System\Formats\Tar\TarWriter.cs (3)
334throw new InvalidDataException(SR.Format(SR.TarInvalidFormat, Format)); 356_ => throw new InvalidDataException(SR.Format(SR.TarInvalidFormat, Format)), 426_ => throw new InvalidDataException(SR.Format(SR.TarInvalidFormat, Format)),
System.IO.Compression (84)
System\IO\Compression\DeflateManaged\DeflateManagedStream.cs (2)
134throw new InvalidDataException(SR.GenericInvalidData); 221throw new InvalidDataException(SR.GenericInvalidData);
System\IO\Compression\DeflateManaged\HuffmanTree.cs (4)
191throw new InvalidDataException(SR.InvalidHuffmanData); 233throw new InvalidDataException(SR.InvalidHuffmanData); 253throw new InvalidDataException(SR.InvalidHuffmanData); 304throw new InvalidDataException(SR.InvalidHuffmanData);
System\IO\Compression\DeflateManaged\InflaterManaged.cs (13)
218throw new InvalidDataException(SR.UnknownBlockType); 244throw new InvalidDataException(SR.UnknownBlockType); 303throw new InvalidDataException(SR.InvalidBlockLength); 336throw new InvalidDataException(SR.UnknownState); 400throw new InvalidDataException(SR.GenericInvalidData); 422throw new InvalidDataException(SR.GenericInvalidData); 480throw new InvalidDataException(SR.UnknownState); 614throw new InvalidDataException(); 622throw new InvalidDataException(); 640throw new InvalidDataException(); 659throw new InvalidDataException(); 672throw new InvalidDataException(SR.UnknownState); 685throw new InvalidDataException();
System\IO\Compression\DeflateZLib\DeflateStream.cs (4)
418throw new InvalidDataException(SR.GenericInvalidData); 421throw new InvalidDataException(SR.TruncatedData); 1117return Task.FromException(new InvalidDataException(SR.GenericInvalidData)); 1176throw new InvalidDataException(SR.GenericInvalidData);
System\IO\Compression\DeflateZLib\Inflater.cs (1)
321throw new InvalidDataException(SR.UnsupportedCompression);
System\IO\Compression\WinZipAesStream.cs (7)
141throw new InvalidDataException(SR.LocalFileHeaderCorrupt); 148throw new InvalidDataException(SR.InvalidPassword); 191throw new InvalidDataException(SR.InvalidWinZipSize); 210throw new InvalidDataException(SR.WinZipAuthCodeMismatch); 217throw new InvalidDataException(SR.WinZipAuthCodeMismatch); 426throw new InvalidDataException(SR.UnexpectedEndOfStream); 471throw new InvalidDataException(SR.UnexpectedEndOfStream);
System\IO\Compression\ZipArchive.Async.cs (6)
257throw new InvalidDataException(SR.CentralDirectoryInvalid, ex); 285throw new InvalidDataException(SR.EOCDNotFound); 298throw new InvalidDataException(SR.FieldTooBigOffsetToCD); 303throw new InvalidDataException(SR.CDCorrupt, ex); 307throw new InvalidDataException(SR.CDCorrupt, ex); 329throw new InvalidDataException(SR.Zip64EOCDNotWhereExpected);
System\IO\Compression\ZipArchive.cs (15)
616throw new InvalidDataException(SR.NumEntriesWrong); 640throw new InvalidDataException(SR.NumEntriesWrong); 703throw new InvalidDataException(SR.CentralDirectoryInvalid, ex); 715throw new InvalidDataException(SR.SplitSpanned); 723throw new InvalidDataException(SR.SplitSpanned); 748throw new InvalidDataException(SR.EOCDNotFound); 761throw new InvalidDataException(SR.FieldTooBigOffsetToCD); 766throw new InvalidDataException(SR.CDCorrupt, ex); 770throw new InvalidDataException(SR.CDCorrupt, ex); 778throw new InvalidDataException(SR.FieldTooBigOffsetToZip64EOCD); 785throw new InvalidDataException(SR.InvalidOffsetToZip64EOCD); 797throw new InvalidDataException(SR.FieldTooBigNumEntries); 802throw new InvalidDataException(SR.FieldTooBigOffsetToCD); 807throw new InvalidDataException(SR.SplitSpanned); 830throw new InvalidDataException(SR.Zip64EOCDNotWhereExpected);
System\IO\Compression\ZipArchiveEntry.Async.cs (7)
165throw new InvalidDataException(SR.LocalFileHeaderCorrupt); 236throw new InvalidDataException(SR.PasswordRequired); 248throw new InvalidDataException(SR.LocalFileHeaderCorrupt); 366throw new InvalidDataException(SR.EntryUncompressedSizeTooLargeForUpdateMode); 503throw new InvalidDataException(message); 547throw new InvalidDataException(SR.LocalFileHeaderCorrupt); 613throw new InvalidDataException(SR.EntryTooLarge);
System\IO\Compression\ZipArchiveEntry.cs (8)
96_ => throw new InvalidDataException(SR.InvalidAesStrength) 612throw new InvalidDataException(SR.LocalFileHeaderCorrupt); 678throw new InvalidDataException(SR.EntryUncompressedSizeTooLargeForUpdateMode); 979throw new InvalidDataException(message); 1071_ => throw new InvalidDataException(SR.InvalidAesStrength) 1088throw new InvalidDataException(SR.PasswordRequired); 1095throw new InvalidDataException(SR.LocalFileHeaderCorrupt); 1408_ => throw new InvalidDataException(SR.InvalidAesStrength)
System\IO\Compression\ZipBlocks.Async.cs (2)
113throw new InvalidDataException(SR.Zip64EOCDNotWhereExpected); 270throw new InvalidDataException(SR.EOCDNotFound);
System\IO\Compression\ZipBlocks.cs (5)
312throw new InvalidDataException(SR.FieldTooBigUncompressedSize); 331throw new InvalidDataException(SR.FieldTooBigCompressedSize); 350throw new InvalidDataException(SR.FieldTooBigLocalHeaderOffset); 567throw new InvalidDataException(SR.Zip64EOCDNotWhereExpected); 1175throw new InvalidDataException(SR.EOCDNotFound);
System\IO\Compression\ZipCryptoStream.cs (2)
225throw new InvalidDataException(SR.TruncatedZipCryptoHeader); 239throw new InvalidDataException(SR.InvalidPassword);
System\IO\Compression\ZipCustomStreams.cs (2)
647throw new InvalidDataException(SR.UnexpectedStreamLength); 660throw new InvalidDataException(SR.CrcMismatch);
System\IO\Compression\Zstandard\ZstandardStream.Compress.cs (2)
135throw new InvalidDataException(SR.ZstandardStream_Compress_InvalidData); 196throw new InvalidDataException(SR.ZstandardStream_Compress_InvalidData);
System\IO\Compression\Zstandard\ZstandardStream.Decompress.cs (3)
71throw new InvalidDataException(SR.ZstandardStream_Decompress_InvalidData); 447throw new InvalidDataException(SR.ZstandardStream_Decompress_InvalidStream); 451throw new InvalidDataException(SR.ZstandardStream_Decompress_TruncatedData);
System\IO\Compression\Zstandard\ZstandardUtils.cs (1)
73return new InvalidDataException(SR.ZstandardDecoder_DictionaryWrong);
System.IO.Compression.Brotli (4)
System\IO\Compression\dec\BrotliStream.Decompress.cs (2)
263throw new InvalidDataException(SR.BrotliStream_Decompress_InvalidStream); 266throw new InvalidDataException(SR.BrotliStream_Decompress_TruncatedData);
System\IO\Compression\enc\BrotliStream.Compress.cs (2)
200throw new InvalidDataException(SR.BrotliStream_Compress_InvalidData); 241throw new InvalidDataException(SR.BrotliStream_Compress_InvalidData);
System.Net.NameResolution (4)
System\Net\DnsResolverPal.Managed.cs (4)
445lastException = tcpValidationError ?? new InvalidDataException(); 572error = new InvalidDataException(); 583error = new InvalidDataException(); 917throw new InvalidDataException();
System.Net.NetworkInformation (1)
src\runtime\src\libraries\Common\src\System\IO\StringParser.cs (1)
257throw new InvalidDataException();
System.Net.ServerSentEvents (2)
System\Net\ServerSentEvents\SseParser_1.cs (2)
329throw new InvalidDataException(SR.InvalidDataException_SseExceededMaxLength); 465throw new InvalidDataException(SR.InvalidDataException_SseExceededMaxLength);
System.Private.CoreLib (3)
src\runtime\src\libraries\Common\src\System\IO\StringParser.cs (1)
257throw new InvalidDataException();
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\SharedMemoryManager.Unix.cs (2)
238throw new InvalidDataException(SR.Format(SR.IO_SharedMemory_InvalidHeader, sharedMemoryFilePath)); 277throw new InvalidDataException(SR.Format(SR.IO_SharedMemory_InvalidHeader, sharedMemoryFilePath));
System.ServiceModel.NetFramingBase (17)
System\ServiceModel\Channels\FramingDecoders.cs (17)
68throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataException(SR.FramingSizeTooLarge)); 172throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataException(SR.InvalidDecoderStateMachine)); 222Exception result = new InvalidDataException(SR.Format(SR.FramingViaTooLong, size)); 236throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataException(SR.Format(SR.FramingViaNotUri, value), exception)); 265return new InvalidDataException(SR.Format(SR.FramingFaultTooLong, size)); 337Exception result = new InvalidDataException(SR.Format(SR.FramingContentTypeTooLong, size)); 396Exception exception = CreateException(new InvalidDataException(SR.Format( 432return new InvalidDataException(SR.Format(SR.FramingRecordTypeMismatch, expectedType.ToString(), foundType.ToString())); 439Exception exception = CreateException(new InvalidDataException(SR.Format( 447return CreateException(new InvalidDataException(SR.FramingPrematureEOF)); 556CreateException(new InvalidDataException(SR.FramingAtEnd))); 560CreateException(new InvalidDataException(SR.InvalidDecoderStateMachine))); 782CreateException(new InvalidDataException(SR.FramingAtEnd))); 785CreateException(new InvalidDataException(SR.InvalidDecoderStateMachine))); 890CreateException(new InvalidDataException(SR.FramingAtEnd))); 908CreateException(new InvalidDataException(SR.FramingAtEnd))); 911CreateException(new InvalidDataException(SR.InvalidDecoderStateMachine)));
System.ServiceModel.Primitives (5)
System\ServiceModel\Channels\BinaryMessageEncoder.cs (4)
431throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataException(SRP.BinaryEncoderSessionInvalid)); 447throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataException(SRP.BinaryEncoderSessionMalformed)); 453throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataException(SRP.BinaryEncoderSessionMalformed)); 484throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataException(SRP.BinaryEncoderSessionMalformed));
System\ServiceModel\Channels\IntDecoder.cs (1)
51throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataException(SRP.FramingSizeTooLarge));
TypeScriptApiCompat (7)
AtsSurfaceParser.cs (7)
65throw new InvalidDataException($"DTO property '{rawLine}' appeared before a DTO type."); 144throw new InvalidDataException($"Invalid DTO property line '{line}'."); 160throw new InvalidDataException($"Invalid enum line '{line}'."); 175throw new InvalidDataException($"Invalid exported value line '{line}'."); 181throw new InvalidDataException($"Invalid exported value line '{line}'."); 197throw new InvalidDataException($"Invalid capability line '{line}'."); 218throw new InvalidDataException($"Invalid parameter '{parameterText}'.");
215 references to InvalidDataException
aspire (6)
Agents\AspireSkills\AspireSkillsInstaller.cs (2)
262catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or InvalidDataException or InvalidOperationException) 360catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or InvalidDataException or InvalidOperationException)
Commands\Sdk\SdkDumpCommand.cs (1)
373catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or InvalidDataException or InvalidOperationException or RemoteInvocationException or AppHostCodeGenerationException)
Packaging\PackageChannel.cs (2)
468catch (InvalidDataException ex) 776catch (InvalidDataException ex)
Utils\ConfigurationHelper.cs (1)
208catch (InvalidDataException)
Aspire.Cli.Tests (4)
Acquisition\InstallSidecarWriterTests.cs (2)
85var exception = Assert.Throws<InvalidDataException>(
Agents\AspireSkillsBundleTests.cs (2)
618var exception = await Assert.ThrowsAsync<InvalidDataException>(() => s_bundleProvider.CreateAsync(
Aspire.Hosting (6)
DistributedApplicationBuilder.cs (1)
1066catch (Exception ex) when (ex is ArgumentException or IOException or UnauthorizedAccessException or JsonException or InvalidDataException or FormatException or TimeoutException)
Pipelines\Internal\FileDeploymentStateManager.cs (4)
104catch (Exception ex) when (ex is JsonException or InvalidOperationException or InvalidDataException) 157catch (Exception ex) when (ex is JsonException or InvalidOperationException or InvalidDataException) 618exception is JsonException or InvalidOperationException or InvalidDataException or IOException or UnauthorizedAccessException; 714catch (Exception ex) when (ex is JsonException or InvalidOperationException or InvalidDataException)
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
51catch (InvalidDataException ex)
Aspire.Hosting.Azure.Functions (1)
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
51catch (InvalidDataException ex)
Aspire.Hosting.Dotnet (1)
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
51catch (InvalidDataException ex)
Aspire.Hosting.Java (1)
JavaHostingExtensions.cs (1)
2228catch (Exception ex) when (ex is IOException or InvalidDataException or UnauthorizedAccessException)
Aspire.Hosting.Testing (1)
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
51catch (InvalidDataException ex)
Aspire.MongoDB.Driver.v2.Tests (1)
SnappyCompressionTests.cs (1)
90Assert.Throws<InvalidDataException>(() => decompressor.CopyTo(output));
dotnet-aot (1)
parent\dotnet\Commands\Test\MTP\IPC\HttpTestHostGateway.cs (1)
170catch (InvalidDataException)
dotnet-svcutil-lib (6)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BinaryMessageEncoder.cs (1)
546catch (InvalidDataException)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\FramingDecoders.cs (5)
447protected Exception CreateException(InvalidDataException innerException, string framingFault) 454protected Exception CreateException(InvalidDataException innerException) 567catch (InvalidDataException e) 793catch (InvalidDataException e) 916catch (InvalidDataException e)
GenerateDocumentationAndConfigFiles (2)
src\roslyn\src\Compilers\Core\Portable\EncodedStringText.cs (2)
86/// <exception cref="InvalidDataException"> 141/// <param name="throwIfBinaryDetected">Throw <see cref="InvalidDataException"/> if binary (non-text) data is detected.</param>
Microsoft.AspNetCore.Antiforgery (1)
Internal\DefaultAntiforgeryTokenStore.cs (1)
60catch (InvalidDataException ex)
Microsoft.AspNetCore.Http (8)
Features\FormOptions.cs (8)
55/// be buffered. Forms that exceed this limit will throw an <see cref="InvalidDataException"/> when parsed. 62/// Forms that exceed this limit will throw an <see cref="InvalidDataException"/> when parsed. 69/// throw an <see cref="InvalidDataException"/> when parsed. 79/// limit will throw an <see cref="InvalidDataException"/> when parsed. 88/// limit will throw an <see cref="InvalidDataException"/> when parsed. 95/// be combined. Form sections that exceed this limit will throw an <see cref="InvalidDataException"/> 103/// Form sections that exceed this limit will throw an <see cref="InvalidDataException"/> when parsed. 110/// <see cref="InvalidDataException"/> when parsed.
Microsoft.AspNetCore.Http.Extensions (1)
RequestDelegateFactory.cs (1)
1575catch (InvalidDataException ex)
Microsoft.AspNetCore.InternalTesting (1)
HttpClientSlim.cs (1)
119catch (InvalidDataException)
Microsoft.AspNetCore.Mvc.Core (11)
ModelBinding\FormFileValueProviderFactory.cs (1)
39catch (InvalidDataException ex)
ModelBinding\FormValueProviderFactory.cs (1)
41catch (InvalidDataException ex)
ModelBinding\JQueryFormValueProviderFactory.cs (1)
41catch (InvalidDataException ex)
RequestFormLimitsAttribute.cs (8)
69/// be buffered. Forms that exceed this limit will throw an <see cref="InvalidDataException"/> when parsed. 81/// Forms that exceed this limit will throw an <see cref="InvalidDataException"/> when parsed. 93/// throw an <see cref="InvalidDataException"/> when parsed. 108/// limit will throw an <see cref="InvalidDataException"/> when parsed. 122/// limit will throw an <see cref="InvalidDataException"/> when parsed. 134/// be combined. Form sections that exceed this limit will throw an <see cref="InvalidDataException"/> 147/// Form sections that exceed this limit will throw an <see cref="InvalidDataException"/> when parsed. 159/// <see cref="InvalidDataException"/> when parsed.
Microsoft.AspNetCore.SignalR.Client.Core (1)
HubConnection.cs (1)
1879catch (InvalidDataException ex)
Microsoft.Build (2)
BackEnd\Components\Scheduler\SchedulingPlan.cs (1)
176catch (InvalidDataException)
Logging\BinaryLogger\BuildEventArgsReader.cs (1)
239e is InvalidDataException ||
Microsoft.Build.Tasks.Git (3)
GitDataReader\GitRepository.cs (1)
265catch (Exception e) when (e is IOException or InvalidDataException)
RepositoryTask.cs (2)
95catch (Exception e) when (e is IOException or InvalidDataException or NotSupportedException) 142catch (Exception e) when (e is IOException or InvalidDataException or NotSupportedException)
Microsoft.CodeAnalysis (18)
CommandLine\CommonCompiler.cs (1)
510else if (e is InvalidDataException)
Emit\EditAndContinue\DefinitionMap.cs (2)
352catch (Exception e) when (e is InvalidDataException or IOException or BadImageFormatException) 753catch (Exception e) when (e is InvalidDataException or IOException or BadImageFormatException)
Emit\EditAndContinue\EmitBaseline.cs (4)
104/// The function shall throw <see cref="InvalidDataException"/> if the debug information can't be read for the specified method. 109/// The function shall throw <see cref="InvalidDataException"/> if the information can't be read for the specified method. 264/// The function shall throw <see cref="InvalidDataException"/> if the debug information can't be read for the specified method. 273/// The function shall throw <see cref="InvalidDataException"/> if the information can't be read for the specified method.
Emit\EditAndContinueMethodDebugInformation.cs (5)
48/// <exception cref="InvalidDataException">Invalid data.</exception> 58/// <exception cref="InvalidDataException">Invalid data.</exception> 70private static InvalidDataException CreateInvalidDataException(ImmutableArray<byte> data, int offset) 91/// <exception cref="InvalidDataException">Invalid data.</exception> 308/// <exception cref="InvalidDataException">Invalid data.</exception>
EncodedStringText.cs (2)
86/// <exception cref="InvalidDataException"> 141/// <param name="throwIfBinaryDetected">Throw <see cref="InvalidDataException"/> if binary (non-text) data is detected.</param>
Text\SourceText.cs (4)
171/// characters, then an <see cref="InvalidDataException"/> is thrown.</param> 179/// <exception cref="InvalidDataException">Two consecutive NUL characters were detected in the decoded text and <paramref name="throwIfBinaryDetected"/> was true.</exception> 261/// characters, then an <see cref="InvalidDataException"/> is thrown.</param> 268/// <exception cref="InvalidDataException">Two consecutive NUL characters were detected in the decoded text and <paramref name="throwIfBinaryDetected"/> was true.</exception>
Microsoft.CodeAnalysis.Analyzers (2)
src\roslyn\src\Compilers\Core\Portable\EncodedStringText.cs (2)
86/// <exception cref="InvalidDataException"> 141/// <param name="throwIfBinaryDetected">Throw <see cref="InvalidDataException"/> if binary (non-text) data is detected.</param>
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
src\roslyn\src\Compilers\Core\Portable\EncodedStringText.cs (2)
86/// <exception cref="InvalidDataException"> 141/// <param name="throwIfBinaryDetected">Throw <see cref="InvalidDataException"/> if binary (non-text) data is detected.</param>
Microsoft.CodeAnalysis.CodeStyle (2)
src\roslyn\src\Compilers\Core\Portable\EncodedStringText.cs (2)
86/// <exception cref="InvalidDataException"> 141/// <param name="throwIfBinaryDetected">Throw <see cref="InvalidDataException"/> if binary (non-text) data is detected.</param>
Microsoft.CodeAnalysis.Features (1)
PdbSourceDocument\SourceLinkMap.cs (1)
61/// <exception cref="InvalidDataException">The JSON does not follow Source Link specification.</exception>
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
src\roslyn\src\Compilers\Core\Portable\EncodedStringText.cs (2)
86/// <exception cref="InvalidDataException"> 141/// <param name="throwIfBinaryDetected">Throw <see cref="InvalidDataException"/> if binary (non-text) data is detected.</param>
Microsoft.CodeAnalysis.Workspaces (11)
Shared\Utilities\IOUtilities.cs (1)
59InvalidDataException;
src\roslyn\src\Compilers\Core\Portable\EncodedStringText.cs (2)
86/// <exception cref="InvalidDataException"> 141/// <param name="throwIfBinaryDetected">Throw <see cref="InvalidDataException"/> if binary (non-text) data is detected.</param>
Workspace\Host\TextFactory\ITextFactoryService.cs (1)
28/// <exception cref="InvalidDataException">
Workspace\Solution\FileTextLoader.cs (2)
100/// <exception cref="InvalidDataException"></exception> 194/// <exception cref="InvalidDataException"></exception>
Workspace\Solution\TextLoader.cs (5)
58/// <exception cref="InvalidDataException"/> 80/// <exception cref="InvalidDataException"/> 90/// <exception cref="InvalidDataException"/> 117catch (InvalidDataException e) 146catch (InvalidDataException e)
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildWorkspace.cs (1)
469catch (InvalidDataException)
Microsoft.Deployment.DotNet.Releases (1)
ReleaseFile.cs (1)
102/// <exception cref="InvalidDataException">Thrown if the downloaded file's hash does to match the
Microsoft.Extensions.Configuration.FileExtensions (2)
FileConfigurationProvider.cs (2)
137var wrapped = new InvalidDataException(SR.Format(SR.Error_FailedToLoad, filePath), ex); 189/// <exception cref="InvalidDataException">An exception was thrown by the concrete implementation of the
Microsoft.ML.Tokenizers.Tests (20)
UnigramTests.cs (20)
1124Assert.Throws<InvalidDataException>(() => 1140Assert.Throws<InvalidDataException>(() => 1338Assert.Throws<InvalidDataException>(() => 1357Assert.Throws<InvalidDataException>(() => 1376Assert.Throws<InvalidDataException>(() => 1396Assert.Throws<InvalidDataException>(() => 1422Assert.Throws<InvalidDataException>(() => 1442Assert.Throws<InvalidDataException>(() => 1462Assert.Throws<InvalidDataException>(() => 1482Assert.Throws<InvalidDataException>(() => 1511Assert.Throws<InvalidDataException>(() => 1540Assert.Throws<InvalidDataException>(() => 1560Assert.Throws<InvalidDataException>(() => 1580Assert.Throws<InvalidDataException>(() => 1600Assert.Throws<InvalidDataException>(() => 1639Assert.Throws<InvalidDataException>(() => 1659Assert.Throws<InvalidDataException>(() => 1700Assert.Throws<InvalidDataException>(() => 1714Assert.Throws<InvalidDataException>(() => 1835Assert.Throws<InvalidDataException>(() =>
Microsoft.ML.TorchSharp (1)
Utils\FileUtils.cs (1)
41/// <exception cref="InvalidDataException">When the contents in the stream don't match the need.</exception>
Microsoft.NET.Build.Tasks (1)
ResolvePackageAssets.cs (1)
577catch (InvalidDataException) { }
netstandard (1)
netstandard.cs (1)
930[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.InvalidDataException))]
NuGet.Commands (1)
VerifyCommand\VerifyCommandRunner.cs (1)
101catch (InvalidDataException e)
NuGet.Packaging (2)
NupkgMetadata\NupkgMetadataFileFormat.cs (1)
63static InvalidDataException LogAndWrap(ILogger log, string path, Exception ex)
PackageCreation\Authoring\ManifestReader.cs (1)
168catch (Exception ex) when (!(ex is InvalidDataException))
NuGet.Protocol (6)
HttpSource\HttpStreamValidation.cs (2)
64catch (Exception e) when (!(e is InvalidDataException)) 103catch (Exception e) when (!(e is InvalidDataException))
LocalRepositories\LocalDownloadResource.cs (1)
76catch (InvalidDataException ex)
LocalRepositories\LocalV3FindPackageByIdResource.cs (1)
216catch (InvalidDataException ex)
RemoteRepositories\PackageUtilities.cs (1)
35exception is InvalidDataException)
Utility\OfflineFeedUtility.cs (1)
227catch (Exception ex) when (ex is InvalidDataException
Roslyn.Diagnostics.Analyzers (2)
src\roslyn\src\Compilers\Core\Portable\EncodedStringText.cs (2)
86/// <exception cref="InvalidDataException"> 141/// <param name="throwIfBinaryDetected">Throw <see cref="InvalidDataException"/> if binary (non-text) data is detected.</param>
System (1)
parent\ref\System.cs (1)
567[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.InvalidDataException))]
System.Formats.Tar (4)
System\Formats\Tar\TarHeader.Read.cs (2)
420catch (InvalidDataException) 809/// <exception cref="InvalidDataException">
System\Formats\Tar\TarReader.cs (2)
95/// <exception cref="InvalidDataException"><para>The entry's data is malformed.</para> 132/// <exception cref="InvalidDataException"><para>The archive is malformed.</para>
System.IO (1)
System.IO.cs (1)
12[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.InvalidDataException))]
System.IO.Compression (25)
System\IO\Compression\ZipArchive.Async.cs (1)
64/// <exception cref="InvalidDataException">The contents of the stream could not be interpreted as a Zip file. -or- mode is Update and an entry is missing from the archive or is corrupt and cannot be read. -or- mode is Update and an entry is too large to fit into memory.</exception>
System\IO\Compression\ZipArchive.cs (6)
47/// <exception cref="InvalidDataException">The contents of the stream could not be interpreted as a Zip archive.</exception> 57/// <exception cref="InvalidDataException">The contents of the stream could not be interpreted as a Zip file. -or- mode is Update and an entry is missing from the archive or is corrupt and cannot be read. -or- mode is Update and an entry is too large to fit into memory.</exception> 68/// <exception cref="InvalidDataException">The contents of the stream could not be interpreted as a Zip file. -or- mode is Update and an entry is missing from the archive or is corrupt and cannot be read. -or- mode is Update and an entry is too large to fit into memory.</exception> 80/// <exception cref="InvalidDataException">The contents of the stream could not be interpreted as a Zip file. -or- mode is Update and an entry is missing from the archive or is corrupt and cannot be read. -or- mode is Update and an entry is too large to fit into memory.</exception> 227/// <exception cref="InvalidDataException">The Zip archive is corrupt and the entries cannot be retrieved.</exception> 390/// <exception cref="InvalidDataException">The Zip archive is corrupt and the entries cannot be retrieved.</exception>
System\IO\Compression\ZipArchiveEntry.Async.cs (6)
20/// <exception cref="InvalidDataException">The entry is missing from the archive or is corrupt and cannot be read. -or- The entry has been compressed using a compression method that is not supported.</exception> 46/// <exception cref="InvalidDataException">The entry is missing from the archive or is corrupt and cannot be read. -or- The entry has been compressed using a compression method that is not supported.</exception> 101/// <exception cref="InvalidDataException">The entry is missing from the archive or is corrupt and cannot be read. -or- The entry has been compressed using a compression method that is not supported.</exception> 205catch (Exception ex) when (ex is InvalidDataException or EndOfStreamException) 382catch (InvalidDataException) 626catch (InvalidDataException)
System\IO\Compression\ZipArchiveEntry.cs (5)
457/// <exception cref="InvalidDataException">The entry is missing from the archive or is corrupt and cannot be read. -or- The entry has been compressed using a compression method that is not supported.</exception> 472/// <exception cref="InvalidDataException">The entry is missing from the archive or is corrupt and cannot be read. -or- The entry has been compressed using a compression method that is not supported.</exception> 504/// <exception cref="InvalidDataException">The entry is missing from the archive or is corrupt and cannot be read. -or- The entry has been compressed using a compression method that is not supported.</exception> 653catch (Exception ex) when (ex is InvalidDataException or EndOfStreamException) 695catch (InvalidDataException)
System\IO\Compression\Zstandard\ZstandardStream.Compress.cs (1)
75/// Setting the source length is optional. If set, the information is stored in the header of the compressed data. This method must be called before writing any data to the stream. The length is validated during compression, and not respecting the value causes an <see cref="InvalidDataException"/> to be thrown.
System\IO\Compression\Zstandard\ZstandardStream.Decompress.cs (6)
120/// <exception cref="InvalidDataException">The data is in an invalid format.</exception> 133/// <exception cref="InvalidDataException">The data is in an invalid format.</exception> 293/// <exception cref="InvalidDataException">The data is in an invalid format.</exception> 307/// <exception cref="InvalidDataException">The data is in an invalid format.</exception> 394/// <exception cref="InvalidDataException">The data is in an invalid format.</exception> 413/// <exception cref="InvalidDataException">The data is in an invalid format.</exception>
System.IO.Compression.Brotli (2)
System\IO\Compression\dec\BrotliStream.Decompress.cs (1)
30/// <exception cref="System.IO.InvalidDataException">The data is in an invalid format.</exception>
System\IO\Compression\enc\BrotliStream.Compress.cs (1)
183/// <exception cref="InvalidDataException">The encoder ran into invalid data.</exception>
System.IO.Compression.ZipFile (34)
System\IO\Compression\ZipFile.Create.Async.cs (3)
29/// <exception cref="InvalidDataException">The specified file could not be interpreted as a Zip file.</exception> 55/// <exception cref="InvalidDataException">The specified file could not be interpreted as a Zip file. 95/// <exception cref="InvalidDataException">The specified file could not be interpreted as a Zip file.
System\IO\Compression\ZipFile.Create.cs (3)
27/// <exception cref="InvalidDataException">The specified file could not be interpreted as a Zip file.</exception> 50/// <exception cref="InvalidDataException">The specified file could not be interpreted as a Zip file. 87/// <exception cref="InvalidDataException">The specified file could not be interpreted as a Zip file.
System\IO\Compression\ZipFile.Extract.Async.cs (10)
35/// <exception cref="InvalidDataException">The archive specified by sourceArchive: Is not a valid ZipArchive 70/// <exception cref="InvalidDataException">The archive specified by sourceArchive: Is not a valid ZipArchive 106/// <exception cref="InvalidDataException">The archive specified by sourceArchive: Is not a valid ZipArchive 163/// <exception cref="InvalidDataException">The archive specified by sourceArchive: Is not a valid ZipArchive 231/// <exception cref="InvalidDataException">The archive specified by sourceArchive: Is not a valid ZipArchive 302/// <exception cref="InvalidDataException">The archive contained in the <paramref name="source" /> stream is not a valid zip archive. 334/// <exception cref="InvalidDataException">The archive contained in the <paramref name="source" /> stream is not a valid zip archive. 374/// <exception cref="InvalidDataException">The archive contained in the <paramref name="source" /> stream is not a valid zip archive. 415/// <exception cref="InvalidDataException">The archive contained in the <paramref name="source" /> stream is not a valid zip archive. 471/// <exception cref="InvalidDataException">The archive contained in the <paramref name="source" /> stream is not a valid zip archive.
System\IO\Compression\ZipFile.Extract.cs (10)
33/// <exception cref="InvalidDataException">The archive specified by sourceArchive: Is not a valid ZipArchive 65/// <exception cref="InvalidDataException">The archive specified by sourceArchive: Is not a valid ZipArchive 98/// <exception cref="InvalidDataException">The archive specified by sourceArchive: Is not a valid ZipArchive 152/// <exception cref="InvalidDataException">The archive specified by sourceArchive: Is not a valid ZipArchive 214/// <exception cref="InvalidDataException">The archive specified by sourceArchive: Is not a valid ZipArchive 275/// <exception cref="InvalidDataException">The archive contained in the <paramref name="source" /> stream is not a valid zip archive. 304/// <exception cref="InvalidDataException">The archive contained in the <paramref name="source" /> stream is not a valid zip archive. 341/// <exception cref="InvalidDataException">The archive contained in the <paramref name="source" /> stream is not a valid zip archive. 379/// <exception cref="InvalidDataException">The archive contained in the <paramref name="source" /> stream is not a valid zip archive. 427/// <exception cref="InvalidDataException">The archive contained in the <paramref name="source" /> stream is not a valid zip archive.
System\IO\Compression\ZipFileExtensions.ZipArchive.Extract.Async.cs (2)
31/// <exception cref="InvalidDataException">An archive entry was not found or was corrupt. 64/// <exception cref="InvalidDataException">An archive entry was not found or was corrupt.
System\IO\Compression\ZipFileExtensions.ZipArchive.Extract.cs (2)
29/// <exception cref="InvalidDataException">An archive entry was not found or was corrupt. 59/// <exception cref="InvalidDataException">An archive entry was not found or was corrupt.
System\IO\Compression\ZipFileExtensions.ZipArchiveEntry.Extract.Async.cs (2)
29/// <exception cref="InvalidDataException">The entry is missing from the archive or is corrupt and cannot be read 59/// <exception cref="InvalidDataException">The entry is missing from the archive or is corrupt and cannot be read
System\IO\Compression\ZipFileExtensions.ZipArchiveEntry.Extract.cs (2)
26/// <exception cref="InvalidDataException">The entry is missing from the archive or is corrupt and cannot be read 55/// <exception cref="InvalidDataException">The entry is missing from the archive or is corrupt and cannot be read
System.IO.Packaging (1)
System\IO\Packaging\ZipPackage.cs (1)
404catch (InvalidDataException)
System.Private.CoreLib (4)
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\InvalidDataException.cs (4)
10/// <remarks>An <see cref="InvalidDataException" /> is thrown when invalid data is detected in the data stream.</remarks> 15/// <summary>Initializes a new instance of the <see cref="InvalidDataException" /> class.</summary> 22/// <summary>Initializes a new instance of the <see cref="InvalidDataException" /> class with a specified error message.</summary> 30/// <summary>Initializes a new instance of the <see cref="InvalidDataException" /> class with a reference to the inner exception that is the cause of this exception.</summary>
System.Runtime (1)
src\runtime\artifacts\obj\System.Runtime\Release\net11.0\System.Runtime.Forwards.cs (1)
316[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.InvalidDataException))]
System.Runtime.Extensions (1)
System.Runtime.Extensions.cs (1)
42[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.InvalidDataException))]
System.ServiceModel.NetFramingBase (5)
System\ServiceModel\Channels\FramingDecoders.cs (5)
450protected Exception CreateException(InvalidDataException innerException, string framingFault) 457protected Exception CreateException(InvalidDataException innerException) 566catch (InvalidDataException e) 791catch (InvalidDataException e) 917catch (InvalidDataException e)
System.ServiceModel.Primitives (1)
System\ServiceModel\Channels\BinaryMessageEncoder.cs (1)
536catch (InvalidDataException)
TypeScriptApiCompat (1)
TypeScriptApiCompatRunner.cs (1)
43catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or InvalidDataException or InvalidOperationException)