12 types derived from InvalidOperationException
Microsoft.AspNetCore.Connections.Abstractions (1)
Exceptions\AddressInUseException.cs (1)
11public class AddressInUseException : InvalidOperationException
Microsoft.AspNetCore.Mvc.Core (1)
Infrastructure\AmbiguousActionException.cs (1)
14public class AmbiguousActionException : InvalidOperationException
PresentationFramework (1)
System\Windows\ResourceReferenceKeyNotFoundException.cs (1)
20public class ResourceReferenceKeyNotFoundException: InvalidOperationException
System.Net.Ping (1)
System\Net\NetworkInformation\PingException.cs (1)
11public class PingException : InvalidOperationException
System.Net.Requests (3)
System\Net\ProtocolViolationException.cs (1)
17public class ProtocolViolationException : InvalidOperationException, ISerializable
System\Net\WebException.cs (1)
15public partial class WebException : InvalidOperationException, ISerializable
System\Net\WebExceptionPal.Unix.cs (1)
8public partial class WebException : InvalidOperationException
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\ObjectDisposedException.cs (1)
17public class ObjectDisposedException : InvalidOperationException
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\SwitchExpressionException.cs (1)
16public sealed class SwitchExpressionException : InvalidOperationException
System.Threading.Channels (2)
System\Threading\Channels\ChannelClosedException.cs (1)
7public partial class ChannelClosedException : InvalidOperationException
System\Threading\Channels\ChannelClosedException.netcoreapp.cs (1)
11public partial class ChannelClosedException : InvalidOperationException
UIAutomationTypes (1)
System\Windows\Automation\ElementNotEnabledException.cs (1)
24public class ElementNotEnabledException : InvalidOperationException
6564 instantiations of InvalidOperationException
AndroidAppBuilder (4)
ApkBuilder.cs (3)
98throw new InvalidOperationException("Interpreter and AOT cannot be enabled at the same time"); 177throw new InvalidOperationException("Need list of AOT files."); 413throw new InvalidOperationException("Didn't find any .class files");
src\tasks\Common\DexBuilder.cs (1)
42throw new InvalidOperationException("Didn't find any .class files");
AppleAppBuilder (1)
AppleAppBuilder.cs (1)
293throw new InvalidOperationException("Need list of AOT files for static linked builds.");
AssemblyStripper (15)
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24256.1\contentFiles\cs\netstandard2.0\Mono.Cecil\FunctionPointerType.cs (2)
68 set { throw new InvalidOperationException (); } 73 set { throw new InvalidOperationException (); }
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24256.1\contentFiles\cs\netstandard2.0\Mono.Cecil\GenericParameter.cs (4)
75 throw new InvalidOperationException (); 86 throw new InvalidOperationException (); 100 throw new InvalidOperationException (); 107 set { throw new InvalidOperationException (); }
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24256.1\contentFiles\cs\netstandard2.0\Mono.Cecil\MethodSpecification.cs (6)
44 set { throw new InvalidOperationException (); } 49 set { throw new InvalidOperationException (); } 54 set { throw new InvalidOperationException (); } 59 set { throw new InvalidOperationException (); } 64 set { throw new InvalidOperationException (); } 69 set { throw new InvalidOperationException (); }
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24256.1\contentFiles\cs\netstandard2.0\Mono.Cecil\ReflectionHelper.cs (1)
182 throw new InvalidOperationException ("Invalid context");
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24256.1\contentFiles\cs\netstandard2.0\Mono.Cecil\TypeSpecification.cs (2)
49 set { throw new InvalidOperationException (); } 58 set { throw new InvalidOperationException (); }
BasicTestApp (3)
InteropTest\JavaScriptInterop.cs (3)
14public static void ThrowException() => throw new InvalidOperationException("Threw an exception!"); 18=> throw new InvalidOperationException("Threw a sync exception!"); 24throw new InvalidOperationException("Threw an async exception!");
BasicWebSite (11)
ActionDescriptorCreationCounter.cs (1)
38throw new InvalidOperationException("No actions found!");
Controllers\AsyncDisposableController.cs (1)
42throw new InvalidOperationException("Exception during disposal!");
Controllers\TempDataController.cs (1)
110throw new InvalidOperationException($"Exception from action {nameof(UnhandledExceptionAndSettingTempData)}");
Filters\RequestIdService.cs (1)
13throw new InvalidOperationException();
RequestIdMiddleware.cs (1)
21throw new InvalidOperationException("RequestId should be null here");
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
20throw new InvalidOperationException("ActionContext should not be null here.");
StartupRequestLimitSize.cs (4)
79throw new InvalidOperationException("Request content size is greater than the limit size"); 88throw new InvalidOperationException("Request content size is greater than the limit size"); 98throw new InvalidOperationException("Request content size is greater than the limit size"); 107throw new InvalidOperationException("Request content size is greater than the limit size");
StartupWithoutEndpointRouting.cs (1)
64throw new InvalidOperationException("Needs a request context!");
Benchmarks (1)
Program.cs (1)
57throw new InvalidOperationException(
ClientSample (3)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
Tcp\BufferExtensions.cs (1)
22throw new InvalidOperationException("Buffer backed by array was expected");
Tcp\TcpHubConnectionBuilderExtensions.cs (1)
22throw new InvalidOperationException($"URI Scheme {uri.Scheme} not supported.");
CodeGenerator (1)
HttpUtilities\HttpUtilities.cs (1)
46throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Generated {0} not found.", nameof(mask)));
Diagnostics.EFCore.FunctionalTests (1)
DatabaseErrorPageMiddlewareTest.cs (1)
92throw new InvalidOperationException("Exception requested from TestMiddleware");
dotnet-dev-certs (10)
src\Shared\CertificateGeneration\CertificateManager.cs (4)
524throw new InvalidOperationException("Unknown format."); 707throw new InvalidOperationException($"'{nameof(RemoveLocations.Undefined)}' is not a valid location."); 719throw new InvalidOperationException("Invalid location."); 749throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
105throw new InvalidOperationException("There was an error trusting the certificate."); 260throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'. 277throw new InvalidOperationException($"Can't determine the subject for the certificate with subject '{certificate.Subject}'."); 361throw new InvalidOperationException("Failed to add the certificate to the keychain. Are you running in a non-interactive session perhaps?");
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
54throw new InvalidOperationException("Trusting the certificate is not supported on linux");
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
dotnet-getdocument (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
dotnet-openapi (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
dotnet-razorpagegenerator (1)
Program.cs (1)
210throw new InvalidOperationException($"Invalid include file format in {_source.PhysicalPath}. Usage example: <%$ include: ErrorPage.js %>");
dotnet-sql-cache (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
dotnet-user-jwts (3)
Helpers\ConsoleTable.cs (2)
34throw new InvalidOperationException("Columns must be set before rows can be added."); 39throw new InvalidOperationException(
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
dotnet-user-secrets (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
ExceptionHandlerSample (1)
StartupWithWebSocket.cs (1)
34throw new InvalidOperationException("Throw after websocket request completion to produce the bug");
FormatterWebSite (1)
Controllers\ValidationController.cs (1)
40throw new InvalidOperationException();
GenericHostWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
20throw new InvalidOperationException("ActionContext should not be null here.");
GetDocument.Insider (4)
.packages\microsoft.extensions.hostfactoryresolver.sources\9.0.0-preview.5.24265.2\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
246_hostTcs.TrySetException(new InvalidOperationException("The entry point exited without ever building an IHost.")); 285throw new InvalidOperationException($"Timed out waiting for the entry point to build the IHost after {s_defaultWaitTimeout}. This timeout can be modified using the '{TimeoutEnvironmentKey}' environment variable.");
Commands\GetDocumentCommand.cs (1)
84throw new InvalidOperationException(
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
HelixTestRunner (1)
ProcessUtil.cs (1)
158processLifetimeTask.TrySetException(new InvalidOperationException($"Command {filename} {arguments} returned exit code {process.ExitCode} output: {outputBuilder.ToString()}"));
http2cat (5)
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
61throw new InvalidOperationException("Buffer backed by array was expected");
src\Shared\ServerInfrastructure\StringUtilities.cs (4)
36throw new InvalidOperationException(); 45throw new InvalidOperationException(); 88throw new InvalidOperationException(); 113throw new InvalidOperationException();
HttpClientApp (2)
src\Shared\TestResources.cs (2)
26throw new InvalidOperationException("Cannot acquire the global certificate mutex."); 63throw new InvalidOperationException("Cannot acquire the global certificate mutex.");
Identity.DefaultUI.WebSite (2)
src\Identity\test\InMemory.Test\InMemoryUserStore.cs (1)
257throw new InvalidOperationException("Unknown user");
StartupBase.cs (1)
112throw new InvalidOperationException($"Unknown provider '{currentProvider.GetType().Name}'");
IdentitySample.DefaultUI (2)
Areas\Identity\Pages\Account\Manage\Index.cshtml.cs (2)
95throw new InvalidOperationException($"Unexpected error ocurred updating the profile for user with ID '{user.Id}'"); 103throw new InvalidOperationException($"Unexpected error occurred setting phone number for user with ID '{user.Id}'.");
IIS.FunctionalTests (10)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (1)
61throw new InvalidOperationException($"Exit code {process.ExitCode} when running {fileName} {arguments}. Stdout: {process.StandardOutput.ReadToEnd()} Stderr: {process.StandardError.ReadToEnd()}");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
98throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
125throw new InvalidOperationException($"Didn't get response that satisfies predicate after {RetryRequestCount} retries");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (2)
76throw new InvalidOperationException("Test instance is already attached to this fixture"); 86throw new InvalidOperationException("Different test is attached to this fixture");
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
61throw new InvalidOperationException("Buffer backed by array was expected");
src\Shared\ServerInfrastructure\StringUtilities.cs (4)
36throw new InvalidOperationException(); 45throw new InvalidOperationException(); 88throw new InvalidOperationException(); 113throw new InvalidOperationException();
IIS.LongTests (10)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (1)
61throw new InvalidOperationException($"Exit code {process.ExitCode} when running {fileName} {arguments}. Stdout: {process.StandardOutput.ReadToEnd()} Stderr: {process.StandardError.ReadToEnd()}");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
98throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
125throw new InvalidOperationException($"Didn't get response that satisfies predicate after {RetryRequestCount} retries");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (2)
76throw new InvalidOperationException("Test instance is already attached to this fixture"); 86throw new InvalidOperationException("Different test is attached to this fixture");
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
61throw new InvalidOperationException("Buffer backed by array was expected");
src\Shared\ServerInfrastructure\StringUtilities.cs (4)
36throw new InvalidOperationException(); 45throw new InvalidOperationException(); 88throw new InvalidOperationException(); 113throw new InvalidOperationException();
IIS.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
53throw new InvalidOperationException(message);
IIS.NewHandler.FunctionalTests (10)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (1)
61throw new InvalidOperationException($"Exit code {process.ExitCode} when running {fileName} {arguments}. Stdout: {process.StandardOutput.ReadToEnd()} Stderr: {process.StandardError.ReadToEnd()}");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
98throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
125throw new InvalidOperationException($"Didn't get response that satisfies predicate after {RetryRequestCount} retries");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (2)
76throw new InvalidOperationException("Test instance is already attached to this fixture"); 86throw new InvalidOperationException("Different test is attached to this fixture");
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
61throw new InvalidOperationException("Buffer backed by array was expected");
src\Shared\ServerInfrastructure\StringUtilities.cs (4)
36throw new InvalidOperationException(); 45throw new InvalidOperationException(); 88throw new InvalidOperationException(); 113throw new InvalidOperationException();
IIS.NewShim.FunctionalTests (10)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (1)
61throw new InvalidOperationException($"Exit code {process.ExitCode} when running {fileName} {arguments}. Stdout: {process.StandardOutput.ReadToEnd()} Stderr: {process.StandardError.ReadToEnd()}");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
98throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
125throw new InvalidOperationException($"Didn't get response that satisfies predicate after {RetryRequestCount} retries");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (2)
76throw new InvalidOperationException("Test instance is already attached to this fixture"); 86throw new InvalidOperationException("Different test is attached to this fixture");
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
61throw new InvalidOperationException("Buffer backed by array was expected");
src\Shared\ServerInfrastructure\StringUtilities.cs (4)
36throw new InvalidOperationException(); 45throw new InvalidOperationException(); 88throw new InvalidOperationException(); 113throw new InvalidOperationException();
IIS.ShadowCopy.Tests (10)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (1)
61throw new InvalidOperationException($"Exit code {process.ExitCode} when running {fileName} {arguments}. Stdout: {process.StandardOutput.ReadToEnd()} Stderr: {process.StandardError.ReadToEnd()}");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
98throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
125throw new InvalidOperationException($"Didn't get response that satisfies predicate after {RetryRequestCount} retries");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (2)
76throw new InvalidOperationException("Test instance is already attached to this fixture"); 86throw new InvalidOperationException("Different test is attached to this fixture");
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
61throw new InvalidOperationException("Buffer backed by array was expected");
src\Shared\ServerInfrastructure\StringUtilities.cs (4)
36throw new InvalidOperationException(); 45throw new InvalidOperationException(); 88throw new InvalidOperationException(); 113throw new InvalidOperationException();
IIS.Tests (1)
Utilities\TestServer.cs (1)
112throw new InvalidOperationException($"Error while running WebCoreActivate: {startResult} on port {_currentPort}");
IISExpress.FunctionalTests (12)
InProcess\WebSocketTests.cs (2)
99throw new InvalidOperationException("The response status code was incorrect: " + statusLine); 119throw new InvalidOperationException("The response status code was incorrect: " + statusLine);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (1)
61throw new InvalidOperationException($"Exit code {process.ExitCode} when running {fileName} {arguments}. Stdout: {process.StandardOutput.ReadToEnd()} Stderr: {process.StandardError.ReadToEnd()}");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
98throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
125throw new InvalidOperationException($"Didn't get response that satisfies predicate after {RetryRequestCount} retries");
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (2)
76throw new InvalidOperationException("Test instance is already attached to this fixture"); 86throw new InvalidOperationException("Different test is attached to this fixture");
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
61throw new InvalidOperationException("Buffer backed by array was expected");
src\Shared\ServerInfrastructure\StringUtilities.cs (4)
36throw new InvalidOperationException(); 45throw new InvalidOperationException(); 88throw new InvalidOperationException(); 113throw new InvalidOperationException();
ILCompiler.DependencyAnalysisFramework (1)
DependencyAnalyzer.cs (1)
134throw new InvalidOperationException();
illink (32)
ILLink.RoslynAnalyzer (19)
CompilationExtensions.cs (1)
161 _ => throw new InvalidOperationException ("Unreachable"),
DataFlow\ControlFlowGraphProxy.cs (3)
43 _ => throw new InvalidOperationException () 157 throw new InvalidOperationException (); 203 throw new InvalidOperationException ();
DataFlow\LocalDataFlowVisitor.cs (1)
247 _ => throw new InvalidOperationException ()
IMethodSymbolExtensions.cs (1)
41 throw new InvalidOperationException ($"Cannot get parameter at index {(int) index} of method {method.GetDisplayName ()} with {method.GetParametersCount ()} parameters.");
src\tools\illink\src\ILLink.Shared\DataFlow\ForwardDataFlowAnalysis.cs (1)
140 throw new InvalidOperationException ();
src\tools\illink\src\ILLink.Shared\DiagnosticString.cs (4)
19 _titleFormat = resourceManager.GetString ($"{diagnosticId}Title") ?? throw new InvalidOperationException ($"{diagnosticId} does not have a matching resource called {diagnosticId}Title"); 20 _messageFormat = resourceManager.GetString ($"{diagnosticId}Message") ?? throw new InvalidOperationException ($"{diagnosticId} does not have a matching resource called {diagnosticId}Message"); 26 _titleFormat = resourceManager.GetString ($"{diagnosticResourceStringName}Title") ?? throw new InvalidOperationException ($"{diagnosticResourceStringName} does not have a matching resource called {diagnosticResourceStringName}Title"); 27 _messageFormat = resourceManager.GetString ($"{diagnosticResourceStringName}Message") ?? throw new InvalidOperationException ($"{diagnosticResourceStringName} does not have a matching resource called {diagnosticResourceStringName}Message");
src\tools\illink\src\ILLink.Shared\TrimAnalysis\HandleCallAction.cs (2)
53 throw new InvalidOperationException ($"Internal trimming error: processing of call from {GetContainingSymbolDisplayName ()} to {calledMethod.GetDisplayName ()} returned value which is not correctly annotated with the expected dynamic member access kinds."); 60 throw new InvalidOperationException ($"Internal trimming error: processing of call from {GetContainingSymbolDisplayName ()} to {calledMethod.GetDisplayName ()} returned value which is not correctly annotated with the expected dynamic member access kinds.");
src\tools\illink\src\ILLink.Shared\TypeSystemProxy\ParameterProxy.cs (2)
17 throw new InvalidOperationException ($"Parameter of index {(int) index} does not exist on method {method.GetDisplayName ()} with {method.GetParametersCount ()}"); 35 throw new InvalidOperationException ("Cannot get metadata index of the implicit 'this' parameter");
TrimAnalysis\DiagnosticContext.cs (1)
68 _ => throw new InvalidOperationException ()
TrimAnalysis\FlowAnnotations.cs (3)
118 throw new InvalidOperationException ($"Cannot get 'this' parameter of method {method.GetDisplayName ()} with no 'this' parameter."); 126 throw new InvalidOperationException ($"Cannot get 'this' parameter of method {method.GetDisplayName ()} with no 'this' parameter."); 133 throw new InvalidOperationException ($"Cannot get 'this' parameter of method {method.GetDisplayName ()} with no 'this' parameter.");
ILLink.Tasks (1)
LinkTask.cs (1)
239 throw new InvalidOperationException ($"{DotNetHostPathEnvironmentName} is not set");
InMemory.FunctionalTests (32)
ConnectionMiddlewareTests.cs (2)
154listenOptions.Use(next => context => throw new InvalidOperationException()); 237throw new InvalidOperationException();
EventSourceTests.cs (1)
173throw new InvalidOperationException();
Http2\Http2ConnectionTests.cs (2)
564throw new InvalidOperationException("Put the stream into an invalid state by throwing after writing to response."); 1685await InitializeConnectionAsync(_ => Task.FromException(new InvalidOperationException("No requests should be processed")));
Http2\Http2EndToEndTests.cs (1)
55throw new InvalidOperationException();
KestrelMetricsTests.cs (2)
240throw new InvalidOperationException("Test"); 364throw new InvalidOperationException();
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (1)
207throw new InvalidOperationException();
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (12)
180throw new InvalidOperationException($"Expected error code {expectedErrorCode}, got {currentError}."); 192throw new InvalidOperationException("Failed to read GO_AWAY stream ID."); 196throw new InvalidOperationException($"Expected stream ID {expectedLastStreamId}, got {streamId}."); 259throw new InvalidOperationException($"Expected {expected} frame. Got {actual}."); 524throw new InvalidOperationException("End not received."); 561throw new InvalidOperationException("No data received."); 631throw new InvalidOperationException("Stream not ended."); 643throw new InvalidOperationException($"Expected error code {protocolError}, got {(Http3ErrorCode)Error}."); 701throw new InvalidOperationException("The headers are too large."); 763throw new InvalidOperationException("End of stream not received."); 975throw new InvalidOperationException("Failed to read GO_AWAY stream ID."); 979throw new InvalidOperationException($"Expected stream ID {expectedLastStreamId}, got {streamId}.");
src\Servers\Kestrel\shared\test\TestApplicationErrorLogger.cs (1)
43throw new InvalidOperationException($"{nameof(WaitForMessage)} cannot be called concurrently.");
src\Shared\Buffers.MemoryPool\MemoryPoolThrowHelper.cs (8)
32throw new InvalidOperationException(GenerateMessage("Can't unpin, pin count is zero", block)); 37throw new InvalidOperationException(GenerateMessage("Disposing pinned block", block)); 42throw new InvalidOperationException("Object is being disposed twice"); 47throw new InvalidOperationException(GenerateMessage("Block is being disposed twice", block)); 52throw new InvalidOperationException(GenerateMessage("Block is being returned to disposed pool", block)); 57throw new InvalidOperationException(GenerateMessage("Block is backed by disposed slab", block)); 62throw new InvalidOperationException(GenerateMessage($"Memory pool with active blocks is being disposed, {returned} of {total} returned", blocks)); 67throw new InvalidOperationException(GenerateMessage($"Blocks were not returned in time, {returned} of {total} returned ", blocks));
src\Shared\TestResources.cs (2)
26throw new InvalidOperationException("Cannot acquire the global certificate mutex."); 63throw new InvalidOperationException("Cannot acquire the global certificate mutex.");
InProcessWebSite (2)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Program.cs (1)
54throw new InvalidOperationException("Program.Main exception");
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\ThrowingStartup.cs (1)
14throw new InvalidOperationException("From Configure");
Interop.FunctionalTests (11)
H2SpecCommands.cs (3)
136throw new InvalidOperationException("Unrecognized line: " + line); 165throw new InvalidOperationException("Unrecognized line: " + line); 297throw new InvalidOperationException("No test case results found.");
Http3\Http3RequestTests.cs (3)
754throw new InvalidOperationException(); 1343throw new InvalidOperationException(); 1635throw new InvalidOperationException();
HttpClientHttp2InteropTests.cs (3)
473throw new InvalidOperationException("Sending hasn't started yet."); 509throw new InvalidOperationException("Sending hasn't started yet."); 1731throw new InvalidOperationException("Unexpected end of stream");
src\Shared\TestResources.cs (2)
26throw new InvalidOperationException("Cannot acquire the global certificate mutex."); 63throw new InvalidOperationException("Cannot acquire the global certificate mutex.");
InteropClient (11)
Assert.cs (11)
29throw new InvalidOperationException("Expected true but got false."); 37throw new InvalidOperationException("Expected false but got true."); 45throw new InvalidOperationException($"Expected {expected} but got {actual}."); 53throw new InvalidOperationException("Expected not null but got null."); 59throw new InvalidOperationException("Failure assert."); 75throw new InvalidOperationException($"Expected ${typeof(TException)} but got ${ex.GetType()}."); 78throw new InvalidOperationException("No exception thrown."); 94throw new InvalidOperationException($"Expected ${typeof(TException)} but got ${ex.GetType()}."); 97throw new InvalidOperationException("No exception thrown."); 110throw new InvalidOperationException($"Could not find {expected} in the collection."); 120throw new InvalidOperationException($"Collection lengths differ. {expected.Count} but got {actual.Count}.");
InteropTests (3)
Helpers\WebsiteProcess.cs (1)
58return Task.FromException(new InvalidOperationException("Server is not running."));
InteropTests.cs (2)
96throw new InvalidOperationException(errorMessage, ex); 125throw new InvalidOperationException(errorMessage, ex);
KeyManagementSimulator (2)
Program.cs (2)
273_ => throw new InvalidOperationException(), 510throw new InvalidOperationException("Flakiness!");
Microsoft.Arcade.Common (3)
Command.cs (3)
196throw new InvalidOperationException("Already handling stdout!"); 208throw new InvalidOperationException("Already handling stderr!"); 252throw new InvalidOperationException($"Unable to invoke {memberName} after the command has been run");
Microsoft.Arcade.Test.Common (1)
FakeHttpClient.cs (1)
37throw new InvalidOperationException($"Unexpected end of response sequence. Number of predefined responses should be at least equal to number of requests invoked by HttpClient.");
Microsoft.AspNetCore (9)
BootstrapHostBuilder.cs (6)
35throw new InvalidOperationException($"{nameof(HostBuilderContext)} must exist in the {nameof(IServiceCollection)}"); 64throw new InvalidOperationException(); 70throw new InvalidOperationException(); 76throw new InvalidOperationException(); 82throw new InvalidOperationException(); 119return genericWebHostServiceDescriptor ?? throw new InvalidOperationException($"GenericWebHostedService must exist in the {nameof(IServiceCollection)}");
WebApplication.cs (2)
242throw new InvalidOperationException($"Changing the URL is not supported because no valid {nameof(IServerAddressesFeature)} was found."); 246throw new InvalidOperationException($"Changing the URL is not supported because {nameof(IServerAddressesFeature.Addresses)} {nameof(ICollection<string>.IsReadOnly)}.");
WebApplicationBuilder.cs (1)
304throw new InvalidOperationException($"Failed to convert configuration value at '{configuration.GetSection(reloadConfigOnChangeKey).Path}' to type '{typeof(bool)}'.");
Microsoft.AspNetCore.Analyzer.Testing (1)
CodeFixRunner.cs (1)
57throw new InvalidOperationException($"Compilation failed:{Environment.NewLine}{message}");
Microsoft.AspNetCore.Antiforgery (4)
AntiforgeryApplicationBuilderExtensions.cs (1)
36throw new InvalidOperationException("Unable to find the required services. Please add all the required services by calling 'IServiceCollection.AddAntiforgery' in the application startup code.");
Internal\DefaultAntiforgery.cs (1)
260throw new InvalidOperationException(Resources.FormatAntiforgery_RequiresSSL(
Internal\DefaultAntiforgeryTokenGenerator.cs (1)
82throw new InvalidOperationException(
Internal\DefaultClaimUidExtractor.cs (1)
139throw new InvalidOperationException();
Microsoft.AspNetCore.App.Analyzers (24)
Infrastructure\AmbiguousRoutePatternComparer.cs (3)
35_ => throw new InvalidOperationException($"Unexpected part type '{xPart.Kind}'."), 70_ => throw new InvalidOperationException($"Unexpected segment node type '{xChild.Kind}'."), 141_ => throw new InvalidOperationException($"Unexpected policy node type '{xPart.Kind}'."),
Infrastructure\RoutePattern\RoutePatternNodes.cs (10)
92_ => throw new InvalidOperationException(), 158_ => throw new InvalidOperationException(), 182_ => throw new InvalidOperationException(), 206_ => throw new InvalidOperationException(), 230_ => throw new InvalidOperationException(), 254_ => throw new InvalidOperationException(), 282_ => throw new InvalidOperationException(), 306_ => throw new InvalidOperationException(), 365_ => throw new InvalidOperationException(), 389_ => throw new InvalidOperationException(),
Infrastructure\RoutePattern\RoutePatternTree.cs (1)
34throw new InvalidOperationException($"Couldn't find route parameter '{name}'.");
Infrastructure\VirtualChars\CSharpVirtualCharService.cs (2)
151throw new InvalidOperationException("String should start with quote."); 159throw new InvalidOperationException("String should end with quote.");
Infrastructure\VirtualChars\VirtualChar.cs (1)
74throw new InvalidOperationException("If surrogateChar is provided then rune must be Rune.ReplacementChar");
Mvc\MvcAnalyzer.cs (1)
145_ => throw new InvalidOperationException("Unexpected well known type:" + match),
RouteEmbeddedLanguage\Infrastructure\RoutePatternParametersDetector.cs (1)
71_ => throw new InvalidOperationException("Unexpected symbol type: " + symbol)
RouteEmbeddedLanguage\Infrastructure\SyntaxNodeExtensions.cs (1)
20=> node.Parent ?? throw new InvalidOperationException("Node's parent was null");
RouteEmbeddedLanguage\Infrastructure\SyntaxTokenExtensions.cs (1)
25=> token.Parent ?? throw new InvalidOperationException("Token's parent was null");
src\Shared\Roslyn\MvcFacts.cs (1)
107throw new InvalidOperationException($"{nameof(method.OverriddenMethod)} cannot be null.");
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
149_ => throw new InvalidOperationException("Unexpected symbol type: " + symbol)
src\Shared\RoslynUtils\WellKnownTypes.cs (1)
80throw new InvalidOperationException($"Failed to resolve well-known type '{WellKnownTypeData.WellKnownTypeNames[index]}'.");
Microsoft.AspNetCore.App.Analyzers.Test (1)
RouteEmbeddedLanguage\Infrastructure\MarkupTestFile.cs (1)
158throw new InvalidOperationException();
Microsoft.AspNetCore.App.CodeFixes (1)
RouteParameterUnusedParameterFixer.cs (1)
94_ => throw new InvalidOperationException($"Unexpected method syntax: {methodSyntax.GetType().FullName}")
Microsoft.AspNetCore.Authentication (4)
AuthenticationConfigurationProviderExtensions.cs (1)
27throw new InvalidOperationException("There was no top-level authentication property found in configuration.");
RemoteAuthenticationHandler.cs (2)
90exception = new InvalidOperationException("Invalid return state, unable to redirect."); 102exception = authResult.Failure ?? new InvalidOperationException("Invalid return state, unable to redirect.");
RemoteAuthenticationOptions.cs (1)
43throw new InvalidOperationException(Resources.Exception_RemoteSignInSchemeCannotBeSelf);
Microsoft.AspNetCore.Authentication.Abstractions (3)
AuthenticationHttpContextExtensions.cs (1)
218throw new InvalidOperationException(Resources.FormatException_UnableToFindServices(
AuthenticationOptions.cs (1)
39throw new InvalidOperationException("Scheme already exists: " + name);
AuthenticationSchemeBuilder.cs (1)
46throw new InvalidOperationException($"{nameof(HandlerType)} must be configured to build an {nameof(AuthenticationScheme)}.");
Microsoft.AspNetCore.Authentication.BearerToken (2)
BearerTokenOptions.cs (2)
50get => _bearerTokenProtector ?? throw new InvalidOperationException($"{nameof(BearerTokenProtector)} was not set."); 61get => _refreshTokenProtector ?? throw new InvalidOperationException($"{nameof(RefreshTokenProtector)} was not set.");
Microsoft.AspNetCore.Authentication.Cookies (1)
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
180throw new InvalidOperationException("The cookie key and options are larger than ChunksSize, leaving no room for data.");
Microsoft.AspNetCore.Authentication.Core (19)
AuthenticationSchemeProvider.cs (2)
170throw new InvalidOperationException("Scheme already exists: " + scheme.Name); 176throw new InvalidOperationException("Scheme already exists: " + scheme.Name);
AuthenticationService.cs (17)
67throw new InvalidOperationException($"No authenticationScheme was specified, and there was no DefaultAuthenticateScheme found. The default schemes can be set using either AddAuthentication(string defaultScheme) or AddAuthentication(Action<AuthenticationOptions> configureOptions)."); 115throw new InvalidOperationException($"No authenticationScheme was specified, and there was no DefaultChallengeScheme found. The default schemes can be set using either AddAuthentication(string defaultScheme) or AddAuthentication(Action<AuthenticationOptions> configureOptions)."); 143throw new InvalidOperationException($"No authenticationScheme was specified, and there was no DefaultForbidScheme found. The default schemes can be set using either AddAuthentication(string defaultScheme) or AddAuthentication(Action<AuthenticationOptions> configureOptions)."); 172throw new InvalidOperationException("SignInAsync when principal.Identity == null is not allowed when AuthenticationOptions.RequireAuthenticatedSignIn is true."); 176throw new InvalidOperationException("SignInAsync when principal.Identity.IsAuthenticated is false is not allowed when AuthenticationOptions.RequireAuthenticatedSignIn is true."); 186throw new InvalidOperationException($"No authenticationScheme was specified, and there was no DefaultSignInScheme found. The default schemes can be set using either AddAuthentication(string defaultScheme) or AddAuthentication(Action<AuthenticationOptions> configureOptions)."); 220throw new InvalidOperationException($"No authenticationScheme was specified, and there was no DefaultSignOutScheme found. The default schemes can be set using either AddAuthentication(string defaultScheme) or AddAuthentication(Action<AuthenticationOptions> configureOptions)."); 247return new InvalidOperationException( 251return new InvalidOperationException( 271return new InvalidOperationException( 275return new InvalidOperationException( 288return new InvalidOperationException(mismatchError 292return new InvalidOperationException(mismatchError + $"The registered sign-in schemes are: {schemes}."); 311return new InvalidOperationException($"No sign-out authentication handlers are registered." + footer); 314return new InvalidOperationException( 327return new InvalidOperationException(mismatchError 331return new InvalidOperationException(mismatchError + $"The registered sign-out schemes are: {schemes}.");
Microsoft.AspNetCore.Authentication.JwtBearer (1)
JwtBearerPostConfigureOptions.cs (1)
49throw new InvalidOperationException("The MetadataAddress or Authority must use HTTPS unless disabled for development by setting RequireHttpsMetadata=false.");
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (2)
src\Tools\Shared\TestHelpers\TemporaryCSharpProject.cs (1)
117throw new InvalidOperationException("Can add project reference to self");
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (1)
71throw new InvalidOperationException("This is the root directory");
Microsoft.AspNetCore.Authentication.Negotiate (5)
NegotiateHandler.cs (4)
103throw new InvalidOperationException("An anonymous request was received in between authentication handshake requests."); 118throw new InvalidOperationException("Non-negotiate request was received in between authentication handshake requests."); 299throw new InvalidOperationException("AuthenticateAsync must not be called before the UseAuthentication middleware runs."); 319throw new InvalidOperationException("Attempting to use an incomplete authentication context.");
PostConfigureNegotiateOptions.cs (1)
58throw new InvalidOperationException("The Negotiate Authentication handler cannot be used on a server that directly supports Windows Authentication."
Microsoft.AspNetCore.Authentication.Negotiate.Test (8)
EventTests.cs (4)
505throw new InvalidOperationException("Authentication has not started yet."); 524throw new InvalidOperationException("Authentication is not complete."); 537throw new InvalidOperationException("Authentication is already complete."); 586ex = new InvalidOperationException(incomingBlob);
NegotiateHandlerTests.cs (4)
529throw new InvalidOperationException("Authentication has not started yet."); 548throw new InvalidOperationException("Authentication is not complete."); 561throw new InvalidOperationException("Authentication is already complete."); 610ex = new InvalidOperationException(incomingBlob);
Microsoft.AspNetCore.Authentication.OpenIdConnect (6)
OpenIdConnectHandler.cs (4)
148throw new InvalidOperationException("An error was returned from the RemoteSignOut event.", remoteSignOutContext.Result.Failure); 272throw new InvalidOperationException("Cannot redirect to the end session endpoint, the configuration may be missing or invalid."); 345throw new InvalidOperationException("An error was returned from the SignedOutCallbackRedirect event.", signOut.Result.Failure); 484throw new InvalidOperationException(
OpenIdConnectOptions.cs (1)
109throw new InvalidOperationException($"Provide {nameof(Authority)}, {nameof(MetadataAddress)}, "
OpenIdConnectPostConfigureOptions.cs (1)
97throw new InvalidOperationException("The MetadataAddress or Authority must use HTTPS unless disabled for development by setting RequireHttpsMetadata=false.");
Microsoft.AspNetCore.Authentication.Test (3)
OAuthTests.cs (1)
306opt.Events.OnRemoteFailure = context => throw new InvalidOperationException("This event should not be called.");
OpenIdConnect\TestSettings.cs (1)
207throw new InvalidOperationException($"Unknown parameter \"{paramToValidate}\".");
TwitterTests.cs (1)
198o.Events.OnRemoteFailure = context => throw new InvalidOperationException("This event should not be called.");
Microsoft.AspNetCore.Authentication.Twitter (1)
TwitterHandler.cs (1)
398throw new InvalidOperationException(errorMessageStringBuilder.ToString());
Microsoft.AspNetCore.Authentication.WsFederation (2)
WsFederationOptions.cs (1)
60throw new InvalidOperationException($"Provide {nameof(MetadataAddress)}, "
WsFederationPostConfigureOptions.cs (1)
81throw new InvalidOperationException("The MetadataAddress must use HTTPS unless disabled for development by setting RequireHttpsMetadata=false.");
Microsoft.AspNetCore.Authorization (4)
AuthorizationPolicy.cs (2)
36throw new InvalidOperationException(Resources.Exception_AuthorizationPolicyEmpty); 146throw new InvalidOperationException(Resources.FormatException_AuthorizationPolicyNotFound(authorizeDatum.Policy));
DefaultAuthorizationService.cs (1)
106throw new InvalidOperationException($"No policy found: {policyName}.");
RolesAuthorizationRequirement.cs (1)
28throw new InvalidOperationException(Resources.Exception_RoleRequirementEmpty);
Microsoft.AspNetCore.Authorization.Policy (1)
AuthorizationAppBuilderExtensions.cs (1)
42throw new InvalidOperationException(Resources.FormatException_UnableToFindServices(
Microsoft.AspNetCore.BrowserTesting (5)
BrowserManager.cs (2)
74_ => throw new InvalidOperationException("Unsupported browser type.") 130throw new InvalidOperationException("Invalid browser instance.");
BrowserManagerConfiguration.cs (3)
53throw new InvalidOperationException($"Browser '{browser}' is not configured."); 66Combine(GetContextOptions(browser.ToString()), ContextOptions.TryGetValue(contextName, out var context) ? context : throw new InvalidOperationException("Invalid context name")); 94throw new InvalidOperationException("Browsers not configured.");
Microsoft.AspNetCore.Components (98)
BindConverter.cs (2)
1835throw new InvalidOperationException( 2038throw new InvalidOperationException(
CascadingParameterState.cs (1)
68throw new InvalidOperationException($"'{info.Attribute.GetType()}' is flagged with SingleDelivery, but the selected supplier '{supplier.GetType()}' is not flagged with {nameof(ICascadingValueSupplier.IsFixed)}");
CascadingValue.cs (2)
96throw new InvalidOperationException($"The value of {nameof(IsFixed)} cannot be changed dynamically."); 154throw new InvalidOperationException($"Cannot subscribe to a {typeof(CascadingValue<>).Name} when {nameof(IsFixed)} is true.");
CascadingValueSource.cs (1)
88throw new InvalidOperationException($"Cannot notify about changes because the {GetType()} is configured as fixed.");
ComponentBase.cs (1)
231throw new InvalidOperationException($"The render handle is already set. Cannot initialize a {nameof(ComponentBase)} more than once.");
ComponentFactory.cs (5)
66: throw new InvalidOperationException($"The component type '{componentType}' has a fixed rendermode of '{componentTypeRenderMode}', so it is not valid to specify any rendermode when using this component."); 73throw new InvalidOperationException($"The component activator returned a null value for a component of type {componentType.FullName}."); 135throw new InvalidOperationException($"Cannot provide a value for property " + 142?? throw new InvalidOperationException($"Cannot provide a value for property " + 149?? throw new InvalidOperationException($"Cannot provide a value for property " +
Dispatcher.cs (1)
40throw new InvalidOperationException(
DynamicComponent.cs (2)
79throw new InvalidOperationException( 86throw new InvalidOperationException($"{nameof(DynamicComponent)} requires a non-null value for the parameter {nameof(Type)}.");
Infrastructure\ComponentStatePersistenceManager.cs (1)
55throw new InvalidOperationException("State already persisted.");
NavigationManager.cs (3)
192throw new InvalidOperationException($"'{GetType().Name}' already initialized."); 464=> throw new InvalidOperationException($"To support navigation locks, {GetType().Name} must override {nameof(HandleLocationChangingHandlerException)}"); 515throw new InvalidOperationException($"'{GetType().Name}' has not been initialized.");
NavigationManagerExtensions.cs (4)
127throw new InvalidOperationException("Cannot append parameter after hash was added."); 166throw new InvalidOperationException(EmptyQueryParameterNameExceptionMessage); 528throw new InvalidOperationException(EmptyQueryParameterNameExceptionMessage); 723throw new InvalidOperationException(
OwningComponentBase.cs (1)
37throw new InvalidOperationException("Services cannot be accessed before the component is initialized.");
PersistentComponentState.cs (2)
34throw new InvalidOperationException("PersistentComponentState already initialized."); 79throw new InvalidOperationException("Persisting state is only allowed during an OnPersisting callback.");
Reflection\ComponentProperties.cs (11)
171throw new InvalidOperationException( 193throw new InvalidOperationException( 200throw new InvalidOperationException( 206throw new InvalidOperationException( 215throw new InvalidOperationException( 223throw new InvalidOperationException( 231throw new InvalidOperationException( 251throw new InvalidOperationException( 261throw new InvalidOperationException( 312throw new InvalidOperationException( 324throw new InvalidOperationException(
Reflection\PropertySetter.cs (1)
25throw new InvalidOperationException("Cannot provide a value for property " +
RenderHandle.cs (4)
52?? throw new InvalidOperationException("No renderer has been initialized."); 57public ComponentPlatform Platform => _renderer?.ComponentPlatform ?? throw new InvalidOperationException("No renderer has been initialized."); 69throw new InvalidOperationException("No renderer has been initialized."); 105throw new InvalidOperationException("The render handle is not yet assigned.");
Rendering\ParameterViewLifetime.cs (1)
25throw new InvalidOperationException($"The {nameof(ParameterView)} instance can no longer be read because it has expired. {nameof(ParameterView)} can only be read synchronously and must not be stored for later use.");
Rendering\RenderTreeBuilder.cs (14)
170throw new InvalidOperationException($"Valueless attributes may only be added immediately after frames of type {RenderTreeFrameType.Element}"); 473throw new InvalidOperationException("No preceding attribute frame exists."); 479throw new InvalidOperationException($"Incorrect frame type: '{prevFrame.FrameTypeField}'"); 536throw new InvalidOperationException("Cannot set a key outside the scope of a component or element."); 550throw new InvalidOperationException($"Cannot set a key on a frame of type {parentFrame.FrameTypeField}."); 596throw new InvalidOperationException($"Element reference captures may only be added as children of frames of type {RenderTreeFrameType.Element}"); 613throw new InvalidOperationException(ComponentReferenceCaptureInvalidParentMessage); 619throw new InvalidOperationException(ComponentReferenceCaptureInvalidParentMessage); 647throw new InvalidOperationException("There is no enclosing component frame."); 654throw new InvalidOperationException($"The enclosing frame is not of the required type '{nameof(RenderTreeFrameType.Component)}'."); 679throw new InvalidOperationException($"Named events may only be added as children of frames of type {RenderTreeFrameType.Element}"); 720throw new InvalidOperationException($"Attributes may only be added immediately after frames of type {RenderTreeFrameType.Element} or {RenderTreeFrameType.Component}"); 728throw new InvalidOperationException($"Component parameters may only be added immediately after frames of type {RenderTreeFrameType.Component}"); 783throw new InvalidOperationException($"Render output is invalid for component of type '{component.GetType().FullName}'. A frame of type '{invalidFrame.FrameType}' was left unclosed. Do not use try/catch inside rendering logic, because partial output cannot be undone.");
RenderTree\EventArgsTypeCache.cs (2)
24throw new InvalidOperationException($"The method {methodInfo} cannot be used as an event handler because it declares more than one parameter."); 35throw new InvalidOperationException($"The event handler parameter type {declaredType.FullName} for event must inherit from {typeof(EventArgs).FullName}.");
RenderTree\Renderer.cs (2)
712throw new InvalidOperationException("The specified component is not a root component"); 738throw new InvalidOperationException("Cannot start a batch when one is already in progress.");
RenderTree\RenderTreeDiffBuilder.cs (5)
380throw new InvalidOperationException($"More than one sibling of component '{frame.ComponentTypeField}' has the same key value, '{key}'. Key values must be unique."); 383throw new InvalidOperationException($"More than one sibling of element '{frame.ElementNameField}' has the same key value, '{key}'. Key values must be unique."); 386throw new InvalidOperationException($"More than one sibling has the same key value, '{key}'. Key values must be unique."); 998throw new InvalidOperationException($"{nameof(RenderTreeFrameType.ComponentReferenceCapture)} frame references invalid parent index."); 1005throw new InvalidOperationException($"Trying to initialize {nameof(RenderTreeFrameType.ComponentReferenceCapture)} frame before parent component was assigned.");
RenderTree\RenderTreeFrame.cs (1)
278throw new InvalidOperationException($"The {nameof(ComponentRenderMode)} field only exists on frames of type {nameof(RenderTreeFrameType.ComponentRenderMode)}.");
RenderTree\StackObjectPool.cs (1)
55throw new InvalidOperationException("There are no outstanding instances to return.");
RouteView.cs (1)
63throw new InvalidOperationException($"The {nameof(RouteView)} component requires a non-null value for the parameter {nameof(RouteData)}.");
Routing\QueryParameterValueSupplier.cs (1)
37throw new InvalidOperationException($"Querystring values cannot be parsed as type '{elementType}'.");
Routing\Router.cs (3)
123throw new InvalidOperationException($"The {nameof(Router)} component requires a value for the parameter {nameof(AppAssembly)}."); 131throw new InvalidOperationException($"The {nameof(Router)} component requires a value for the parameter {nameof(Found)}."); 224throw new InvalidOperationException($"The type {context.Handler.FullName} " +
Routing\RouteTableFactory.cs (3)
190throw new InvalidOperationException($"Unable to find the provided template '{template}'"); 219throw new InvalidOperationException($@"The following routes are ambiguous: 334_ => throw new InvalidOperationException("Invalid comparison result."),
Routing\UrlValueConstraint.cs (2)
124throw new InvalidOperationException($"Cannot parse the value '{value.ToString()}' as type '{typeof(T)}' for '{destinationNameForMessage}'."); 144throw new InvalidOperationException($"Cannot parse the value '{values[i]}' as type '{typeof(T)}' for '{destinationNameForMessage}'.");
Sections\SectionContent.cs (2)
53throw new InvalidOperationException($"{nameof(SectionContent)} requires that '{nameof(SectionName)}' and '{nameof(SectionId)}' cannot both have non-null values."); 65throw new InvalidOperationException($"{nameof(SectionContent)} requires a non-null value either for '{nameof(SectionName)}' or '{nameof(SectionId)}'.");
Sections\SectionOutlet.cs (2)
47throw new InvalidOperationException($"{nameof(SectionOutlet)} requires that '{nameof(SectionName)}' and '{nameof(SectionId)}' cannot both have non-null values."); 59throw new InvalidOperationException($"{nameof(SectionOutlet)} requires a non-null value either for '{nameof(SectionName)}' or '{nameof(SectionId)}'.");
Sections\SectionRegistry.cs (5)
33throw new InvalidOperationException($"There are no content providers with the given section ID '{identifier}'."); 40throw new InvalidOperationException($"The provider was not found in the providers list of the given section ID '{identifier}'."); 58throw new InvalidOperationException($"There is already a subscriber to the content with the given section ID '{identifier}'."); 72throw new InvalidOperationException($"The subscriber with the given section ID '{identifier}' is already unsubscribed."); 80throw new InvalidOperationException($"There are no content providers with the given section ID '{identifier}'.");
src\Http\Routing\src\Constraints\RegexErrorStubRouteConstraint.cs (2)
20throw new InvalidOperationException(Resources.RegexRouteContraint_NotConfigured); 30throw new InvalidOperationException(Resources.RegexRouteContraint_NotConfigured);
src\Http\Routing\src\Patterns\RoutePatternFactory.cs (4)
525throw new InvalidOperationException( 586throw new InvalidOperationException(message); 592throw new InvalidOperationException(message); 959throw new InvalidOperationException(Resources.FormatRoutePattern_InvalidConstraintReference(
src\Http\Routing\src\RouteConstraintBuilder.cs (1)
140throw new InvalidOperationException(
src\Http\Routing\src\RouteOptions.cs (1)
167throw new InvalidOperationException($"{type} must implement {typeof(IParameterPolicy)}");
src\Http\Routing\src\Template\RoutePrecedence.cs (1)
138throw new InvalidOperationException("Route exceeds the maximum number of allowed segments of 28 and is unable to be processed.");
src\Shared\UrlDecoder\UrlDecoder.cs (2)
108throw new InvalidOperationException("The path contains null characters."); 446throw new InvalidOperationException("The path contains null characters.");
Microsoft.AspNetCore.Components.Analyzers (1)
InternalUsageAnalyzer.cs (1)
69_ => throw new InvalidOperationException("Unexpected operation kind: " + context.Operation.Kind),
Microsoft.AspNetCore.Components.Analyzers.Tests (1)
Helpers\DiagnosticVerifier.Helper.cs (1)
121throw new InvalidOperationException("Amount of sources did not match amount of Documents created");
Microsoft.AspNetCore.Components.Authorization (2)
AuthorizeViewCore.cs (2)
78throw new InvalidOperationException($"Do not specify both '{nameof(Authorized)}' and '{nameof(ChildContent)}'."); 83throw new InvalidOperationException($"Authorization requires a cascading parameter of type Task<{nameof(AuthenticationState)}>. Consider using {typeof(CascadingAuthenticationState).Name} to supply this.");
Microsoft.AspNetCore.Components.Authorization.Tests (1)
src\Components\Shared\test\TestRenderer.cs (1)
147throw new InvalidOperationException("Did not dispose all the ComponentState instances. This could lead to ArrayBuffer not returning buffers to its pool.");
Microsoft.AspNetCore.Components.Endpoints (65)
Builder\RazorComponentDataSourceOptions.cs (1)
28_ => throw new InvalidOperationException($"Unknown render mode: {obj}"),
Builder\RazorComponentEndpointDataSource.cs (1)
136throw new InvalidOperationException($"Unable to find a provider for the render mode: {renderMode.GetType().FullName}. This generally " +
Builder\RazorComponentsEndpointRouteBuilderExtensions.cs (1)
92throw new InvalidOperationException(Resources.FormatUnableToFindServices(
DependencyInjection\ServerComponentSerializer.cs (2)
38rootComponent.Assembly.GetName().Name ?? throw new InvalidOperationException("Cannot prerender components from assemblies with a null name"), 39rootComponent.FullName ?? throw new InvalidOperationException("Cannot prerender component types with a null name"),
DependencyInjection\UnsupportedJavaScriptRuntime.cs (2)
13=> throw new InvalidOperationException(Message); 16=> throw new InvalidOperationException(Message);
DependencyInjection\UnsupportedNavigationInterception.cs (1)
12throw new InvalidOperationException("Navigation interception calls cannot be issued during server-side static rendering, because the page has not yet loaded in the browser. " +
DependencyInjection\UnsupportedScrollToLocationHash.cs (1)
12throw new InvalidOperationException("Scroll to location hash calls cannot be issued during server-side static rendering, because the page has not yet loaded in the browser.");
DependencyInjection\WebAssemblyComponentSerializer.cs (2)
13var assembly = type.Assembly.GetName().Name ?? throw new InvalidOperationException("Cannot prerender components from assemblies with a null name"); 14var typeFullName = type.FullName ?? throw new InvalidOperationException("Cannot prerender component types with a null name");
Discovery\ComponentApplicationBuilder.cs (1)
77throw new InvalidOperationException("Assembly already defined.");
FormMapping\Factories\CollectionConverterFactory.cs (1)
66throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'.");
FormMapping\Factories\Collections\ConcreteTypeCollectionConverterFactory.cs (2)
24throw new InvalidOperationException($"Unable to create converter for '{typeof(TCollection).FullName}'."); 31throw new InvalidOperationException($"Unable to create converter for type '{typeof(TCollection).FullName}'.");
FormMapping\Factories\Collections\TypedCollectionConverterFactory.cs (5)
93_ => throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'."), 115throw new InvalidOperationException($"Unable to create converter for '{typeof(TCollection).FullName}'."); 166_ => throw new InvalidOperationException($"Unable to create converter for '{typeof(TCollection).FullName}'.") 204_ => throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'."), 208throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'.");
FormMapping\Factories\ComplexType\ComplexTypeExpressionConverterFactoryOfT.cs (1)
27throw new InvalidOperationException($"Could not resolve metadata for type '{type.FullName}'.");
FormMapping\Factories\ComplexTypeConverterFactory.cs (1)
104throw new InvalidOperationException($"Could not create a converter factory for type {type}.");
FormMapping\Factories\Dictionary\ConcreteTypeDictionaryConverterFactory.cs (3)
23throw new InvalidOperationException($"Unable to create converter for '{typeof(TDictionary).FullName}'."); 26throw new InvalidOperationException($"Unable to create converter for '{typeof(TDictionary).FullName}'."); 33throw new InvalidOperationException($"Unable to create converter for type '{typeof(TDictionary).FullName}'.");
FormMapping\Factories\Dictionary\TypedDictionaryConverterFactory.cs (5)
37_ => throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'."), 77throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'."); 103_ => throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'."), 145_ => throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'."), 149throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'.");
FormMapping\Factories\DictionaryConverterFactory.cs (6)
81throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'."); 88throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'."); 94throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'."); 101throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'."); 107throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'."); 115throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'.");
FormMapping\Factories\EnumConverterFactory.cs (1)
20throw new InvalidOperationException($"Cannot create converter for type '{type}'.");
FormMapping\Factories\FileConverterFactory.cs (1)
29throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'.");
FormMapping\Factories\NullableConverterFactory.cs (1)
35throw new InvalidOperationException($"Unable to create converter for type '{type}'.");
FormMapping\Factories\ParsableConverterFactory.cs (1)
25throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'.");
FormMapping\FormDataMapperOptions.cs (1)
70throw new InvalidOperationException($"No converter registered for type '{type.FullName}'.");
FormMapping\FormDataReader.cs (1)
232throw new InvalidOperationException($"The maximum recursion depth of '{MaxRecursionDepth}' was exceeded for '{_currentPrefixBuffer}{separator}{key}'.");
FormMapping\Metadata\FormDataMetadataFactory.cs (2)
325throw new InvalidOperationException("Cannot begin a new resolution graph while one is already in progress."); 334throw new InvalidOperationException("Cannot end a resolution graph while one is not in progress.");
RazorComponentEndpointInvoker.cs (1)
47var endpoint = context.GetEndpoint() ?? throw new InvalidOperationException($"An endpoint must be set on the '{nameof(HttpContext)}'.");
Rendering\Buffering\TextChunk.cs (1)
72throw new InvalidOperationException($"Unknown type {_type}");
Rendering\Buffering\TextChunkListBuilder.cs (1)
30throw new InvalidOperationException("New page didn't accept write");
Rendering\EndpointHtmlRenderer.cs (1)
68throw new InvalidOperationException("The HttpContext cannot change value once assigned.");
Rendering\EndpointHtmlRenderer.EventDispatch.cs (4)
45throw new InvalidOperationException(CreateMessageForAmbiguousNamedSubmitEvent(handlerName, locationsForName)); 127throw new InvalidOperationException($"A single named submit event is tracked more than once at the same location."); 155throw new InvalidOperationException($"The named value frame for component '{componentId}' at index '{frameIndex}' unexpectedly matches a frame of type '{frame.FrameType}'."); 161throw new InvalidOperationException($"Expected a named value with name '{eventType}' but found the name '{frame.NamedEventType}'.");
Rendering\EndpointHtmlRenderer.Prerendering.cs (1)
198throw new InvalidOperationException(
Rendering\EndpointHtmlRenderer.PrerenderingState.cs (5)
46_ => throw new InvalidOperationException("Invalid configured render mode."), 58_ => throw new InvalidOperationException("Invalid store."), 123throw new InvalidOperationException( 132throw new InvalidOperationException("Invalid persistence mode"); 153throw new InvalidOperationException("Invalid persistence mode.");
Rendering\EndpointHtmlRenderer.Streaming.cs (2)
52throw new InvalidOperationException($"{nameof(SendStreamingUpdatesAsync)} can only be called once."); 57throw new InvalidOperationException("Cannot begin streaming rendering because no framing header was set.");
Rendering\SSRRenderModeBoundary.cs (3)
89throw new InvalidOperationException($"A component of type '{componentType}' has render mode '{specifiedMode.GetType().Name}', " + 128throw new InvalidOperationException($"Cannot pass RenderFragment<T> parameter '{name}' to component '{_componentType.Name}' with rendermode '{RenderMode.GetType().Name}'. Templated content can't be passed across a rendermode boundary, because it is arbitrary code and cannot be serialized."); 137throw new InvalidOperationException($"Cannot pass the parameter '{name}' to component '{_componentType.Name}' with rendermode '{RenderMode.GetType().Name}'. This is because the parameter is of the delegate type '{value.GetType()}', which is arbitrary code and cannot be serialized.");
Rendering\TypeNameHash.cs (1)
18throw new InvalidOperationException($"Cannot compute a hash for a type without a {nameof(Type.FullName)}.");
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
59throw new InvalidOperationException("State already persisted.");
Microsoft.AspNetCore.Components.Endpoints.Tests (11)
Binding\FormDataMapperTests.cs (3)
526throw new InvalidOperationException("Can't parse this!"); 2227throw new InvalidOperationException("Unable to find method 'Map'."); 2525throw new InvalidOperationException("Could not read value.");
EndpointHtmlRendererTest.cs (8)
1228throw new InvalidOperationException($"Unexpected render mode: {renderMode}"); 1260_ => throw new InvalidOperationException($"Unexpected render mode: {renderMode}"), 1314_ => throw new InvalidOperationException($"Unexpected render mode: {declaredRenderMode}"), 1383_ => throw new InvalidOperationException($"Unexpected render mode: {renderMode}"), 1439_ => throw new InvalidOperationException($"Unexpected render mode: {renderMode}"), 1447_ => throw new InvalidOperationException($"Unexpected render mode: {declared}"), 1718throw new InvalidOperationException("Threw an exception synchronously"); 1723throw new InvalidOperationException("Threw an exception asynchronously");
Microsoft.AspNetCore.Components.Forms (7)
DataAnnotationsValidator.cs (2)
23throw new InvalidOperationException($"{nameof(DataAnnotationsValidator)} requires a cascading " + 39throw new InvalidOperationException($"{GetType()} does not support changing the " +
FieldIdentifier.cs (1)
172throw new InvalidOperationException($"Unable to compile expression: {member}");
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (4)
58throw new InvalidOperationException("Method calls cannot be formatted."); 214throw new InvalidOperationException($"Unable to evaluate index expressions of type '{indexExpression.GetType().Name}'."); 272throw new InvalidOperationException($"Cannot format an index argument of type '{memberType}'."); 303throw new InvalidOperationException($"Unable to format constant values of type '{x.GetType()}'.");
Microsoft.AspNetCore.Components.Forms.Tests (1)
src\Components\Shared\test\TestRenderer.cs (1)
147throw new InvalidOperationException("Did not dispose all the ComponentState instances. This could lead to ArrayBuffer not returning buffers to its pool.");
Microsoft.AspNetCore.Components.Performance (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
53throw new InvalidOperationException(message);
Microsoft.AspNetCore.Components.QuickGrid (3)
Columns\PropertyColumn.cs (1)
58throw new InvalidOperationException($"A '{nameof(Format)}' parameter was supplied, but the type '{typeof(TProp)}' does not implement '{typeof(IFormattable)}'.");
Infrastructure\AsyncQueryExecutorSupplier.cs (1)
41throw new InvalidOperationException($"The supplied {nameof(IQueryable)} is provided by Entity Framework. To query it efficiently, you must reference the package Microsoft.AspNetCore.Components.QuickGrid.EntityFrameworkAdapter and call AddQuickGridEntityFrameworkAdapter on your service collection.");
QuickGrid.razor.cs (1)
177throw new InvalidOperationException($"{nameof(QuickGrid)} requires one of {nameof(Items)} or {nameof(ItemsProvider)}, but both were specified.");
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
InternalUsageAnalyzer.cs (1)
69_ => throw new InvalidOperationException("Unexpected operation kind: " + context.Operation.Kind),
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (1)
Helpers\DiagnosticVerifier.Helper.cs (1)
121throw new InvalidOperationException("Amount of sources did not match amount of Documents created");
Microsoft.AspNetCore.Components.Server (30)
Circuits\CircuitClientProxy.cs (1)
42throw new InvalidOperationException($"{nameof(SendCoreAsync)} cannot be invoked with an offline client.");
Circuits\CircuitHost.cs (5)
110throw new InvalidOperationException("The circuit host is already initialized."); 508throw new InvalidOperationException($"The stream with ID {streamId} is not available. It may have timed out."); 653throw new InvalidOperationException("Circuit is being invoked prior to initialization."); 747throw new InvalidOperationException("UpdateRootComponents is not supported when components have" + 774throw new InvalidOperationException($"The first set of update operations must always be of type {nameof(RootComponentOperationType.Add)}");
Circuits\CircuitJSComponentInterop.cs (1)
23throw new InvalidOperationException($"Cannot add further JS root components because the configured limit of {_circuitOptions.RootComponents.MaxJSRootComponents} has been reached.");
Circuits\RemoteJSDataStream.cs (1)
94throw new InvalidOperationException($"An error occurred while reading the remote stream: {error}");
Circuits\RemoteJSRuntime.cs (1)
119throw new InvalidOperationException(
Circuits\RemoteNavigationInterception.cs (2)
18throw new InvalidOperationException("JSRuntime has already been initialized."); 32throw new InvalidOperationException("Navigation commands can not be issued at this time. This is because the component is being " +
Circuits\RemoteNavigationManager.cs (1)
56throw new InvalidOperationException("JavaScript runtime already initialized.");
Circuits\RemoteRenderer.cs (2)
283throw new InvalidOperationException($"Received an acknowledgement for batch with id '{incomingBatchId}' when the last batch produced was '{lastBatchId}'."); 335pendingRenderInfo.TrySetException(new InvalidOperationException(errorMessageOrNull));
Circuits\RemoteScrollToLocationHash.cs (2)
18throw new InvalidOperationException("JSRuntime has already been initialized."); 32throw new InvalidOperationException("Navigation commands can not be issued at this time. This is because the component is being " +
Circuits\ServerAuthenticationStateProvider.cs (1)
18?? throw new InvalidOperationException($"Do not call {nameof(GetAuthenticationStateAsync)} outside of the DI scope for a Razor component. Typically, this means you can call it only within a Razor component or inside another DI service that is resolved for a Razor component.");
DependencyInjection\ServerRazorComponentsBuilderExtensions.cs (1)
65throw new InvalidOperationException("Invalid render mode. Use AddInteractiveServerRenderMode() to configure the Server render mode.");
src\Components\Shared\src\WebRootComponentManager.cs (7)
44throw new InvalidOperationException("Exceeded the maximum number of allowed server interactive root components."); 50throw new InvalidOperationException($"A root component with SSR component ID {ssrComponentId} already exists."); 80throw new InvalidOperationException($"No root component exists with SSR component ID {ssrComponentId}."); 105throw new InvalidOperationException("An invalid component marker key was provided."); 136throw new InvalidOperationException("Cannot update components with mismatching types."); 141throw new InvalidOperationException("An invalid component marker key was provided."); 148throw new InvalidOperationException("Cannot update components with mismatching keys.");
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
59throw new InvalidOperationException("State already persisted.");
src\Shared\PooledArrayBufferWriter.cs (1)
180throw new InvalidOperationException($"Cannot advance past the end of the buffer, which has a size of {capacity}.");
src\Shared\ValueStopwatch\ValueStopwatch.cs (1)
32throw new InvalidOperationException("An uninitialized, or 'default', ValueStopwatch cannot be used to get elapsed time.");
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
63throw new InvalidOperationException("The reader wasn't returned!");
src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\Utilities.cs (1)
41throw new InvalidOperationException("The underlying IBufferWriter<byte>.GetMemory(int) method returned an empty memory block, which is not allowed. This is a bug in " + bufferWriter.GetType().FullName);
Microsoft.AspNetCore.Components.Server.Tests (8)
Circuits\CircuitHostTest.cs (2)
775throw new InvalidOperationException( 792throw new InvalidOperationException("Created more test component instances than expected.");
Circuits\RenderBatchWriterTest.cs (1)
349throw new InvalidOperationException($"Unsupported type: {expectedEntry.GetType().FullName}");
src\Components\Endpoints\src\DependencyInjection\ServerComponentSerializer.cs (2)
38rootComponent.Assembly.GetName().Name ?? throw new InvalidOperationException("Cannot prerender components from assemblies with a null name"), 39rootComponent.FullName ?? throw new InvalidOperationException("Cannot prerender component types with a null name"),
src\SignalR\common\SignalR.Common\test\Internal\Protocol\TestBinder.cs (2)
50throw new InvalidOperationException("Unexpected binder call"); 59throw new InvalidOperationException("Unexpected binder call");
src\SignalR\common\SignalR.Common\test\Internal\Protocol\TestHubMessageEqualityComparer.cs (1)
47throw new InvalidOperationException($"Unknown message type: {x.GetType().FullName}");
Microsoft.AspNetCore.Components.Tests (22)
CascadingParameterTest.cs (1)
643() => throw new InvalidOperationException("This should not be used because NotifyChanged is called with a value first"), isFixed: false);
LayoutViewTest.cs (1)
285throw new InvalidOperationException("Got a null body when not expecting it");
Lifetime\ComponentStatePersistenceManagerTest.cs (2)
196lifetime.State.RegisterOnPersisting(() => throw new InvalidOperationException(), new TestRenderMode()); 222lifetime.State.RegisterOnPersisting(async () => { await tcs.Task; throw new InvalidOperationException(); }, new TestRenderMode());
NavigationManagerTest.cs (5)
693throw new InvalidOperationException(exceptionMessage); 718throw new InvalidOperationException(exceptionMessage); 749throw new InvalidOperationException(exceptionMessage); 770throw new InvalidOperationException(exceptionMessage); 797throw new InvalidOperationException(exceptionMessage);
ParameterViewTest.Assignment.cs (1)
666set => throw new InvalidOperationException("This setter throws");
RendererTest.cs (7)
2311var exception1 = new InvalidOperationException(); 2384var exception1 = new InvalidOperationException(); 2429var exception1 = new InvalidOperationException(); 3725var exception = new InvalidOperationException(); 4267var exception1 = new InvalidOperationException(); 4294var exception1 = new InvalidOperationException(); 5786throw new InvalidOperationException("Failed to find entries for component with Id: " + TestId);
Routing\RouteTableFactoryTests.cs (4)
401throw new InvalidOperationException($"Failed to match template '{template}'."); 674throw new InvalidOperationException($"Failed to match template '{template}'."); 704throw new InvalidOperationException($"Failed to match template '{template}'."); 730throw new InvalidOperationException($"Failed to match template '{template}'.");
src\Components\Shared\test\TestRenderer.cs (1)
147throw new InvalidOperationException("Did not dispose all the ComponentState instances. This could lead to ArrayBuffer not returning buffers to its pool.");
Microsoft.AspNetCore.Components.Web (50)
ElementReferenceExtensions.cs (2)
38throw new InvalidOperationException("No JavaScript runtime found."); 48throw new InvalidOperationException("ElementReference has not been configured correctly.");
Forms\EditForm.cs (3)
103throw new InvalidOperationException($"{nameof(EditForm)} requires a {nameof(Model)} " + 108throw new InvalidOperationException($"{nameof(EditForm)} requires either a {nameof(Model)} " + 118throw new InvalidOperationException($"When supplying an {nameof(OnSubmit)} parameter to " +
Forms\Editor.cs (3)
49throw new InvalidOperationException($"{GetType()} requires a value for the 'ValueExpression' " + 66throw new InvalidOperationException($"Cannot subscribe to a {typeof(HtmlFieldPrefix).Name}."); 71throw new InvalidOperationException($"Cannot subscribe to a {typeof(HtmlFieldPrefix).Name}.");
Forms\InputBase.cs (2)
235throw new InvalidOperationException($"{GetType()} requires a value for the 'ValueExpression' " + 263throw new InvalidOperationException($"{GetType()} does not support changing the " +
Forms\InputDate.cs (2)
62throw new InvalidOperationException($"Unsupported {GetType()} type param '{type}'."); 75_ => throw new InvalidOperationException($"Unsupported {nameof(InputDateType)} '{Type}'.")
Forms\InputExtensions.cs (1)
48throw new InvalidOperationException($"{input.GetType()} does not support the type '{typeof(TValue)}'.", ex);
Forms\InputFile.cs (1)
81throw new InvalidOperationException("ToImageFile returned an unexpected null result.");
Forms\InputFile\BrowserFileExtensions.cs (1)
34throw new InvalidOperationException($"Cannot perform this operation on custom {typeof(IBrowserFile)} implementations.");
Forms\InputFile\InputFileChangeEventArgs.cs (3)
330 => throw new InvalidOperationException("No file was supplied."), 35_ => throw new InvalidOperationException($"More than one file was supplied. Call {nameof(GetMultipleFiles)} to receive multiple files."), 48throw new InvalidOperationException($"The maximum number of files accepted is {maximumFileCount}, but {_files.Count} were supplied.");
Forms\InputNumber.cs (2)
34throw new InvalidOperationException($"The type '{targetType}' is not a supported numeric type."); 114throw new InvalidOperationException($"Unsupported type {value.GetType()}");
Forms\InputRadio.cs (1)
55throw new InvalidOperationException($"{GetType()} must have an ancestor {typeof(InputRadioGroup<TValue>)} " +
Forms\InputRadioGroup.cs (1)
44throw new InvalidOperationException("An InputRadioGroup cannot change context after creation");
Forms\Mapping\FormMappingContext.cs (1)
139throw new InvalidOperationException($"'{errorKey}' does must start with '{key}'");
Forms\Mapping\FormMappingScope.cs (3)
44throw new InvalidOperationException($"The {nameof(FormMappingScope)} component requires a nonempty {nameof(Name)} parameter value."); 51throw new InvalidOperationException($"The mapping scope name '{Name}' starts with a disallowed character."); 58throw new InvalidOperationException($"{nameof(FormMappingScope)} '{nameof(Name)}' can't change after initialization.");
Forms\Mapping\FormMappingValidator.cs (2)
23throw new InvalidOperationException($"{nameof(FormMappingValidator)} requires a " + 48throw new InvalidOperationException($"{GetType()} does not support changing the " +
Forms\Mapping\FormValueMappingContext.cs (1)
73throw new InvalidOperationException($"The result has already been set to '{Result}'.");
Forms\Mapping\SupplyParameterFromFormValueProvider.cs (1)
63throw new InvalidOperationException($"Received an unexpected attribute type {parameterInfo.Attribute.GetType()}");
Forms\ValidationMessage.cs (2)
44throw new InvalidOperationException($"{GetType()} requires a cascading parameter " + 51throw new InvalidOperationException($"{GetType()} requires a value for the " +
Forms\ValidationSummary.cs (1)
46throw new InvalidOperationException($"{nameof(ValidationSummary)} requires a cascading parameter " +
HtmlRendering\StaticHtmlRenderer.HtmlWriting.cs (3)
62throw new InvalidOperationException("We didn't consume any input."); 82throw new InvalidOperationException($"Attributes should only be encountered within {nameof(RenderElement)}"); 100throw new InvalidOperationException($"Invalid element frame type '{frame.FrameType}'.");
JSComponents\JSComponentInterop.cs (2)
42?? throw new InvalidOperationException("This instance is not initialized."); 113var x => throw new InvalidOperationException($"Invalid {nameof(ParameterKind)} '{x}'.")
Routing\FocusOnNavigate.cs (2)
37throw new InvalidOperationException($"{nameof(FocusOnNavigate)} requires a non-null value for the parameter '{nameof(RouteData)}'."); 42throw new InvalidOperationException($"{nameof(FocusOnNavigate)} requires a nonempty value for the parameter '{nameof(Selector)}'.");
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (4)
58throw new InvalidOperationException("Method calls cannot be formatted."); 214throw new InvalidOperationException($"Unable to evaluate index expressions of type '{indexExpression.GetType().Name}'."); 272throw new InvalidOperationException($"Cannot format an index argument of type '{memberType}'."); 303throw new InvalidOperationException($"Unable to format constant values of type '{x.GetType()}'.");
Virtualization\Virtualize.cs (3)
140throw new InvalidOperationException( 153throw new InvalidOperationException( 174throw new InvalidOperationException(
WebEventData\ChangeEventArgsReader.cs (1)
59throw new InvalidOperationException(
WebEventData\WebEventData.cs (2)
29throw new InvalidOperationException("Error parsing the event descriptor", e); 83throw new InvalidOperationException($"There was an error parsing the event arguments. EventId: '{eventHandlerId}'.", e);
Microsoft.AspNetCore.Components.Web.Tests (3)
HtmlRendering\HtmlRendererTest.cs (1)
659Action<ChangeEventArgs> change = (ChangeEventArgs changeArgs) => throw new InvalidOperationException();
src\Components\Shared\test\TestRenderer.cs (1)
147throw new InvalidOperationException("Did not dispose all the ComponentState instances. This could lead to ArrayBuffer not returning buffers to its pool.");
Virtualization\VirtualizeTest.cs (1)
106=> throw new InvalidOperationException("Thrown from items provider.");
Microsoft.AspNetCore.Components.WebAssembly (25)
Hosting\WebAssemblyCultureProvider.cs (1)
53throw new InvalidOperationException("Blazor detected a change in the application's culture that is not supported with the current project configuration. " +
Hosting\WebAssemblyHost.cs (2)
120throw new InvalidOperationException("The host has already started."); 220throw new InvalidOperationException("All initial operations must be additions.");
Hosting\WebAssemblyHostBuilder.cs (2)
146throw new InvalidOperationException( 208throw new InvalidOperationException("WebAssemblyHostBuilder needs to be instantiated in the UI thread.");
Hosting\WebAssemblyHostConfiguration.cs (1)
66throw new InvalidOperationException("Can only set property if at least one provider has been inserted.");
Http\WebAssemblyHttpRequestMessageExtensions.cs (3)
35_ => throw new InvalidOperationException($"Unsupported enum value {requestCredentials}.") 62_ => throw new InvalidOperationException($"Unsupported enum value {requestCache}.") 87_ => throw new InvalidOperationException($"Unsupported enum value {requestMode}.")
Prerendering\WebAssemblyComponentParameterDeserializer.cs (5)
31throw new InvalidOperationException($"The number of parameter definitions '{parametersDefinitions.Count}' does not match the number parameter values '{parameterValues.Count}'."); 39throw new InvalidOperationException("The name is missing in a parameter definition."); 48throw new InvalidOperationException($"The parameter definition for '{definition.Name}' is incomplete: Type='{definition.TypeName}' Assembly='{definition.Assembly}'."); 55throw new InvalidOperationException($"The parameter '{definition.Name}' with type '{definition.TypeName}' in assembly '{definition.Assembly}' could not be found."); 69throw new InvalidOperationException($"Could not parse the parameter value for parameter '{definition.Name}' of type '{definition.TypeName}' and assembly '{definition.Assembly}'.", e);
Services\DefaultWebAssemblyJSRuntime.cs (2)
130throw new InvalidOperationException($"The component operation of type '{operation.Type}' requires a '{nameof(operation.Marker)}' to be specified."); 134?? throw new InvalidOperationException($"Root component type '{operation.Marker.Value.TypeName}' could not be found in the assembly '{operation.Marker.Value.Assembly}'.");
Services\LazyAssemblyLoader.cs (1)
61throw new InvalidOperationException($"Unable to find the following assembly: {ex.FileName}. Make sure that the appplication is referencing the assemblies and that they are present in the output folder.");
Services\WebAssemblyNavigationManager.cs (1)
33throw new InvalidOperationException($"The {nameof(WebAssemblyNavigationManager)} has already created a logger.");
src\Components\Shared\src\WebRootComponentManager.cs (6)
50throw new InvalidOperationException($"A root component with SSR component ID {ssrComponentId} already exists."); 80throw new InvalidOperationException($"No root component exists with SSR component ID {ssrComponentId}."); 105throw new InvalidOperationException("An invalid component marker key was provided."); 136throw new InvalidOperationException("Cannot update components with mismatching types."); 141throw new InvalidOperationException("An invalid component marker key was provided."); 148throw new InvalidOperationException("Cannot update components with mismatching keys.");
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
59throw new InvalidOperationException("State already persisted.");
Microsoft.AspNetCore.Components.WebAssembly.Server (7)
DebugProxyLauncher.cs (5)
80tcs.TrySetException(new InvalidOperationException("Unable to start debug proxy process.")); 122throw new InvalidOperationException("IWebHostEnvironment.ApplicationName is required to be set in order to start the debug proxy."); 180taskCompletionSource.TrySetException(new InvalidOperationException( 192taskCompletionSource.TrySetException(new InvalidOperationException( 208taskCompletionSource.TrySetException(new InvalidOperationException(
TargetPickerUi.cs (1)
396throw new InvalidOperationException("Unknown OS platform");
WebAssemblyRazorComponentsBuilderExtensions.cs (1)
40? throw new InvalidOperationException("Invalid render mode. Use AddInteractiveWebAssemblyRenderMode(Action<WebAssemblyComponentsEndpointOptions>) to configure the WebAssembly render mode.")
Microsoft.AspNetCore.Components.WebView (10)
IpcReceiver.cs (3)
46throw new InvalidOperationException("Cannot receive IPC messages when no page is attached"); 70throw new InvalidOperationException($"Unknown message type '{messageType}'."); 97throw new InvalidOperationException(errorMessageOrNull);
Services\WebViewJSRuntime.cs (1)
35throw new InvalidOperationException("Cannot invoke JavaScript outside of a WebView context.");
Services\WebViewRenderer.cs (1)
78throw new InvalidOperationException($"Received unexpected acknowledgement for render batch {batchId} (next batch should be {nextUnacknowledgedBatch.BatchId})");
Services\WebViewScrollToLocationHash.cs (2)
17throw new InvalidOperationException("JSRuntime has already been initialized."); 29throw new InvalidOperationException("JSRuntime has not been attached.");
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
274public Stream CreateReadStream() => throw new InvalidOperationException("Can not create a stream for a directory.");
WebViewManager.cs (2)
94throw new InvalidOperationException($"There is already a root component with selector '{selector}'."); 123throw new InvalidOperationException($"There is no root component with selector '{selector}'.");
Microsoft.AspNetCore.Components.WebView.Test (3)
Infrastructure\TestDocument.cs (3)
20throw new InvalidOperationException($"Component with Id '{componentId}' already exists."); 170parent = parent.Parent ?? throw new InvalidOperationException($"Cannot step out of {parent}"); 331throw new InvalidOperationException($"Attribute has nonzero event handler ID, but attribute name '${attributeName}' does not start with 'on'.");
Microsoft.AspNetCore.ConcurrencyLimiter (2)
QueuePolicies\BasePolicy.cs (1)
75throw new InvalidOperationException("No outstanding leases.");
src\Shared\ValueStopwatch\ValueStopwatch.cs (1)
32throw new InvalidOperationException("An uninitialized, or 'default', ValueStopwatch cannot be used to get elapsed time.");
Microsoft.AspNetCore.ConcurrencyLimiter.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
53throw new InvalidOperationException(message);
Microsoft.AspNetCore.Connections.Abstractions (2)
src\Shared\ActivatorUtilities\ActivatorUtilities.cs (2)
51throw new InvalidOperationException(message); 158throw new InvalidOperationException($"Unable to resolve service for type '{_parameters[index].ParameterType}' while attempting to activate '{_constructor.DeclaringType}'.");
Microsoft.AspNetCore.CookiePolicy (2)
ResponseCookiesWrapper.cs (2)
249throw new InvalidOperationException(); 270throw new InvalidOperationException($"Unrecognized {nameof(HttpOnlyPolicy)} value {Options.HttpOnly.ToString()}");
Microsoft.AspNetCore.CookiePolicy.Test (1)
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
180throw new InvalidOperationException("The cookie key and options are larger than ChunksSize, leaving no room for data.");
Microsoft.AspNetCore.Cors (2)
Infrastructure\CorsPolicyBuilder.cs (1)
232throw new InvalidOperationException(Resources.InsecureConfiguration);
Infrastructure\CorsService.cs (1)
51throw new InvalidOperationException(Resources.FormatPolicyNotFound(policyName));
Microsoft.AspNetCore.DataProtection (15)
AuthenticatedEncryption\AlgorithmAssert.cs (3)
28throw new InvalidOperationException(Resources.FormatAlgorithmAssert_BadBlockSize(blockSizeInBits)); 36throw new InvalidOperationException(Resources.FormatAlgorithmAssert_BadKeySize(keySizeInBits)); 44throw new InvalidOperationException(Resources.FormatAlgorithmAssert_BadDigestSize(digestSizeInBits));
AuthenticatedEncryption\ConfigurationModel\ManagedAlgorithmHelpers.cs (1)
61throw new InvalidOperationException($"Algorithm type {type} doesn't have a public parameterless constructor. If the app is published with trimming then the constructor may have been trimmed. Ensure the type's assembly is excluded from trimming.");
Error.cs (6)
15return new InvalidOperationException(message); 43return new InvalidOperationException(message); 49return new InvalidOperationException(message); 92return new InvalidOperationException(message); 98return new InvalidOperationException(message); 103return new InvalidOperationException(Resources.KeyRingProvider_RefreshFailedOnOtherThread, inner);
Internal\KeyManagementOptionsPostSetup.cs (2)
101throw new InvalidOperationException("Keys access is set up as read-only, so nothing should be encrypting"); 114throw new InvalidOperationException("Keys access is set up as read-only, so nothing should be storing keys");
KeyManagement\DefaultKeyResolver.cs (1)
108new InvalidOperationException($"{nameof(IKey.CreateEncryptor)} returned null."));
KeyManagement\KeyRingProvider.cs (1)
142throw new InvalidOperationException(Resources.KeyRingProvider_NoDefaultKey_AutoGenerateDisabled);
TypeExtensions.cs (1)
40throw new InvalidOperationException($"Unable to load type '{typeName}'. If the app is published with trimming then this type may have been trimmed. Ensure the type's assembly is excluded from trimming.", ex);
Microsoft.AspNetCore.DataProtection.Abstractions (1)
DataProtectionCommonExtensions.cs (1)
102throw new InvalidOperationException(Resources.FormatDataProtectionExtensions_NoService(typeof(IDataProtectionProvider).FullName));
Microsoft.AspNetCore.DataProtection.Tests (6)
DataProtectionUtilityExtensionsTests.cs (1)
89mockEnvironment.SetupGet(o => o.ContentRootPath).Throws(new InvalidOperationException("Hosting environment should not be checked"));
HostingTests.cs (2)
35new FakeServer(onStart: () => tcs.TrySetException(new InvalidOperationException("Server was started before key ring was initialized"))))); 61new FakeServer(onStart: () => tcs.TrySetException(new InvalidOperationException("Server was started before key ring was initialized")))))
KeyManagement\DefaultKeyResolverTests.cs (3)
315throw new InvalidOperationException("Shouldn't be called"); 394throw new InvalidOperationException("Simulated decryption failure"); 453throw new InvalidOperationException("Simulated decryption failure");
Microsoft.AspNetCore.DeveloperCertificates.XPlat (9)
src\Shared\CertificateGeneration\CertificateManager.cs (4)
524throw new InvalidOperationException("Unknown format."); 707throw new InvalidOperationException($"'{nameof(RemoveLocations.Undefined)}' is not a valid location."); 719throw new InvalidOperationException("Invalid location."); 749throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
105throw new InvalidOperationException("There was an error trusting the certificate."); 260throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'. 277throw new InvalidOperationException($"Can't determine the subject for the certificate with subject '{certificate.Subject}'."); 361throw new InvalidOperationException("Failed to add the certificate to the keychain. Are you running in a non-interactive session perhaps?");
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
54throw new InvalidOperationException("Trusting the certificate is not supported on linux");
Microsoft.AspNetCore.Diagnostics (3)
DiagnosticsMetrics.cs (1)
64throw new InvalidOperationException("Unexpected value: " + result);
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (2)
57throw new InvalidOperationException(Resources.ExceptionHandlerOptions_NotConfiguredCorrectly); 217edi = ExceptionDispatchInfo.Capture(new InvalidOperationException($"The exception handler configured on {nameof(ExceptionHandlerOptions)} produced a 404 status response. " +
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (1)
MigrationsEndPointMiddleware.cs (1)
90throw new InvalidOperationException(message, ex);
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Tests (2)
DatabaseDeveloperPageExceptionFilterTests.cs (2)
31new ErrorContext(context.Object, new InvalidOperationException()), 49var exception = new InvalidOperationException("Bang!", new Mock<DbException>().Object);
Microsoft.AspNetCore.Diagnostics.HealthChecks (4)
Builder\HealthCheckApplicationBuilderExtensions.cs (1)
195throw new InvalidOperationException(Resources.FormatUnableToFindServices(
Builder\HealthCheckEndpointRouteBuilderExtensions.cs (1)
59throw new InvalidOperationException(Resources.FormatUnableToFindServices(
HealthCheckMiddleware.cs (1)
56throw new InvalidOperationException(message);
HealthCheckOptions.cs (1)
59throw new InvalidOperationException(message);
Microsoft.AspNetCore.Diagnostics.Tests (30)
ExceptionHandlerMiddlewareTest.cs (9)
95var middleware = CreateMiddleware(_ => throw new InvalidOperationException(), optionsAccessor); 119var middleware = CreateMiddleware(_ => throw new InvalidOperationException(), optionsAccessor); 140var middleware = CreateMiddleware(_ => throw new InvalidOperationException(), optionsAccessor, exceptionHandlers); 165var middleware = CreateMiddleware(_ => throw new InvalidOperationException(), optionsAccessor, exceptionHandlers); 195var middleware = CreateMiddleware(_ => throw new InvalidOperationException(), optionsAccessor, exceptionHandlers); 237var middleware = CreateMiddleware(_ => throw new InvalidOperationException(), optionsAccessor, exceptionHandlers, meterFactory); 259var middleware = CreateMiddleware(_ => throw new InvalidOperationException(), optionsAccessor, exceptionHandlers, meterFactory); 284var middleware = CreateMiddleware(_ => throw new InvalidOperationException(), optionsAccessor, meterFactory: meterFactory); 435var middleware = CreateMiddleware(_ => throw new InvalidOperationException(), optionsAccessor, meterFactory: meterFactory);
ExceptionHandlerTest.cs (13)
106throw new InvalidOperationException("Something bad happened"); 172throw new InvalidOperationException("Invalid input provided."); 228throw new InvalidOperationException("Invalid input provided."); 355throw new InvalidOperationException("Something bad happened"); 425throw new InvalidOperationException("Something bad happened"); 637throw new InvalidOperationException("Something bad happened."); 684throw new InvalidOperationException("Something bad happened."); 738throw new InvalidOperationException("Something bad happened"); 792throw new InvalidOperationException("Something bad happened"); 844throw new InvalidOperationException("Something bad happened"); 902throw new InvalidOperationException("Something bad happened"); 1000throw new InvalidOperationException("Test exception2"); 1063throw new InvalidOperationException("Test exception2");
StatusCodeMiddlewareTest.cs (8)
50throw new InvalidOperationException($"Invalid input provided. {context.Request.Path}"); 118throw new InvalidOperationException("Invalid input provided."); 180throw new InvalidOperationException("Invalid input provided."); 235throw new InvalidOperationException("Invalid input provided."); 271throw new InvalidOperationException("Invalid input provided."); 305throw new InvalidOperationException("Invalid input provided."); 341app.Run(_ => throw new InvalidOperationException("Invalid input provided.")); 379app.Run(_ => throw new InvalidOperationException("Invalid input provided."));
Microsoft.AspNetCore.Grpc.JsonTranscoding (72)
Internal\Binding\JsonTranscodingProviderServiceBinder.cs (1)
225throw new InvalidOperationException($"Error binding {method.Name} on {typeof(TService).Name} to HTTP API.", ex);
Internal\Binding\JsonTranscodingServiceMethodProvider.cs (1)
81throw new InvalidOperationException($"Error binding gRPC service '{typeof(TService).Name}'.", ex);
Internal\Binding\ReflectionServiceInvokerResolver.cs (1)
32throw new InvalidOperationException($"Could not find '{methodName}' on {typeof(TService)}.");
Internal\HttpContextStreamWriter.cs (2)
61throw new InvalidOperationException("Can't write the message because the request is complete."); 69throw new InvalidOperationException("Can't write the message because the previous write is in progress.");
Internal\Json\AnyConverter.cs (4)
26throw new InvalidOperationException("Any message with no @type."); 35throw new InvalidOperationException($"Type registry has no descriptor for type name '{typeName}'."); 47throw new InvalidOperationException($"Expected '{AnyWellKnownTypeValueField}' property for well-known type Any body."); 72throw new InvalidOperationException($"Type registry has no descriptor for type name '{typeName}'.");
Internal\Json\DurationConverter.cs (1)
22throw new InvalidOperationException("Expected string value for Duration.");
Internal\Json\EnumConverter.cs (5)
27throw new InvalidOperationException($"Unable to resolve descriptor for {typeToConvert}."); 34throw new InvalidOperationException(@$"Error converting value ""{value}"" to enum type {typeToConvert}."); 43throw new InvalidOperationException($"Unexpected JSON token: {reader.TokenType}."); 71throw new InvalidOperationException($"Integer can't be converted to enum {typeof(TEnum).FullName}."); 81throw new InvalidOperationException($"Enum {typeof(TEnum).FullName} can't be converted to integer.");
Internal\Json\FieldMaskConverter.cs (2)
26throw new InvalidOperationException("Expected string value for FieldMask."); 51throw new InvalidOperationException($"Invalid field mask to be converted to JSON: {firstInvalid}.");
Internal\Json\MessageTypeInfoResolver.cs (2)
75throw new InvalidOperationException("Couldn't resolve descriptor for message type: " + type); 135throw new InvalidOperationException($"Multiple values specified for oneof {field.RealContainingOneof.Name}.");
Internal\Json\NullValueConverter.cs (2)
26throw new InvalidOperationException($"Invalid enum value: {reader.GetString()} for enum type: google.protobuf.NullValue"); 33throw new InvalidOperationException($"Unexpected JSON token: {reader.TokenType}");
Internal\Json\StructConverter.cs (1)
37throw new InvalidOperationException("Struct fields cannot have an empty key or a null value.");
Internal\Json\TimestampConverter.cs (1)
22throw new InvalidOperationException("Expected string value for Timestamp.");
Internal\Json\ValueConverter.cs (3)
57throw new InvalidOperationException("Unexpected token type: " + reader.TokenType); 68throw new InvalidOperationException("Value message must contain a value for the oneof."); 86throw new InvalidOperationException("Unexpected case in struct field: " + specifiedField.FieldNumber);
Internal\JsonRequestHelpers.cs (5)
83throw new InvalidOperationException($"Unable to read the request as JSON because the request content type charset '{charset}' is not a known encoding.", ex); 114throw new InvalidOperationException($"Error when parsing the '{StatusDetailsTrailerName}' trailer.", ex); 206throw new InvalidOperationException($"Unable to read the request as JSON because the request content type '{serverCallContext.HttpContext.Request.ContentType}' is not a known JSON content type."); 237throw new InvalidOperationException($"Unable to deserialize null to {type.Name}."); 269throw new InvalidOperationException($"Unable to deserialize null to {type.Name}.");
Internal\JsonTranscodingServerCallContext.cs (1)
211throw new InvalidOperationException("Response headers can only be sent once per call.");
src\Grpc\JsonTranscoding\src\Shared\HttpRoutePatternParser.cs (14)
52throw new InvalidOperationException("Path template wasn't parsed to the end."); 57throw new InvalidOperationException($"Error parsing path template '{_input}'.", ex); 66throw new InvalidOperationException("Path template must start with a '/'."); 74throw new InvalidOperationException("Path segment must end with a '/'."); 90throw new InvalidOperationException("Route template shouldn't end with a '/'."); 113throw new InvalidOperationException("Only literal segments can follow a catch-all segment."); 139throw new InvalidOperationException("Only literal segments can follow a catch-all segment."); 172throw new InvalidOperationException("Empty literal segment."); 184throw new InvalidOperationException("Incomplete or empty field path."); 196throw new InvalidOperationException("Empty verb."); 253throw new InvalidOperationException("Path template has an empty segment."); 277throw new InvalidOperationException($"Expected '{c}' when parsing path template."); 318throw new InvalidOperationException("Unexpected error when updating variable."); 330throw new InvalidOperationException("Variable can't be nested.");
src\Grpc\JsonTranscoding\src\Shared\Legacy.cs (12)
67throw new InvalidOperationException($"Invalid Timestamp value: {value}"); 99throw new InvalidOperationException($"Invalid Timestamp value: {value}"); 104throw new InvalidOperationException($"Invalid Timestamp value: {value}"); 122throw new InvalidOperationException($"Invalid Timestamp value: {value}"); 130throw new InvalidOperationException($"Invalid Timestamp value: {value}"); 173throw new InvalidOperationException("Non-normalized timestamp value."); 182throw new InvalidOperationException("Invalid Duration value: " + value); 189throw new InvalidOperationException("Invalid Duration value: " + value); 206throw new InvalidOperationException("Invalid Duration value: " + value); 213throw new InvalidOperationException("Invalid Duration value: " + value); 236throw new InvalidOperationException("Non-normalized duration value."); 312throw new InvalidOperationException($"Invalid field mask: {text}");
src\Grpc\JsonTranscoding\src\Shared\Server\InterceptorPipelineBuilder.cs (1)
157throw new InvalidOperationException($"Could not construct Interceptor instance for type {interceptorActivatorHandle.Registration.Type.FullName}");
src\Grpc\JsonTranscoding\src\Shared\Server\MethodOptions.cs (1)
95throw new InvalidOperationException($"The configured response compression algorithm '{ResponseCompressionAlgorithm}' does not have a matching compression provider.");
src\Grpc\JsonTranscoding\src\Shared\ServiceDescriptorHelpers.cs (12)
63throw new InvalidOperationException($"Get not find Descriptor property on {serviceReflectionType.Name}."); 161throw new InvalidOperationException("Base64 encoded string required to convert to bytes."); 176throw new InvalidOperationException($"Invalid value '{s}' for enum type {descriptor.EnumType.Name}."); 181throw new InvalidOperationException("String required to convert to enum."); 221throw new InvalidOperationException("Unsupported type: " + descriptor.FieldType); 264throw new InvalidOperationException("Map field requires repeating keys and values."); 303throw new InvalidOperationException("Can't set multiple values onto a non-repeating field."); 397throw new InvalidOperationException($"Couldn't find matching field for route parameter '{string.Join(".", path)}' on {messageDescriptor.Name}."); 416throw new InvalidOperationException($"The body field '{body}' references a nested field. The body field name must be on the top-level request message."); 421throw new InvalidOperationException($"Couldn't find matching field for body '{body}' on {methodDescriptor.InputType.Name}."); 460throw new InvalidOperationException($"The response body field '{responseBody}' references a nested field. The response body field name must be on the top-level response message."); 465throw new InvalidOperationException($"Couldn't find matching field for response body '{responseBody}' on {methodDescriptor.OutputType.Name}.");
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (7)
Infrastructure\TestHelpers.cs (2)
40throw new InvalidOperationException("Couldn't find Descriptor property on message type: " + typeToConvert); 46throw new InvalidOperationException("Couldn't resolve MessageDescriptor for message type: " + typeToConvert);
JsonTranscodingServiceMethodProviderTests.cs (1)
228throw new InvalidOperationException($"Couldn't find gRPC endpoint for method {methodName}.");
UnaryServerCallHandlerTests.cs (4)
989throw new InvalidOperationException("exception"); 1039throw new InvalidOperationException("Error!"); 1067throw new InvalidOperationException("Error!"); 1461throw new InvalidOperationException("Exception!");
Microsoft.AspNetCore.Grpc.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
53throw new InvalidOperationException(message);
Microsoft.AspNetCore.Grpc.Swagger (39)
Internal\MessageDescriptorHelpers.cs (1)
67throw new InvalidOperationException("Unexpected field type: " + field.FieldType);
src\Grpc\JsonTranscoding\src\Shared\HttpRoutePatternParser.cs (14)
52throw new InvalidOperationException("Path template wasn't parsed to the end."); 57throw new InvalidOperationException($"Error parsing path template '{_input}'.", ex); 66throw new InvalidOperationException("Path template must start with a '/'."); 74throw new InvalidOperationException("Path segment must end with a '/'."); 90throw new InvalidOperationException("Route template shouldn't end with a '/'."); 113throw new InvalidOperationException("Only literal segments can follow a catch-all segment."); 139throw new InvalidOperationException("Only literal segments can follow a catch-all segment."); 172throw new InvalidOperationException("Empty literal segment."); 184throw new InvalidOperationException("Incomplete or empty field path."); 196throw new InvalidOperationException("Empty verb."); 253throw new InvalidOperationException("Path template has an empty segment."); 277throw new InvalidOperationException($"Expected '{c}' when parsing path template."); 318throw new InvalidOperationException("Unexpected error when updating variable."); 330throw new InvalidOperationException("Variable can't be nested.");
src\Grpc\JsonTranscoding\src\Shared\Legacy.cs (12)
67throw new InvalidOperationException($"Invalid Timestamp value: {value}"); 99throw new InvalidOperationException($"Invalid Timestamp value: {value}"); 104throw new InvalidOperationException($"Invalid Timestamp value: {value}"); 122throw new InvalidOperationException($"Invalid Timestamp value: {value}"); 130throw new InvalidOperationException($"Invalid Timestamp value: {value}"); 173throw new InvalidOperationException("Non-normalized timestamp value."); 182throw new InvalidOperationException("Invalid Duration value: " + value); 189throw new InvalidOperationException("Invalid Duration value: " + value); 206throw new InvalidOperationException("Invalid Duration value: " + value); 213throw new InvalidOperationException("Invalid Duration value: " + value); 236throw new InvalidOperationException("Non-normalized duration value."); 312throw new InvalidOperationException($"Invalid field mask: {text}");
src\Grpc\JsonTranscoding\src\Shared\ServiceDescriptorHelpers.cs (12)
63throw new InvalidOperationException($"Get not find Descriptor property on {serviceReflectionType.Name}."); 161throw new InvalidOperationException("Base64 encoded string required to convert to bytes."); 176throw new InvalidOperationException($"Invalid value '{s}' for enum type {descriptor.EnumType.Name}."); 181throw new InvalidOperationException("String required to convert to enum."); 221throw new InvalidOperationException("Unsupported type: " + descriptor.FieldType); 264throw new InvalidOperationException("Map field requires repeating keys and values."); 303throw new InvalidOperationException("Can't set multiple values onto a non-repeating field."); 397throw new InvalidOperationException($"Couldn't find matching field for route parameter '{string.Join(".", path)}' on {messageDescriptor.Name}."); 416throw new InvalidOperationException($"The body field '{body}' references a nested field. The body field name must be on the top-level request message."); 421throw new InvalidOperationException($"Couldn't find matching field for body '{body}' on {methodDescriptor.InputType.Name}."); 460throw new InvalidOperationException($"The response body field '{responseBody}' references a nested field. The response body field name must be on the top-level response message."); 465throw new InvalidOperationException($"Couldn't find matching field for response body '{responseBody}' on {methodDescriptor.OutputType.Name}.");
Microsoft.AspNetCore.HeaderPropagation (2)
DependencyInjection\HeaderPropagationApplicationBuilderExtensions.cs (1)
33throw new InvalidOperationException(_unableToFindServices);
HeaderPropagationMessageHandler.cs (1)
50throw new InvalidOperationException(message);
Microsoft.AspNetCore.HostFiltering (1)
MiddlewareConfigurationManager.cs (1)
32throw new InvalidOperationException("No allowed hosts were configured.");
Microsoft.AspNetCore.Hosting (20)
GenericHost\GenericWebHostBuilder.cs (3)
156exceptions.Add(new InvalidOperationException($"Startup assembly {assemblyName} failed to execute. See the inner exception for more details.", ex)); 207var instance = startupFactory(webHostBuilderContext) ?? throw new InvalidOperationException("The specified factory returned null startup instance."); 288throw new InvalidOperationException("A ValueType TContainerBuilder isn't supported with AOT.");
GenericHost\GenericWebHostService.cs (1)
130throw new InvalidOperationException($"No application configured. Please specify an application via IWebHostBuilder.UseStartup, IWebHostBuilder.Configure, or specifying the startup assembly via {nameof(WebHostDefaults.StartupAssemblyKey)} in the web host configuration.");
Internal\ConfigureBuilder.cs (1)
46throw new InvalidOperationException(string.Format(
Internal\ConfigureContainerBuilder.cs (1)
30throw new InvalidOperationException($"The {MethodInfo.Name} method must take only one parameter.");
Internal\ConfigureServicesBuilder.cs (1)
42throw new InvalidOperationException("The ConfigureServices method must either be parameterless or take only one parameter of type IServiceCollection.");
Internal\StartupLoader.cs (8)
74throw new InvalidOperationException("ValueType startup container isn't supported with AOT."); 207throw new InvalidOperationException(message); 253throw new InvalidOperationException($"The assembly '{startupAssemblyName}' failed to load."); 283throw new InvalidOperationException(string.Format( 327throw new InvalidOperationException($"Having multiple overloads of method '{methodNameWithEnv}' is not supported."); 334throw new InvalidOperationException($"Having multiple overloads of method '{methodNameWithNoEnv}' is not supported."); 343throw new InvalidOperationException(string.Format( 356throw new InvalidOperationException(string.Format(
Internal\WebHost.cs (1)
193throw new InvalidOperationException($"No application configured. Please specify startup via IWebHostBuilder.UseStartup, IWebHostBuilder.Configure, injecting {nameof(IStartup)} or specifying the startup assembly via {nameof(WebHostDefaults.StartupAssemblyKey)} in the web host configuration.");
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
274public Stream CreateReadStream() => throw new InvalidOperationException("Can not create a stream for a directory.");
WebHostBuilder.cs (2)
133throw new InvalidOperationException(Resources.WebHostBuilder_SingleInstance); 249exceptions.Add(new InvalidOperationException($"Startup assembly {assemblyName} failed to execute. See the inner exception for more details.", ex));
WebHostBuilderExtensions.cs (1)
112var instance = startupFactory(context) ?? throw new InvalidOperationException("The specified factory returned null startup instance.");
Microsoft.AspNetCore.Hosting.FunctionalTests (3)
ShutdownTests.cs (2)
98throw new InvalidOperationException("Timeout while waiting for host process to output started message.", ex); 111throw new InvalidOperationException($"Timeout while waiting for host process to output completion message. The received output is: {output}", ex);
WebHostBuilderTests.cs (1)
59throw new InvalidOperationException("Timeout while waiting for output from host process.", ex);
Microsoft.AspNetCore.Hosting.Tests (15)
HostingMetricsTests.cs (1)
51hostingApplication.DisposeContext(context2, new InvalidOperationException("Test error"));
StaticWebAssets\ManifestStaticWebAssetsFileProviderTests.cs (5)
111_ => throw new InvalidOperationException("Unknown provider") 188_ => throw new InvalidOperationException("Unknown provider") 264_ => throw new InvalidOperationException("Unknown provider") 707throw new InvalidOperationException("Invalid content root"); 755throw new InvalidOperationException("Invalid content root");
WebHostBuilderTests.cs (6)
88.UseStartup<object>(context => throw new InvalidOperationException("This doesn't run")) 91throw new InvalidOperationException("This doesn't run"); 1222throw new InvalidOperationException("Startup exception"); 1246throw new InvalidOperationException("Startup exception"); 1530throw new InvalidOperationException("Hosted Service throws in StartAsync"); 1743throw new InvalidOperationException();
WebHostTests.cs (3)
1116throw new InvalidOperationException(); 1122throw new InvalidOperationException(); 1138throw new InvalidOperationException();
Microsoft.AspNetCore.Hosting.TestSites (1)
Program.cs (1)
53throw new InvalidOperationException("Starting mechanic not specified");
Microsoft.AspNetCore.Http (13)
BindingAddress.cs (3)
30throw new InvalidOperationException("This constructor is obsolete and will be removed in a future version. Use BindingAddress.Parse(address) to create a BindingAddress instance."); 78throw new InvalidOperationException("Binding address is not a unix pipe."); 94throw new InvalidOperationException("Binding address is not a named pipe.");
Builder\ApplicationBuilder.cs (1)
178throw new InvalidOperationException(message);
DefaultHttpContext.cs (1)
205throw new InvalidOperationException("Session has not been configured for this application " +
Features\FormFeature.cs (4)
148throw new InvalidOperationException("This request does not have a Content-Type header. Forms are available from requests with bodies like POSTs and a form Content-Type of either application/x-www-form-urlencoded or multipart/form-data."); 181throw new InvalidOperationException("Cannot read form from this request. Request is 'null'."); 189throw new InvalidOperationException("Incorrect Content-Type: " + _request.ContentType); 372throw new InvalidOperationException("This form is being accessed with an invalid anti-forgery token. Validate the `IAntiforgeryValidationFeature` on the request before reading from the form.");
HeaderDictionary.cs (1)
373throw new InvalidOperationException("The response headers cannot be modified because the response has already started.");
Internal\ReferenceReadStream.cs (1)
70throw new InvalidOperationException("The inner stream position has changed unexpectedly.");
RequestFormReaderExtensions.cs (1)
29throw new InvalidOperationException("Incorrect Content-Type: " + request.ContentType);
Timeouts\RequestTimeoutsMiddleware.cs (1)
73throw new InvalidOperationException($"The requested timeout policy '{timeoutMetadata.PolicyName}' is not available.");
Microsoft.AspNetCore.Http.Abstractions (16)
Extensions\ResponseTrailerExtensions.cs (1)
49throw new InvalidOperationException("Trailers are not supported for this response.");
Extensions\UseMiddlewareExtensions.cs (8)
74throw new InvalidOperationException(Resources.FormatException_UseMiddleMutlipleInvokes(InvokeMethodName, InvokeAsyncMethodName)); 83throw new InvalidOperationException(Resources.FormatException_UseMiddlewareNoInvokeMethod(InvokeMethodName, InvokeAsyncMethodName, middleware)); 88throw new InvalidOperationException(Resources.FormatException_UseMiddlewareNonTaskReturnType(InvokeMethodName, InvokeAsyncMethodName, nameof(Task))); 94throw new InvalidOperationException(Resources.FormatException_UseMiddlewareNoParameters(InvokeMethodName, InvokeAsyncMethodName, nameof(HttpContext))); 147throw new InvalidOperationException(Resources.FormatException_UseMiddlewareIServiceProviderNotAvailable(nameof(IServiceProvider))); 175throw new InvalidOperationException(Resources.FormatException_UseMiddlewareNoMiddlewareFactory(typeof(IMiddlewareFactory))); 182throw new InvalidOperationException(Resources.FormatException_UseMiddlewareUnableToCreateMiddleware(middlewareFactory.GetType(), _middlewareType)); 300throw new InvalidOperationException(Resources.FormatException_InvokeMiddlewareNoService(type, middleware));
Metadata\ProducesResponseTypeMetadata.cs (1)
48throw new InvalidOperationException($"Could not parse '{type}'. Content types with wildcards are not supported.");
Routing\EndpointMetadataCollection.cs (1)
141return metadata ?? throw new InvalidOperationException($"Metadata '{typeof(T)}' is not found.");
Routing\RouteValueDictionary.cs (1)
914throw new InvalidOperationException(message);
src\Shared\ActivatorUtilities\ActivatorUtilities.cs (2)
51throw new InvalidOperationException(message); 158throw new InvalidOperationException($"Unable to resolve service for type '{_parameters[index].ParameterType}' while attempting to activate '{_constructor.DeclaringType}'.");
src\Shared\UrlDecoder\UrlDecoder.cs (2)
108throw new InvalidOperationException("The path contains null characters."); 446throw new InvalidOperationException("The path contains null characters.");
Microsoft.AspNetCore.Http.Abstractions.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
53throw new InvalidOperationException(message);
Microsoft.AspNetCore.Http.Connections (4)
Internal\HttpConnectionsMetrics.cs (2)
86_ => throw new InvalidOperationException("Unexpected value: " + transportType) 97_ => throw new InvalidOperationException("Unexpected value: " + connectionStopStatus)
ServerSentEventsMessageFormatter.cs (1)
63throw new InvalidOperationException("Could not get last segment from sequence.");
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
63throw new InvalidOperationException("The reader wasn't returned!");
Microsoft.AspNetCore.Http.Connections.Client (12)
HttpConnection.cs (6)
63throw new InvalidOperationException($"Cannot access the {nameof(Transport)} pipe before the connection has started."); 86set => throw new InvalidOperationException("The ConnectionId is set internally and should not be set by user code."); 321throw new InvalidOperationException("Negotiation can only be skipped when using the WebSocket transport directly."); 351throw new InvalidOperationException("Negotiate redirection limit exceeded."); 488throw new InvalidOperationException(negotiateResponse.Error); 611throw new InvalidOperationException("Configured HttpMessageHandlerFactory did not return a value.");
HttpConnectionFactory.cs (1)
55throw new InvalidOperationException($"If {nameof(HttpConnectionOptions)}.{nameof(HttpConnectionOptions.Url)} was set, it must match the {nameof(UriEndPoint)}.{nameof(UriEndPoint.Uri)} passed to {nameof(ConnectAsync)}.");
Internal\DefaultTransportFactory.cs (1)
61throw new InvalidOperationException("No requested transports available on the server.");
Internal\WebSocketsTransport.cs (4)
310throw new InvalidOperationException("Configured WebSocketFactory did not return a value."); 415throw new InvalidOperationException("Reconnect attempt failed.", innerException: ex); 452throw new InvalidOperationException($"Websocket closed with error: {socket.CloseStatus}."); 479throw new InvalidOperationException($"Websocket closed with error: {socket.CloseStatus}.");
Microsoft.AspNetCore.Http.Connections.Common (3)
NegotiateProtocol.cs (1)
214throw new InvalidOperationException("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");
src\SignalR\common\Shared\ReusableUtf8JsonWriter.cs (1)
46throw new InvalidOperationException("The writer wasn't returned!");
src\SignalR\common\Shared\Utf8BufferTextWriter.cs (1)
51throw new InvalidOperationException("The writer wasn't returned!");
Microsoft.AspNetCore.Http.Connections.Tests (6)
HttpConnectionDispatcherTests.cs (2)
2747connection.Transport.Output.Complete(new InvalidOperationException()); 3827throw new InvalidOperationException();
HttpConnectionManagerTests.cs (1)
323tcs.TrySetException(new InvalidOperationException("Error"));
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (1)
111throw new InvalidOperationException();
TestWebSocketConnectionFeature.cs (1)
188throw new InvalidOperationException("Unexpected close");
WebSocketsTests.cs (1)
188connection.Transport.Output.Complete(new InvalidOperationException("Catastrophic failure."));
Microsoft.AspNetCore.Http.Extensions (58)
HttpRequestJsonExtensions.cs (2)
312throw new InvalidOperationException($"Unable to read the request as JSON because the request content type '{request.ContentType}' is not a known JSON content type."); 342throw new InvalidOperationException($"Unable to read the request as JSON because the request content type charset '{charset}' is not a known encoding.", ex);
ProblemDetailsService.cs (1)
22throw new InvalidOperationException("Unable to find a registered `IProblemDetailsWriter` that can write to the given context.");
RequestDelegateFactory.cs (11)
660throw new InvalidOperationException(errorMessage); 667throw new InvalidOperationException(errorMessage); 672throw new InvalidOperationException(errorMessage); 682throw new InvalidOperationException($"Encountered a parameter of type '{parameter.ParameterType}' without a name. Parameters must have a name."); 709throw new InvalidOperationException($"'{routeName}' is not a route parameter."); 793throw new InvalidOperationException($"Unable to resolve service referenced by {nameof(FromKeyedServicesAttribute)}. The service provider doesn't support keyed services."); 1541throw new InvalidOperationException($"The nullable type '{TypeNameHelper.GetTypeDisplayName(parameter.ParameterType, fullName: false)}' is not supported, mark the parameter as non-nullable."); 1657throw new InvalidOperationException($"{parameter.Name} must have a valid TryParse method to support converting from a string. No public static bool {typeName}.TryParse(string, out {typeName}) method found for {parameter.Name}."); 2771throw new InvalidOperationException("The IResult in Task<IResult> response must not be null."); 2779throw new InvalidOperationException("The Task returned by the Delegate must not be null."); 2787throw new InvalidOperationException("The IResult returned by the Delegate must not be null.");
ResponseExtensions.cs (1)
24throw new InvalidOperationException("The response cannot be cleared, it has already started sending.");
src\Components\Endpoints\src\FormMapping\Factories\CollectionConverterFactory.cs (1)
66throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'.");
src\Components\Endpoints\src\FormMapping\Factories\Collections\ConcreteTypeCollectionConverterFactory.cs (2)
24throw new InvalidOperationException($"Unable to create converter for '{typeof(TCollection).FullName}'."); 31throw new InvalidOperationException($"Unable to create converter for type '{typeof(TCollection).FullName}'.");
src\Components\Endpoints\src\FormMapping\Factories\Collections\TypedCollectionConverterFactory.cs (5)
93_ => throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'."), 115throw new InvalidOperationException($"Unable to create converter for '{typeof(TCollection).FullName}'."); 166_ => throw new InvalidOperationException($"Unable to create converter for '{typeof(TCollection).FullName}'.") 204_ => throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'."), 208throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'.");
src\Components\Endpoints\src\FormMapping\Factories\ComplexType\ComplexTypeExpressionConverterFactoryOfT.cs (1)
27throw new InvalidOperationException($"Could not resolve metadata for type '{type.FullName}'.");
src\Components\Endpoints\src\FormMapping\Factories\ComplexTypeConverterFactory.cs (1)
104throw new InvalidOperationException($"Could not create a converter factory for type {type}.");
src\Components\Endpoints\src\FormMapping\Factories\Dictionary\ConcreteTypeDictionaryConverterFactory.cs (3)
23throw new InvalidOperationException($"Unable to create converter for '{typeof(TDictionary).FullName}'."); 26throw new InvalidOperationException($"Unable to create converter for '{typeof(TDictionary).FullName}'."); 33throw new InvalidOperationException($"Unable to create converter for type '{typeof(TDictionary).FullName}'.");
src\Components\Endpoints\src\FormMapping\Factories\Dictionary\TypedDictionaryConverterFactory.cs (5)
37_ => throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'."), 77throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'."); 103_ => throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'."), 145_ => throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'."), 149throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'.");
src\Components\Endpoints\src\FormMapping\Factories\DictionaryConverterFactory.cs (6)
81throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'."); 88throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'."); 94throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'."); 101throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'."); 107throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'."); 115throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'.");
src\Components\Endpoints\src\FormMapping\Factories\EnumConverterFactory.cs (1)
20throw new InvalidOperationException($"Cannot create converter for type '{type}'.");
src\Components\Endpoints\src\FormMapping\Factories\FileConverterFactory.cs (1)
29throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'.");
src\Components\Endpoints\src\FormMapping\Factories\NullableConverterFactory.cs (1)
35throw new InvalidOperationException($"Unable to create converter for type '{type}'.");
src\Components\Endpoints\src\FormMapping\Factories\ParsableConverterFactory.cs (1)
25throw new InvalidOperationException($"Unable to create converter for '{type.FullName}'.");
src\Components\Endpoints\src\FormMapping\FormDataMapperOptions.cs (1)
70throw new InvalidOperationException($"No converter registered for type '{type.FullName}'.");
src\Components\Endpoints\src\FormMapping\FormDataReader.cs (1)
232throw new InvalidOperationException($"The maximum recursion depth of '{MaxRecursionDepth}' was exceeded for '{_currentPrefixBuffer}{separator}{key}'.");
src\Components\Endpoints\src\FormMapping\Metadata\FormDataMetadataFactory.cs (2)
325throw new InvalidOperationException("Cannot begin a new resolution graph while one is already in progress."); 334throw new InvalidOperationException("Cannot end a resolution graph while one is not in progress.");
src\Shared\Json\JsonSerializerExtensions.cs (1)
26=> context.GetTypeInfo(type) ?? throw new InvalidOperationException($"Unable to obtain the JsonTypeInfo for type '{type.FullName}' from the context '{context.GetType().FullName}'.");
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (1)
140throw new InvalidOperationException($"Cannot call {nameof(GetDefaultValueForParameter)}, because no parameter default values were supplied.");
src\Shared\ParameterBindingMethodCache.cs (7)
194throw new InvalidOperationException(stringBuilder.ToString()); 290throw new InvalidOperationException(stringBuilder.ToString()); 340throw new InvalidOperationException( 357throw new InvalidOperationException($"The abstract type '{TypeNameHelper.GetTypeDisplayName(type, fullName: false)}' is not supported."); 397throw new InvalidOperationException($"Only a single public parameterized constructor is allowed for type '{TypeNameHelper.GetTypeDisplayName(type, fullName: false)}'."); 400throw new InvalidOperationException($"No public parameterless constructor found for type '{TypeNameHelper.GetTypeDisplayName(type, fullName: false)}'."); 460throw new InvalidOperationException($"{TypeNameHelper.GetTypeDisplayName(type, fullName: false)} implements multiple interfaces defining a static {interfaceMethod} method causing ambiguity.");
src\Shared\PropertyAsParameterInfo.cs (2)
81throw new InvalidOperationException($"Encountered a parameter of type '{parameters[i].ParameterType}' without a name. Parameters must have a name."); 103throw new InvalidOperationException($"The nullable type '{TypeNameHelper.GetTypeDisplayName(parameters[i].ParameterType, fullName: false)}' is not supported.");
Microsoft.AspNetCore.Http.Extensions.Tests (2)
RequestDelegateFactoryTests.cs (1)
561throw new InvalidOperationException();
RequestDelegateGenerator\SharedTypes.cs (1)
468throw new InvalidOperationException("BindAsync failed");
Microsoft.AspNetCore.Http.Microbenchmarks (2)
src\Http\Http.Extensions\test\RequestDelegateGenerator\SharedTypes.cs (1)
468throw new InvalidOperationException("BindAsync failed");
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
53throw new InvalidOperationException(message);
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
src\Shared\RoslynUtils\SymbolExtensions.cs (1)
149_ => throw new InvalidOperationException("Unexpected symbol type: " + symbol)
src\Shared\RoslynUtils\WellKnownTypes.cs (1)
80throw new InvalidOperationException($"Failed to resolve well-known type '{WellKnownTypeData.WellKnownTypeNames[index]}'.");
Microsoft.AspNetCore.Http.Results (13)
AcceptedAtRoute.cs (1)
90throw new InvalidOperationException("No route matches the supplied values.");
AcceptedAtRouteOfT.cs (1)
104throw new InvalidOperationException("No route matches the supplied values.");
CreatedAtRoute.cs (1)
90throw new InvalidOperationException("No route matches the supplied values.");
CreatedAtRouteOfT.cs (1)
104throw new InvalidOperationException("No route matches the supplied values.");
RedirectHttpResult.cs (1)
101throw new InvalidOperationException("The supplied URL is not local. A URL with an absolute path is considered local if it does not have a host/authority part. URLs using virtual paths ('~/') are also local.");
RedirectToRouteHttpResult.cs (1)
171throw new InvalidOperationException("No route matches the supplied values.");
ResultsOfT.Generated.cs (5)
46throw new InvalidOperationException("The IResult assigned to the Result property must not be null."); 110throw new InvalidOperationException("The IResult assigned to the Result property must not be null."); 183throw new InvalidOperationException("The IResult assigned to the Result property must not be null."); 265throw new InvalidOperationException("The IResult assigned to the Result property must not be null."); 356throw new InvalidOperationException("The IResult assigned to the Result property must not be null.");
ResultsOfTHelper.cs (1)
42throw new InvalidOperationException($"Couldn't populate metadata for {typeof(TTarget).Name}. PopulateMetadata must by defined on the result type. A default interface implementation isn't supported with AOT.");
src\Shared\Json\JsonSerializerExtensions.cs (1)
26=> context.GetTypeInfo(type) ?? throw new InvalidOperationException($"Unable to obtain the JsonTypeInfo for type '{type.FullName}' from the context '{context.GetType().FullName}'.");
Microsoft.AspNetCore.Http.Results.Tests (1)
ResultsTests.cs (1)
1645_ => throw new InvalidOperationException()
Microsoft.AspNetCore.HttpLogging (6)
HttpLoggingAttribute.cs (2)
48throw new InvalidOperationException($"{nameof(RequestBodyLogLimit)} was not set. Check {nameof(IsRequestBodyLogLimitSet)} before accessing this property."); 76throw new InvalidOperationException($"{nameof(ResponseBodyLogLimit)} was not set. Check {nameof(IsResponseBodyLogLimitSet)} before accessing this property.");
HttpLoggingBuilderExtensions.cs (2)
52throw new InvalidOperationException(Resources.FormatUnableToFindServices( 64throw new InvalidOperationException(Resources.FormatUnableToFindServices(
HttpLoggingInterceptorContext.cs (1)
33get => _httpContext ?? throw new InvalidOperationException("HttpContext was not initialized.");
src\Shared\ValueStopwatch\ValueStopwatch.cs (1)
32throw new InvalidOperationException("An uninitialized, or 'default', ValueStopwatch cannot be used to get elapsed time.");
Microsoft.AspNetCore.HttpsPolicy (1)
HttpsRedirectionMiddleware.cs (1)
149throw new InvalidOperationException(
Microsoft.AspNetCore.Identity (3)
IdentityBuilderExtensions.cs (1)
77throw new InvalidOperationException(Resources.FormatInvalidManagerType(customType.Name, "SignInManager", builder.UserType.Name));
SecurityStampValidator.cs (1)
194throw new InvalidOperationException("RequestServices is null.");
SignInManager.cs (1)
99throw new InvalidOperationException("HttpContext must not be null.");
Microsoft.AspNetCore.Identity.EntityFrameworkCore (7)
IdentityEntityFrameworkBuilderExtensions.cs (2)
34throw new InvalidOperationException(Resources.NotIdentityUser); 44throw new InvalidOperationException(Resources.NotIdentityRole);
IdentityUserContext.cs (4)
190throw new InvalidOperationException(Resources.CanOnlyProtectStrings); 238throw new InvalidOperationException(Resources.CanOnlyProtectStrings); 283throw new InvalidOperationException(Resources.CanOnlyProtectStrings); 331throw new InvalidOperationException(Resources.CanOnlyProtectStrings);
UserStore.cs (1)
327throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Resources.RoleNotFound, normalizedRoleName));
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (1)
UserStoreEncryptPersonalDataTest.cs (1)
57throw new InvalidOperationException("Didn't find pad.");
Microsoft.AspNetCore.Identity.InMemory.Test (2)
InMemoryStore.cs (1)
82throw new InvalidOperationException("Unknown role");
InMemoryUserStore.cs (1)
257throw new InvalidOperationException("Unknown user");
Microsoft.AspNetCore.Identity.Test (1)
IdentityUIScriptsTest.cs (1)
180throw new InvalidOperationException($"Solution root could not be located using application root {applicationPath}.");
Microsoft.AspNetCore.Identity.UI (28)
Areas\Identity\Pages\V4\Account\ExternalLogin.cshtml.cs (1)
239throw new InvalidOperationException($"Can't create an instance of '{nameof(TUser)}'. " +
Areas\Identity\Pages\V4\Account\LoginWith2fa.cshtml.cs (2)
100throw new InvalidOperationException("Unable to load two-factor authentication user."); 121throw new InvalidOperationException("Unable to load two-factor authentication user.");
Areas\Identity\Pages\V4\Account\LoginWithRecoveryCode.cshtml.cs (2)
86throw new InvalidOperationException("Unable to load two-factor authentication user."); 104throw new InvalidOperationException("Unable to load two-factor authentication user.");
Areas\Identity\Pages\V4\Account\Manage\DeletePersonalData.cshtml.cs (1)
109throw new InvalidOperationException("Unexpected error occurred deleting user.");
Areas\Identity\Pages\V4\Account\Manage\Disable2fa.cshtml.cs (2)
60throw new InvalidOperationException($"Cannot disable 2FA for user as it's not currently enabled."); 77throw new InvalidOperationException("Unexpected error occurred disabling 2FA.");
Areas\Identity\Pages\V4\Account\Manage\ExternalLogins.cshtml.cs (1)
150throw new InvalidOperationException($"Unexpected error occurred loading external login info.");
Areas\Identity\Pages\V4\Account\Manage\GenerateRecoveryCodes.cshtml.cs (2)
69throw new InvalidOperationException($"Cannot generate recovery codes for user because they do not have 2FA enabled."); 86throw new InvalidOperationException("Cannot generate recovery codes for user as they do not have 2FA enabled.");
Areas\Identity\Pages\V4\Account\Register.cshtml.cs (1)
178throw new InvalidOperationException($"Can't create an instance of '{nameof(TUser)}'. " +
Areas\Identity\Pages\V5\Account\ExternalLogin.cshtml.cs (1)
239throw new InvalidOperationException($"Can't create an instance of '{nameof(TUser)}'. " +
Areas\Identity\Pages\V5\Account\LoginWith2fa.cshtml.cs (2)
100throw new InvalidOperationException($"Unable to load two-factor authentication user."); 121throw new InvalidOperationException($"Unable to load two-factor authentication user.");
Areas\Identity\Pages\V5\Account\LoginWithRecoveryCode.cshtml.cs (2)
86throw new InvalidOperationException($"Unable to load two-factor authentication user."); 104throw new InvalidOperationException($"Unable to load two-factor authentication user.");
Areas\Identity\Pages\V5\Account\Manage\DeletePersonalData.cshtml.cs (1)
109throw new InvalidOperationException($"Unexpected error occurred deleting user.");
Areas\Identity\Pages\V5\Account\Manage\Disable2fa.cshtml.cs (2)
60throw new InvalidOperationException($"Cannot disable 2FA for user as it's not currently enabled."); 77throw new InvalidOperationException($"Unexpected error occurred disabling 2FA.");
Areas\Identity\Pages\V5\Account\Manage\ExternalLogins.cshtml.cs (1)
150throw new InvalidOperationException($"Unexpected error occurred loading external login info.");
Areas\Identity\Pages\V5\Account\Manage\GenerateRecoveryCodes.cshtml.cs (2)
69throw new InvalidOperationException($"Cannot generate recovery codes for user because they do not have 2FA enabled."); 86throw new InvalidOperationException($"Cannot generate recovery codes for user as they do not have 2FA enabled.");
Areas\Identity\Pages\V5\Account\Register.cshtml.cs (1)
178throw new InvalidOperationException($"Can't create an instance of '{nameof(TUser)}'. " +
IdentityBuilderUIExtensions.cs (2)
98throw new InvalidOperationException( 145throw new InvalidOperationException($"Unknown framework: {_framework}");
IdentityPageModelConvention.cs (2)
28throw new InvalidOperationException("Implementation type can't be abstract or non generic."); 33throw new InvalidOperationException("Implementation type contains wrong generic arity.");
Microsoft.AspNetCore.InternalTesting (5)
AssemblyTestLog.cs (3)
132throw new InvalidOperationException("Output file path could not be constructed due to max path length restrictions. Please shorten test assembly, class or method names."); 234throw new InvalidOperationException($"Unexpected initial {nameof(ForAssembly)} caller."); 268?? throw new InvalidOperationException($"No {nameof(TestFrameworkFileLoggerAttribute)} found on the assembly {assembly.GetName().Name}. "
LoggedTest\LoggedTestBase.cs (1)
110throw new InvalidOperationException("LoggedTest base class was used but nothing initialized it! The test framework may not be enabled. Try cleaning your 'obj' directory.");
xunit\QuarantinedTestTraitDiscoverer.cs (1)
22throw new InvalidOperationException("The 'QuarantinedTest' attribute is only supported via reflection.");
Microsoft.AspNetCore.JsonPatch (1)
JsonPatchDocumentOfT.cs (1)
709throw new InvalidOperationException(Resources.FormatExpressionTypeNotSupported(expr));
Microsoft.AspNetCore.Mvc.Abstractions (11)
ModelBinding\ModelMetadata.cs (1)
590_recordTypeValidatorsOnPropertiesError = new InvalidOperationException(
ModelBinding\ModelStateDictionary.cs (3)
412throw new InvalidOperationException(Resources.Validation_InvalidFieldCannotBeReset); 432throw new InvalidOperationException(Resources.Validation_InvalidFieldCannotBeReset_ToSkipped); 569throw new InvalidOperationException(Resources.FormatModelStateDictionary_MaxModelStateDepth(MaxStateDepth));
src\Shared\ParameterBindingMethodCache.cs (7)
194throw new InvalidOperationException(stringBuilder.ToString()); 290throw new InvalidOperationException(stringBuilder.ToString()); 340throw new InvalidOperationException( 357throw new InvalidOperationException($"The abstract type '{TypeNameHelper.GetTypeDisplayName(type, fullName: false)}' is not supported."); 397throw new InvalidOperationException($"Only a single public parameterized constructor is allowed for type '{TypeNameHelper.GetTypeDisplayName(type, fullName: false)}'."); 400throw new InvalidOperationException($"No public parameterless constructor found for type '{TypeNameHelper.GetTypeDisplayName(type, fullName: false)}'."); 460throw new InvalidOperationException($"{TypeNameHelper.GetTypeDisplayName(type, fullName: false)} implements multiple interfaces defining a static {interfaceMethod} method causing ambiguity.");
Microsoft.AspNetCore.Mvc.Abstractions.Test (2)
ModelBinding\ModelStateDictionaryTest.cs (2)
269entry.Errors.Add(new ModelError(new InvalidOperationException())); 1197dictionary.TryAddModelError("key", new InvalidOperationException(), metadata);
Microsoft.AspNetCore.Mvc.Analyzers (1)
src\Shared\Roslyn\MvcFacts.cs (1)
107throw new InvalidOperationException($"{nameof(method.OverriddenMethod)} cannot be null.");
Microsoft.AspNetCore.Mvc.Api.Analyzers (2)
src\Shared\Roslyn\MvcFacts.cs (1)
107throw new InvalidOperationException($"{nameof(method.OverriddenMethod)} cannot be null.");
SymbolApiConventionMatcher.cs (1)
75throw new InvalidOperationException($"{nameof(symbolCache.ApiConventionNameMatchAttribute)} does not appear well formed.");
Microsoft.AspNetCore.Mvc.ApiExplorer (3)
EndpointMetadataApiDescriptionProvider.cs (1)
220throw new InvalidOperationException($"Encountered a parameter of type '{parameter.ParameterType}' without a name. Parameters must have a name.");
src\Shared\PropertyAsParameterInfo.cs (2)
81throw new InvalidOperationException($"Encountered a parameter of type '{parameters[i].ParameterType}' without a name. Parameters must have a name."); 103throw new InvalidOperationException($"The nullable type '{TypeNameHelper.GetTypeDisplayName(parameters[i].ParameterType, fullName: false)}' is not supported.");
Microsoft.AspNetCore.Mvc.Core (102)
AcceptedAtActionResult.cs (1)
87throw new InvalidOperationException(Resources.NoRoutesMatched);
AcceptedAtRouteResult.cs (1)
83throw new InvalidOperationException(Resources.NoRoutesMatched);
ApplicationModels\ApiBehaviorApplicationModelProvider.cs (1)
100throw new InvalidOperationException(message);
ApplicationModels\ApplicationModelFactory.cs (3)
99throw new InvalidOperationException(message); 106throw new InvalidOperationException(message); 112throw new InvalidOperationException(message);
ApplicationModels\AttributeRouteModel.cs (7)
314throw new InvalidOperationException(message); 322throw new InvalidOperationException(message); 344throw new InvalidOperationException(message); 352throw new InvalidOperationException(message); 372throw new InvalidOperationException(message); 392throw new InvalidOperationException(message); 416throw new InvalidOperationException(message);
ApplicationModels\ControllerActionDescriptorBuilder.cs (1)
125throw new InvalidOperationException(Resources.FormatApiExplorer_UnsupportedAction(
ApplicationModels\InferParameterBindingInfoConvention.cs (1)
103throw new InvalidOperationException(message);
ApplicationParts\ApplicationPartFactory.cs (1)
48throw new InvalidOperationException(Resources.FormatApplicationPartFactory_InvalidFactoryType(
ApplicationParts\RelatedAssemblyAttribute.cs (1)
85throw new InvalidOperationException(
Authorization\AuthorizeFilter.cs (1)
110throw new InvalidOperationException(
Builder\ControllerEndpointRouteBuilderExtensions.cs (1)
503throw new InvalidOperationException(Resources.FormatUnableToFindServices(
Builder\MvcApplicationBuilderExtensions.cs (2)
76throw new InvalidOperationException(message); 123throw new InvalidOperationException(Resources.FormatUnableToFindServices(
ConsumesAttribute.cs (1)
248throw new InvalidOperationException(
CreatedAtActionResult.cs (1)
87throw new InvalidOperationException(Resources.NoRoutesMatched);
CreatedAtRouteResult.cs (1)
83throw new InvalidOperationException(Resources.NoRoutesMatched);
Filters\ControllerActionFilter.cs (1)
28throw new InvalidOperationException(Resources.FormatPropertyOfTypeCannotBeNull(
Filters\ControllerResultFilter.cs (1)
28throw new InvalidOperationException(Resources.FormatPropertyOfTypeCannotBeNull(
Filters\DefaultFilterProvider.cs (1)
57throw new InvalidOperationException(Resources.FormatTypeMethodMustReturnNotNullValue(
Filters\MiddlewareFilterBuilder.cs (1)
46throw new InvalidOperationException(
Filters\MiddlewareFilterConfigurationProvider.cs (5)
24throw new InvalidOperationException( 47throw new InvalidOperationException( 54throw new InvalidOperationException( 62throw new InvalidOperationException( 110throw new InvalidOperationException(
Filters\OutputCacheFilter.cs (1)
42throw new InvalidOperationException(
Filters\ResponseCacheFilterExecutor.cs (2)
64throw new InvalidOperationException( 86throw new InvalidOperationException(
Formatters\InputFormatter.cs (2)
47throw new InvalidOperationException(message); 129throw new InvalidOperationException(message);
Formatters\OutputFormatter.cs (2)
42throw new InvalidOperationException(message); 103throw new InvalidOperationException(message);
Formatters\TextInputFormatter.cs (1)
81throw new InvalidOperationException(message);
Formatters\TextOutputFormatter.cs (3)
71throw new InvalidOperationException(message); 117throw new InvalidOperationException(Resources.FormatOutputFormatterNoMediaType(GetType().FullName)); 159throw new InvalidOperationException(message);
Infrastructure\ActionMethodExecutor.cs (2)
360throw new InvalidOperationException(Resources.FormatActionResult_ActionReturnValueCannotBeNull(type)); 369throw new InvalidOperationException(Resources.FormatActionResult_ActionReturnValueCannotBeNull(declaredType));
Infrastructure\AsyncEnumerableReader.cs (1)
89throw new InvalidOperationException(Resources.FormatObjectResultExecutor_MaxEnumerationExceeded(
Infrastructure\ControllerActionInvoker.cs (2)
285throw new InvalidOperationException(); 374throw new InvalidOperationException(message);
Infrastructure\DefaultOutputFormatterSelector.cs (2)
63throw new InvalidOperationException(Resources.FormatOutputFormattersAreRequired( 278throw new InvalidOperationException(message);
Infrastructure\LocalRedirectResultExecutor.cs (1)
46throw new InvalidOperationException(Resources.UrlNotLocal);
Infrastructure\RedirectToActionResultExecutor.cs (1)
50throw new InvalidOperationException(Resources.NoRoutesMatched);
Infrastructure\RedirectToPageResultExecutor.cs (1)
50throw new InvalidOperationException(Resources.FormatNoRoutesMatchedForPage(result.PageName));
Infrastructure\RedirectToRouteResultExecutor.cs (1)
46throw new InvalidOperationException(Resources.NoRoutesMatched);
Infrastructure\ResourceInvoker.cs (4)
902throw new InvalidOperationException(); 940throw new InvalidOperationException(message); 1342throw new InvalidOperationException(); // Unreachable. 1437throw new InvalidOperationException(message);
Infrastructure\SystemTextJsonResultExecutor.cs (1)
121throw new InvalidOperationException(Resources.FormatProperty_MustBeInstanceOfType(
Infrastructure\VirtualFileResultExecutor.cs (1)
110throw new InvalidOperationException(Resources.VirtualFileResultExecutor_NoFileProviderConfigured);
ModelBinding\Binders\BodyModelBinderProvider.cs (1)
77throw new InvalidOperationException(Resources.FormatInputFormattersAreRequired(
ModelBinding\Binders\CollectionModelBinder.cs (1)
389throw new InvalidOperationException(Resources.FormatModelBinding_ExceededMaxModelBindingCollectionSize(
ModelBinding\Binders\ComplexObjectModelBinder.cs (3)
197throw new InvalidOperationException( 202throw new InvalidOperationException( 208throw new InvalidOperationException(
ModelBinding\Binders\ComplexTypeModelBinder.cs (4)
479throw new InvalidOperationException(Resources.FormatComplexTypeModelBinder_NoParameterlessConstructor_ForType(modelType.FullName)); 486throw new InvalidOperationException( 491throw new InvalidOperationException( 497throw new InvalidOperationException(
ModelBinding\Binders\FormCollectionModelBinderProvider.cs (1)
27throw new InvalidOperationException(
ModelBinding\Binders\TryParseModelBinder.cs (1)
111?? throw new InvalidOperationException(Resources.FormatTryParseModelBinder_InvalidType(modelType, nameof(TryParseModelBinder)));
ModelBinding\DefaultModelBindingContext.cs (1)
290throw new InvalidOperationException(Resources.FormatModelBinding_ExceededMaxModelBindingRecursionDepth(
ModelBinding\Metadata\ModelAttributes.cs (1)
235throw new InvalidOperationException("Only one ModelMetadataType attribute is permitted per type.", e);
ModelBinding\ModelBinderFactory.cs (2)
57throw new InvalidOperationException(Resources.FormatModelBinderProvidersAreRequired( 76throw new InvalidOperationException(message);
ModelBinding\ModelBindingHelper.cs (4)
297throw new InvalidOperationException( 307throw new InvalidOperationException( 316throw new InvalidOperationException( 714throw new InvalidOperationException(
ModelBinding\Validation\DefaultComplexObjectValidationStrategy.cs (1)
98throw new InvalidOperationException(
ModelBinding\Validation\ValidationVisitor.cs (1)
312throw new InvalidOperationException(message)
ProducesAttribute.cs (1)
115throw new InvalidOperationException(
ProducesResponseTypeAttribute.cs (1)
114throw new InvalidOperationException(Resources.FormatGetContentTypes_WildcardsNotSupported(type));
ResponseCacheAttribute.cs (1)
92throw new InvalidOperationException(Resources.FormatCacheProfileNotFound(CacheProfileName));
Routing\ActionEndpointFactory.cs (2)
142throw new InvalidOperationException( 213throw new InvalidOperationException("Failed to create a conventional route for pattern: " + route.Pattern);
Routing\ControllerActionEndpointDataSource.cs (1)
145throw new InvalidOperationException("This endpoint is not expected to be executed directly.");
Routing\DynamicControllerEndpointMatcherPolicy.cs (2)
96throw new InvalidOperationException(Resources.FormatStateShouldBeNullForRouteValueTransformers(transformerMetadata.SelectorType.Name)); 121throw new InvalidOperationException(
Routing\DynamicControllerEndpointSelectorCache.cs (1)
36throw new InvalidOperationException($"Data source with key '{key}' not registered.");
Routing\KnownRouteValueConstraint.cs (1)
81throw new InvalidOperationException(
Routing\MvcAttributeRouteHandler.cs (2)
51throw new InvalidOperationException(message); 77throw new InvalidOperationException(
Routing\MvcRouteHandler.cs (1)
65throw new InvalidOperationException(
Routing\UrlHelper.cs (1)
41throw new InvalidOperationException("Could not find an IRouter associated with the ActionContext. "
Routing\UrlHelperBase.cs (1)
402throw new InvalidOperationException(Resources.FormatUrlHelper_RelativePagePathIsNotSupported(
SignOutResult.cs (1)
107throw new InvalidOperationException(
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
180throw new InvalidOperationException("The cookie key and options are larger than ChunksSize, leaving no room for data.");
src\Shared\Json\JsonSerializerExtensions.cs (1)
26=> context.GetTypeInfo(type) ?? throw new InvalidOperationException($"Unable to obtain the JsonTypeInfo for type '{type.FullName}' from the context '{context.GetType().FullName}'.");
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (1)
140throw new InvalidOperationException($"Cannot call {nameof(GetDefaultValueForParameter)}, because no parameter default values were supplied.");
src\Shared\ValueStopwatch\ValueStopwatch.cs (1)
32throw new InvalidOperationException("An uninitialized, or 'default', ValueStopwatch cannot be used to get elapsed time.");
Microsoft.AspNetCore.Mvc.Core.Test (12)
Filters\MiddlewareFilterBuilderTest.cs (3)
134Exception = new InvalidOperationException("Error!!!"), 183throw new InvalidOperationException("Error!!!"); 251throw new InvalidOperationException("Error!!!");
Filters\MiddlewareFilterTest.cs (2)
141throw new InvalidOperationException(expectedMessage); 188throw new InvalidOperationException(expectedMessage);
Infrastructure\ControllerActionInvokerTest.cs (2)
1619throw new InvalidOperationException($"Unexpected action result {result}."); 1627throw new InvalidOperationException($"Unexpected exception {exception}.");
ModelBinding\Validation\DefaultCollectionValidationStrategyTest.cs (1)
137throw new InvalidOperationException();
ModelBinding\Validation\DefaultObjectValidatorTests.cs (2)
1582throw new InvalidOperationException(); 1587throw new InvalidOperationException();
ModelBinding\Validation\ExplicitIndexCollectionValidationStrategyTest.cs (1)
197throw new InvalidOperationException();
Routing\DynamicControllerEndpointMatcherPolicyTest.cs (1)
113throw new InvalidOperationException();
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
NonSeekableReadableStream.cs (1)
63throw new InvalidOperationException("Cannot perform synchronous reads");
Microsoft.AspNetCore.Mvc.Cors (1)
CorsAuthorizationFilter.cs (1)
82throw new InvalidOperationException(
Microsoft.AspNetCore.Mvc.DataAnnotations (2)
DataAnnotationsMetadataProvider.cs (1)
356throw new InvalidOperationException("Unsupported ModelMetadataKind: " + context.Key.MetadataKind);
ValidatableObjectAdapter.cs (1)
26throw new InvalidOperationException(message);
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (2)
FlushReportingStream.cs (2)
17throw new InvalidOperationException("Flush should not have been called."); 22throw new InvalidOperationException("FlushAsync should not have been called.");
Microsoft.AspNetCore.Mvc.FunctionalTests (3)
Infrastructure\HttpClientExtensions.cs (1)
29throw new InvalidOperationException("Response content could not be parsed as HTML: " + Environment.NewLine + content);
src\Shared\SizeLimitedStream.cs (2)
51throw new InvalidOperationException("The maximum number of bytes have been read."); 84throw new InvalidOperationException("The maximum number of bytes have been read.");
Microsoft.AspNetCore.Mvc.Localization (1)
ViewLocalizer.cs (1)
35throw new InvalidOperationException($"{nameof(hostingEnvironment)}.ApplicationName must have a value.");
Microsoft.AspNetCore.Mvc.NewtonsoftJson (9)
BsonTempDataSerializer.cs (3)
80throw new InvalidOperationException(message); 107throw new InvalidOperationException(message); 160throw new InvalidOperationException(errorMessage);
DependencyInjection\MvcNewtonsoftJsonOptionsExtensions.cs (4)
41throw new InvalidOperationException(Resources.FormatContractResolverCannotBeNull(nameof(JsonSerializerSettings.ContractResolver))); 45throw new InvalidOperationException( 73throw new InvalidOperationException(Resources.FormatContractResolverCannotBeNull(nameof(JsonSerializerSettings.ContractResolver))); 77throw new InvalidOperationException(
NewtonsoftJsonResultExecutor.cs (1)
156throw new InvalidOperationException(Resources.FormatProperty_MustBeInstanceOfType(
src\Mvc\Mvc.Core\src\Infrastructure\AsyncEnumerableReader.cs (1)
89throw new InvalidOperationException(Resources.FormatObjectResultExecutor_MaxEnumerationExceeded(
Microsoft.AspNetCore.Mvc.Razor (20)
ApplicationParts\RazorCompiledItemFeatureProvider.cs (1)
34throw new InvalidOperationException(message);
RazorPage.cs (7)
34throw new InvalidOperationException(message); 62throw new InvalidOperationException(Resources.FormatSectionAlreadyDefined(name)); 158throw new InvalidOperationException(message); 175throw new InvalidOperationException( 231throw new InvalidOperationException(Resources.FormatSectionsNotRendered(Path, sectionNames, nameof(IgnoreSection))); 239throw new InvalidOperationException(message); 259throw new InvalidOperationException(Resources.FormatRazorPage_MethodCannotBeCalled(methodName, Path));
RazorPageBase.cs (7)
65throw new InvalidOperationException(Resources.FormatViewContextMustBeSet(nameof(ViewContext), nameof(Output))); 243throw new InvalidOperationException(Resources.RazorPage_ThereIsNoActiveWritingScopeToEnd); 273throw new InvalidOperationException(Resources.RazorPage_NestingAttributeWritingScopesNotSupported); 301throw new InvalidOperationException(Resources.RazorPage_ThereIsNoActiveWritingScopeToEnd); 387throw new InvalidOperationException(Resources.FormatSectionAlreadyDefined(name)); 688throw new InvalidOperationException( 697throw new InvalidOperationException(message);
RazorView.cs (3)
216throw new InvalidOperationException(message); 226throw new InvalidOperationException( 294throw new InvalidOperationException(Resources.FormatLayoutCannotBeLocated(layoutPath, locations));
RazorViewEngine.cs (1)
474throw new InvalidOperationException(Resources.FormatAsyncDisposableViewsNotSupported(typeof(IAsyncDisposable).FullName));
TagHelpers\UrlResolutionTagHelper.cs (1)
253throw new InvalidOperationException(
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (2)
CSharpCompiler.cs (1)
154throw new InvalidOperationException(Resources.FormatUnsupportedDebugInformationFormat(dependencyContextOptions.DebugType));
RuntimeCompilationFileProvider.cs (1)
43throw new InvalidOperationException(message);
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (3)
TestInfrastructure\DirectoryNode.cs (3)
28throw new InvalidOperationException($"File {fileNode.Path} does not belong to {Path}."); 43throw new InvalidOperationException($"File {path} does not belong to {Path}."); 69throw new InvalidOperationException($"File {path} does not belong to {Path}.");
Microsoft.AspNetCore.Mvc.RazorPages (16)
ApplicationModels\CompiledPageActionDescriptorBuilder.cs (1)
41throw new InvalidOperationException(message);
ApplicationModels\DefaultPageApplicationModelProvider.cs (2)
69throw new InvalidOperationException(Resources.FormatInvalidPageType_WrongBase( 79throw new InvalidOperationException(Resources.FormatInvalidPageType_NoModelProperty(
CompiledPageActionDescriptor.cs (1)
73set => throw new InvalidOperationException("Setting the compiled descriptor on a compiled descriptor is not allowed.");
Filters\PageHandlerPageFilter.cs (1)
23throw new InvalidOperationException(Resources.FormatPropertyOfTypeCannotBeNull(
Filters\PageHandlerResultFIlter.cs (1)
23throw new InvalidOperationException(Resources.FormatPropertyOfTypeCannotBeNull(
Infrastructure\CompiledPageActionDescriptorProvider.cs (1)
71throw new InvalidOperationException($"A descriptor for '{pageActionDescriptor.RelativePath}' was not found.");
Infrastructure\DefaultPageFactoryProvider.cs (1)
46throw new InvalidOperationException(Resources.FormatActivatedInstance_MustBeAnInstanceOf(
Infrastructure\DefaultPageHandlerMethodSelector.cs (1)
52throw new InvalidOperationException(Resources.FormatAmbiguousHandler(Environment.NewLine, ambiguousMethods));
Infrastructure\DynamicPageEndpointMatcherPolicy.cs (2)
97throw new InvalidOperationException(Resources.FormatStateShouldBeNullForRouteValueTransformers(transformerMetadata.SelectorType.Name)); 120throw new InvalidOperationException(
Infrastructure\DynamicPageEndpointSelectorCache.cs (1)
43throw new InvalidOperationException($"Data source with key '{key}' not registered.");
Infrastructure\ExecutorFactory.cs (1)
49throw new InvalidOperationException(Resources.FormatUnsupportedHandlerMethodType(returnType));
Infrastructure\PageActionEndpointDataSource.cs (1)
85throw new InvalidOperationException("This endpoint is not expected to be executed directly.");
Infrastructure\PageActionInvoker.cs (2)
645throw new InvalidOperationException(); 685throw new InvalidOperationException(message);
Microsoft.AspNetCore.Mvc.RazorPages.Test (2)
Infrastructure\DynamicPageEndpointMatcherPolicyTest.cs (2)
87_ => throw new InvalidOperationException($"Invalid endpoint '{descriptor.DisplayName}'.") 130throw new InvalidOperationException();
Microsoft.AspNetCore.Mvc.TagHelpers (15)
AnchorTagHelper.cs (2)
183throw new InvalidOperationException( 215throw new InvalidOperationException(message);
ComponentTagHelper.cs (1)
93throw new InvalidOperationException(Resources.FormatAttributeIsRequired(RenderModeName, TagHelperName));
FormActionTagHelper.cs (2)
197throw new InvalidOperationException( 227throw new InvalidOperationException(message);
FormTagHelper.cs (2)
174throw new InvalidOperationException( 234throw new InvalidOperationException(message);
InputTagHelper.cs (4)
184throw new InvalidOperationException(Resources.FormatTagHelpers_NoProvidedMetadata( 308throw new InvalidOperationException(Resources.FormatInputTagHelper_InvalidStringResult( 317throw new InvalidOperationException(Resources.FormatInputTagHelper_InvalidExpressionResult( 379throw new InvalidOperationException(Resources.FormatInputTagHelper_ValueRequired(
PartialTagHelper.cs (2)
137throw new InvalidOperationException(errorMessage); 159throw new InvalidOperationException(
PersistComponentStateTagHelper.cs (1)
52_ => throw new InvalidOperationException("Invalid persistence mode."),
SelectTagHelper.cs (1)
88throw new InvalidOperationException(Resources.FormatTagHelpers_NoProvidedMetadata(
Microsoft.AspNetCore.Mvc.TagHelpers.Test (3)
ValidationSummaryTagHelperTest.cs (3)
68throw new InvalidOperationException("getChildContentAsync called unexpectedly"); 117throw new InvalidOperationException("getChildContentAsync called unexpectedly."); 185throw new InvalidOperationException("getChildContentAsync called unexpectedly.");
Microsoft.AspNetCore.Mvc.Testing (5)
.packages\microsoft.extensions.hostfactoryresolver.sources\9.0.0-preview.5.24265.2\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
246_hostTcs.TrySetException(new InvalidOperationException("The entry point exited without ever building an IHost.")); 285throw new InvalidOperationException($"Timed out waiting for the entry point to build the IHost after {s_defaultWaitTimeout}. This timeout can be modified using the '{TimeoutEnvironmentKey}' environment variable.");
WebApplicationFactory.cs (3)
187throw new InvalidOperationException(Resources.FormatMissingBuilderMethod( 366throw new InvalidOperationException(Resources.FormatInvalidAssemblyEntryPoint(typeof(TEntryPoint).Name)); 373throw new InvalidOperationException(Resources.FormatMissingDepsFile(
Microsoft.AspNetCore.Mvc.ViewFeatures (51)
AttributeDictionary.cs (1)
176throw new InvalidOperationException(Resources.FormatDictionary_DuplicateKey(item.Key));
DefaultDisplayTemplates.cs (1)
84throw new InvalidOperationException(Resources.FormatTemplates_TypeMustImplementIEnumerable(
DefaultEditorTemplates.cs (1)
66throw new InvalidOperationException(Resources.FormatTemplates_TypeMustImplementIEnumerable(
DefaultHtmlGenerator.cs (3)
945throw new InvalidOperationException( 1499throw new InvalidOperationException(Resources.FormatHtmlHelper_MissingSelectData( 1507throw new InvalidOperationException(Resources.FormatHtmlHelper_WrongSelectDataType(
DynamicViewData.cs (1)
31throw new InvalidOperationException(Resources.DynamicViewData_ViewDataNull);
ExpressionHelper.cs (1)
225throw new InvalidOperationException(
ExpressionMetadataProvider.cs (1)
72throw new InvalidOperationException(Resources.TemplateHelpers_TemplateLimitations);
Filters\AntiforgeryApplicationModelProvider.cs (1)
58throw new InvalidOperationException($"Cannot apply [{nameof(ValidateAntiForgeryTokenAttribute)}] and [{nameof(RequireAntiforgeryTokenAttribute)}] at the same time.");
Filters\SaveTempDataPropertyFilterBase.cs (1)
114throw new InvalidOperationException(string.Join(Environment.NewLine, errorMessages));
HtmlHelper.cs (2)
101throw new InvalidOperationException(Resources.HtmlHelper_NotContextualized); 536throw new InvalidOperationException(
Infrastructure\DefaultTempDataSerializer.cs (3)
71throw new InvalidOperationException(Resources.FormatTempData_CannotDeserializeType(item.Value.ValueKind)); 114throw new InvalidOperationException(Resources.FormatTempData_CannotDeserializeType(arrayElement.ValueKind)); 150throw new InvalidOperationException(
ModelExpressionProvider.cs (2)
56throw new InvalidOperationException( 81throw new InvalidOperationException(
PageRemoteAttribute.cs (1)
51throw new InvalidOperationException(Resources.RemoteAttribute_NoUrlFound);
RemoteAttribute.cs (1)
123throw new InvalidOperationException(Resources.RemoteAttribute_NoUrlFound);
src\Shared\PooledArrayBufferWriter.cs (1)
180throw new InvalidOperationException($"Cannot advance past the end of the buffer, which has a size of {capacity}.");
TemplateRenderer.cs (1)
136throw new InvalidOperationException(
ViewComponentResultExecutor.cs (1)
146throw new InvalidOperationException(Resources.FormatViewComponentResult_NameOrTypeMustBeSet(
ViewComponents\DefaultViewComponentActivator.cs (4)
60throw new InvalidOperationException(nameof(context)); 65throw new InvalidOperationException(nameof(viewComponent)); 78throw new InvalidOperationException(nameof(context)); 83throw new InvalidOperationException(nameof(viewComponent));
ViewComponents\DefaultViewComponentDescriptorProvider.cs (5)
74throw new InvalidOperationException( 79throw new InvalidOperationException( 89throw new InvalidOperationException(Resources.FormatViewComponent_AsyncMethod_ShouldReturnTask( 100throw new InvalidOperationException(Resources.FormatViewComponent_SyncMethod_ShouldReturnValue( 106throw new InvalidOperationException(Resources.FormatViewComponent_SyncMethod_CannotReturnTask(
ViewComponents\DefaultViewComponentHelper.cs (3)
74throw new InvalidOperationException(Resources.FormatViewComponent_CannotFindComponent( 105throw new InvalidOperationException(Resources.FormatViewComponent_CannotFindComponent( 141throw new InvalidOperationException(
ViewComponents\DefaultViewComponentInvoker.cs (6)
61throw new InvalidOperationException(Resources.ViewComponent_MustReturnValue); 110throw new InvalidOperationException(Resources.ViewComponent_MustReturnValue); 120throw new InvalidOperationException(Resources.ViewComponent_MustReturnValue); 130throw new InvalidOperationException(Resources.ViewComponent_MustReturnValue); 174throw new InvalidOperationException(Resources.ViewComponent_MustReturnValue); 192throw new InvalidOperationException(Resources.FormatViewComponent_InvalidReturnValue(
ViewComponents\DefaultViewComponentSelector.cs (1)
101throw new InvalidOperationException(
ViewComponents\ViewComponentInvokerCache.cs (1)
52throw new InvalidOperationException(Resources.FormatPropertyOfTypeCannotBeNull(
ViewDataDictionary.cs (1)
501throw new InvalidOperationException(message);
ViewEngines\CompositeViewEngine.cs (3)
35throw new InvalidOperationException(Resources.FormatViewEnginesAreRequired( 51throw new InvalidOperationException(Resources.FormatAsyncDisposableViewsNotSupported(typeof(IAsyncDisposable).FullName)); 84throw new InvalidOperationException(Resources.FormatViewEnginesAreRequired(
ViewEngines\ViewEngineResult.cs (1)
106throw new InvalidOperationException(Resources.FormatViewEngine_ViewNotFound(ViewName, locations));
ViewExecutor.cs (3)
134throw new InvalidOperationException(Resources.FormatPropertyOfTypeCannotBeNull(nameof(ViewOptions), GetType().Name)); 139throw new InvalidOperationException(Resources.FormatPropertyOfTypeCannotBeNull(nameof(TempDataFactory), GetType().Name)); 144throw new InvalidOperationException(Resources.FormatPropertyOfTypeCannotBeNull(nameof(ModelMetadataProvider), GetType().Name));
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (3)
Rendering\HtmlHelperPartialExtensionsTest.cs (2)
72var expected = new InvalidOperationException(); 163var expected = new InvalidOperationException();
Rendering\HtmlHelperValidationSummaryTest.cs (1)
683modelState.AddModelError(string.Empty, new InvalidOperationException("Another ignored Exception."), metadata);
Microsoft.AspNetCore.OpenApi (20)
Extensions\ApiDescriptionExtensions.cs (1)
31_ => throw new InvalidOperationException($"Unsupported HTTP method: {apiDescription.HttpMethod}"),
Schemas\JsonSchemaMapper\JsonSchemaMapper.cs (3)
152throw new InvalidOperationException("Unexpected parameter info."); 959throw new InvalidOperationException($"The parameters for method '{method}' have been trimmed away."); 963throw new InvalidOperationException("The maximum depth of the schema has been reached.");
Schemas\JsonSchemaMapper\JsonSchemaMapper.ReflectionHelpers.cs (1)
142throw new InvalidOperationException(
Services\OpenApiDocumentService.cs (1)
254_ => throw new InvalidOperationException($"Unsupported parameter source: {parameter.Source.Id}")
Services\OpenApiGenerator.cs (1)
371throw new InvalidOperationException($"Encountered a parameter of type '{parameter.ParameterType}' without a name. Parameters must have a name.");
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (1)
140throw new InvalidOperationException($"Cannot call {nameof(GetDefaultValueForParameter)}, because no parameter default values were supplied.");
src\Shared\ParameterBindingMethodCache.cs (7)
194throw new InvalidOperationException(stringBuilder.ToString()); 290throw new InvalidOperationException(stringBuilder.ToString()); 340throw new InvalidOperationException( 357throw new InvalidOperationException($"The abstract type '{TypeNameHelper.GetTypeDisplayName(type, fullName: false)}' is not supported."); 397throw new InvalidOperationException($"Only a single public parameterized constructor is allowed for type '{TypeNameHelper.GetTypeDisplayName(type, fullName: false)}'."); 400throw new InvalidOperationException($"No public parameterless constructor found for type '{TypeNameHelper.GetTypeDisplayName(type, fullName: false)}'."); 460throw new InvalidOperationException($"{TypeNameHelper.GetTypeDisplayName(type, fullName: false)} implements multiple interfaces defining a static {interfaceMethod} method causing ambiguity.");
src\Shared\PropertyAsParameterInfo.cs (2)
81throw new InvalidOperationException($"Encountered a parameter of type '{parameters[i].ParameterType}' without a name. Parameters must have a name."); 103throw new InvalidOperationException($"The nullable type '{TypeNameHelper.GetTypeDisplayName(parameters[i].ParameterType, fullName: false)}' is not supported.");
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
63throw new InvalidOperationException("The reader wasn't returned!");
src\SignalR\common\Shared\Utf8BufferTextWriter.cs (1)
51throw new InvalidOperationException("The writer wasn't returned!");
Transformers\DelegateOpenApiDocumentTransformer.cs (1)
73throw new InvalidOperationException("Cached operation transformer context not found. Please ensure that the operation contains the `x-aspnetcore-id` extension attribute.");
Microsoft.AspNetCore.OpenApi.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
53throw new InvalidOperationException(message);
Microsoft.AspNetCore.OutputCaching (8)
FormatterBinaryWriter.cs (1)
120static void Throw() => throw new InvalidOperationException("Unable to acquire non-empty write buffer");
OutputCacheEntryFormatter.cs (2)
280throw new InvalidOperationException(); 322throw new InvalidOperationException();
OutputCacheKeyProvider.cs (1)
142throw new InvalidOperationException($"{nameof(OutputCacheContext.CacheVaryByRules)} must not be null on the {nameof(OutputCacheContext)}");
OutputCacheMiddleware.cs (1)
486throw new InvalidOperationException($"Another instance of {nameof(OutputCacheFeature)} already exists. Only one instance of {nameof(OutputCacheMiddleware)} can be configured for an application.");
RecyclableArrayBufferWriter.cs (1)
129static void ThrowOutOfMemoryException() => throw new InvalidOperationException("Unable to grow buffer as requested");
RecyclableSequenceBuilder.cs (1)
110static void Throw() => throw new InvalidOperationException("Unable to acquire non-empty write buffer");
Streams\OutputCacheStream.cs (1)
49throw new InvalidOperationException("Buffer stream cannot be retrieved since buffering is disabled.");
Microsoft.AspNetCore.OutputCaching.Microbenchmarks (7)
EndToEndBenchmarks.cs (6)
195throw new InvalidOperationException("Invalid payload length"); 202throw new InvalidOperationException("Invalid payload"); 211throw new InvalidOperationException("Invalid payload"); 219throw new InvalidOperationException("Incorrect header count"); 230throw new InvalidOperationException("Invalid header: " + header.Key); 262static void Throw() => throw new InvalidOperationException("Incorrect key");
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
53throw new InvalidOperationException(message);
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (1)
RedisOutputCacheStore.cs (1)
447_ = connection ?? throw new InvalidOperationException($"{nameof(connection)} cannot be null.");
Microsoft.AspNetCore.OutputCaching.Tests (1)
OutputCacheTests.cs (1)
1028throw new InvalidOperationException($"Client {id} failed; payload '{s}', failure: {ex.Message}", ex);
Microsoft.AspNetCore.Owin (2)
OwinEnvironment.cs (2)
148throw new InvalidOperationException("Key already present"); 411throw new InvalidOperationException("Missing feature: " + FeatureInterface.FullName); // TODO: LOC
Microsoft.AspNetCore.RateLimiting (5)
RateLimiterApplicationBuilderExtensions.cs (1)
51throw new InvalidOperationException(Resources.FormatUnableToFindServices(
RateLimitingMetrics.cs (1)
180_ => throw new InvalidOperationException("Unexpected value: " + reason)
RateLimitingMiddleware.cs (2)
277throw new InvalidOperationException($"This endpoint requires a rate limiting policy with name {name}, but no such policy exists."); 283throw new InvalidOperationException("This endpoint requested a rate limiting policy with a null name.");
src\Shared\ValueStopwatch\ValueStopwatch.cs (1)
32throw new InvalidOperationException("An uninitialized, or 'default', ValueStopwatch cannot be used to get elapsed time.");
Microsoft.AspNetCore.Razor.Runtime (1)
Runtime\TagHelpers\TagHelperScopeManager.cs (1)
87throw new InvalidOperationException(
Microsoft.AspNetCore.RequestDecompression (2)
src\Shared\SizeLimitedStream.cs (2)
51throw new InvalidOperationException("The maximum number of bytes have been read."); 84throw new InvalidOperationException("The maximum number of bytes have been read.");
Microsoft.AspNetCore.RequestDecompression.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
53throw new InvalidOperationException(message);
Microsoft.AspNetCore.ResponseCaching (3)
ResponseCachingKeyProvider.cs (1)
82throw new InvalidOperationException($"{nameof(CachedVaryByRules)} must not be null on the {nameof(ResponseCachingContext)}");
ResponseCachingMiddleware.cs (1)
396throw new InvalidOperationException($"Another instance of {nameof(ResponseCachingFeature)} already exists. Only one instance of {nameof(ResponseCachingMiddleware)} can be configured for an application.");
Streams\ResponseCachingStream.cs (1)
49throw new InvalidOperationException("Buffer stream cannot be retrieved since buffering is disabled.");
Microsoft.AspNetCore.ResponseCaching.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
53throw new InvalidOperationException(message);
Microsoft.AspNetCore.ResponseCompression.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
53throw new InvalidOperationException(message);
Microsoft.AspNetCore.ResponseCompression.Tests (10)
ResponseCompressionMiddlewareTest.cs (10)
1405get => throw new InvalidOperationException("This shouldn't be called"); 1406set => throw new InvalidOperationException("This shouldn't be called"); 1411throw new InvalidOperationException("This shouldn't be called"); 1416throw new InvalidOperationException("This shouldn't be called"); 1421throw new InvalidOperationException("This shouldn't be called"); 1426throw new InvalidOperationException("This shouldn't be called"); 1431throw new InvalidOperationException("This shouldn't be called"); 1456throw new InvalidOperationException("This shouldn't be called"); 1461throw new InvalidOperationException("This shouldn't be called"); 1471throw new InvalidOperationException("This shouldn't be called");
Microsoft.AspNetCore.Rewrite (6)
ApacheModRewrite\RuleBuilder.cs (1)
25throw new InvalidOperationException("Cannot create ModRewriteRule without action and match");
IISUrlRewrite\UrlRewriteRuleBuilder.cs (3)
26throw new InvalidOperationException("Cannot create UrlRewriteRule without action and match"); 76throw new InvalidOperationException($"You must first configure condition behavior by calling {nameof(ConfigureConditionBehavior)}"); 86throw new InvalidOperationException($"You must first configure condition behavior by calling {nameof(ConfigureConditionBehavior)}");
UrlMatches\IntegerMatch.cs (1)
60throw new InvalidOperationException(); // Will never be thrown
UrlMatches\StringMatch.cs (1)
42throw new InvalidOperationException(); // Will never be thrown
Microsoft.AspNetCore.Routing (46)
Builder\EndpointRoutingApplicationBuilderExtensions.cs (3)
122throw new InvalidOperationException(Resources.FormatUnableToFindServices( 138throw new InvalidOperationException(message); 151throw new InvalidOperationException(message);
Builder\RoutingBuilderExtensions.cs (2)
27throw new InvalidOperationException(Resources.FormatUnableToFindServices( 50throw new InvalidOperationException(Resources.FormatUnableToFindServices(
Builder\RoutingEndpointConventionBuilderExtensions.cs (1)
146throw new InvalidOperationException("This endpoint does not support Order.");
Constraints\RegexErrorStubRouteConstraint.cs (2)
20throw new InvalidOperationException(Resources.RegexRouteContraint_NotConfigured); 30throw new InvalidOperationException(Resources.RegexRouteContraint_NotConfigured);
DefaultParameterPolicyFactory.cs (1)
47throw new InvalidOperationException(Resources.FormatRoutePattern_ConstraintReferenceNotFound(
EndpointMiddleware.cs (3)
106throw new InvalidOperationException($"Endpoint {endpoint.DisplayName} contains authorization metadata, " + 114throw new InvalidOperationException($"Endpoint {endpoint.DisplayName} contains CORS metadata, " + 122throw new InvalidOperationException($"Endpoint {endpoint.DisplayName} contains anti-forgery metadata, " +
EndpointNameAddressScheme.cs (1)
92throw new InvalidOperationException(builder.ToString());
EndpointRoutingMiddleware.cs (3)
286throw new InvalidOperationException($"Endpoint {endpoint.DisplayName} contains authorization metadata, " + 292throw new InvalidOperationException($"Endpoint {endpoint.DisplayName} contains CORS metadata, " + 298throw new InvalidOperationException($"Endpoint {endpoint.DisplayName} contains anti-forgery metadata, " +
Matching\AcceptsMatcherPolicy.cs (1)
302throw new InvalidOperationException("Could not find destination for no content type.");
Matching\CandidateSet.cs (1)
352throw new InvalidOperationException(message);
Matching\DataSourceDependentMatcher.cs (1)
55throw new InvalidOperationException($"Duplicate endpoint name '{endpointName}' found on '{endpoint.DisplayName}' and '{existingEndpoint}'. Endpoint names must be globally unique.");
Matching\DfaMatcherBuilder.cs (1)
489var literalValue = requiredValue?.ToString() ?? throw new InvalidOperationException($"Required value for literal '{parameterPart.Name}' must evaluate to a non-null string.");
Matching\HostMatcherPolicy.cs (1)
182throw new InvalidOperationException($"Could not parse host: {host}");
Matching\ILEmitTrieFactory.cs (6)
672throw new InvalidOperationException("Failed to find Unsafe.Add{T}(ref T, int)"); 686throw new InvalidOperationException("Failed to find Unsafe.As{TFrom, TTo}(ref TFrom)"); 697throw new InvalidOperationException("Failed to find MemoryExtensions.AsSpan(string, int, int)"); 711throw new InvalidOperationException("Failed to find MemoryMarshal.GetReference{T}(ReadOnlySpan{T})"); 723throw new InvalidOperationException("Failed to find Unsafe.ReadUnaligned{T}(ref byte)"); 735throw new InvalidOperationException("Failed to find Unsafe.ReadUnaligned{T}(ref byte)");
Matching\JumpTableBuilder.cs (2)
19throw new InvalidOperationException(message); 25throw new InvalidOperationException(message);
Patterns\RoutePatternFactory.cs (6)
525throw new InvalidOperationException( 586throw new InvalidOperationException(message); 592throw new InvalidOperationException(message); 678throw new InvalidOperationException(Resources.FormatRoutePattern_InvalidConstraintReference( 959throw new InvalidOperationException(Resources.FormatRoutePattern_InvalidConstraintReference( 1065throw new InvalidOperationException(Resources.FormatMapGroup_RepeatedDictionaryEntry(rawText, dictionaryName, key));
RouteBase.cs (1)
260throw new InvalidOperationException(
RouteBuilder.cs (1)
37throw new InvalidOperationException(Resources.FormatUnableToFindServices(
RouteCollection.cs (1)
116throw new InvalidOperationException(message);
RouteConstraintBuilder.cs (1)
140throw new InvalidOperationException(
RouteEndpointBuilder.cs (1)
52throw new InvalidOperationException($"{nameof(RequestDelegate)} must be specified to construct a {nameof(RouteEndpoint)}.");
RouteEndpointDataSource.cs (2)
117throw new InvalidOperationException($"There are {_routeEntries.Count} endpoints defined! This can only be called for a single endpoint."); 165throw new InvalidOperationException(Resources.RouteEndpointDataSource_RequestDelegateCannotBeCalledBeforeBuild);
RouteOptions.cs (1)
167throw new InvalidOperationException($"{type} must implement {typeof(IParameterPolicy)}");
src\Shared\Json\JsonSerializerExtensions.cs (1)
26=> context.GetTypeInfo(type) ?? throw new InvalidOperationException($"Unable to obtain the JsonTypeInfo for type '{type.FullName}' from the context '{context.GetType().FullName}'.");
Template\RoutePrecedence.cs (1)
138throw new InvalidOperationException("Route exceeds the maximum number of allowed segments of 28 and is unable to be processed.");
Template\TemplateBinder.cs (1)
224throw new InvalidOperationException($"Unable to find required value '{key}' on route pattern.");
Microsoft.AspNetCore.Routing.FunctionalTests (2)
src\Shared\SizeLimitedStream.cs (2)
51throw new InvalidOperationException("The maximum number of bytes have been read."); 84throw new InvalidOperationException("The maximum number of bytes have been read.");
Microsoft.AspNetCore.Routing.Microbenchmarks (4)
EndpointRoutingBenchmarkBase.cs (3)
53throw new InvalidOperationException( 77throw new InvalidOperationException(message.ToString()); 90throw new InvalidOperationException($"Expected: {expectedUrl}, Actual: {actualUrl}");
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
53throw new InvalidOperationException(message);
Microsoft.AspNetCore.Routing.Tests (3)
Builder\RequestDelegateEndpointRouteBuilderExtensionsTest.cs (1)
27_ => throw new InvalidOperationException($"Unknown EndointDataSource type!"),
Builder\RoutingEndpointConventionBuilderExtensionsTest.cs (1)
298throw new InvalidOperationException(Resources.RouteEndpointDataSource_ConventionsCannotBeModifiedAfterBuild);
Matching\DfaMatcherTest.cs (1)
1051.Throws(new InvalidOperationException());
Microsoft.AspNetCore.Security.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
53throw new InvalidOperationException(message);
Microsoft.AspNetCore.Server.HttpSys (44)
AuthenticationHandler.cs (1)
43throw new InvalidOperationException("No RequestContext found.");
RequestProcessing\RequestContext.cs (5)
93throw new InvalidOperationException("Upgrade requires HTTP/1.1."); 95throw new InvalidOperationException("This request cannot be upgraded because it has a body."); 99throw new InvalidOperationException("This request cannot be upgraded, the response has already started."); 281throw new InvalidOperationException("This request cannot be delegated, the request body has already started."); 285throw new InvalidOperationException("This request cannot be delegated, the response has already started.");
RequestProcessing\RequestContext.FeatureCollection.cs (2)
441throw new InvalidOperationException("Cannot register new callbacks, the response has already started."); 452throw new InvalidOperationException("Cannot register new callbacks, the response has already completed.");
RequestProcessing\RequestStream.cs (7)
51throw new InvalidOperationException("The maximum request size cannot be changed after the request body has started reading."); 80public override void Flush() => throw new InvalidOperationException(Resources.Exception_ReadOnlyStream); 83=> throw new InvalidOperationException(Resources.Exception_ReadOnlyStream); 101throw new InvalidOperationException("Synchronous IO APIs are disabled, see AllowSynchronousIO."); 302throw new InvalidOperationException(Resources.Exception_ReadOnlyStream); 307throw new InvalidOperationException(Resources.Exception_ReadOnlyStream); 312throw new InvalidOperationException(Resources.Exception_ReadOnlyStream);
RequestProcessing\Response.cs (1)
238throw new InvalidOperationException("Headers already sent.");
RequestProcessing\ResponseBody.cs (7)
95throw new InvalidOperationException("Synchronous IO APIs are disabled, see AllowSynchronousIO."); 434throw new InvalidOperationException(Resources.Exception_WriteOnlyStream); 439throw new InvalidOperationException(Resources.Exception_WriteOnlyStream); 444throw new InvalidOperationException(Resources.Exception_WriteOnlyStream); 525throw new InvalidOperationException("Synchronous IO APIs are disabled, see AllowSynchronousIO."); 554throw new InvalidOperationException("More bytes written than specified in the Content-Length header."); 560throw new InvalidOperationException("More bytes written than specified in the Content-Length header.");
src\Shared\Buffers.MemoryPool\MemoryPoolThrowHelper.cs (8)
32throw new InvalidOperationException(GenerateMessage("Can't unpin, pin count is zero", block)); 37throw new InvalidOperationException(GenerateMessage("Disposing pinned block", block)); 42throw new InvalidOperationException("Object is being disposed twice"); 47throw new InvalidOperationException(GenerateMessage("Block is being disposed twice", block)); 52throw new InvalidOperationException(GenerateMessage("Block is being returned to disposed pool", block)); 57throw new InvalidOperationException(GenerateMessage("Block is backed by disposed slab", block)); 62throw new InvalidOperationException(GenerateMessage($"Memory pool with active blocks is being disposed, {returned} of {total} returned", blocks)); 67throw new InvalidOperationException(GenerateMessage($"Blocks were not returned in time, {returned} of {total} returned ", blocks));
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (4)
258throw new InvalidOperationException("The response trailers cannot be modified because the response has already completed. " 261throw new InvalidOperationException("The response headers cannot be modified because the response has already started."); 282=> throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "Invalid control character in header: 0x{0:X2}", headerCharacters[invalidIndex])); 291throw new InvalidOperationException($"The '{key}' header is not allowed in HTTP trailers.");
src\Shared\HttpSys\RequestProcessing\RawUrlHelper.cs (1)
50throw new InvalidOperationException("Invalid URI format");
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
259throw new InvalidOperationException("The response headers cannot be modified because the response has already started.");
src\Shared\HttpSys\RequestProcessing\RequestUriBuilder.cs (1)
114throw new InvalidOperationException("The path contains null characters.");
src\Shared\ServerInfrastructure\StringUtilities.cs (4)
36throw new InvalidOperationException(); 45throw new InvalidOperationException(); 88throw new InvalidOperationException(); 113throw new InvalidOperationException();
StandardFeatureCollection.cs (1)
80throw new InvalidOperationException("The collection is read-only");
UrlPrefixCollection.cs (1)
198throw new InvalidOperationException("Cannot bind to port 0 with https.");
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (7)
Listener\Utilities.cs (1)
155throw new InvalidOperationException("The response completed prematurely: " + response.ToString());
OpaqueUpgradeTests.cs (1)
438throw new InvalidOperationException("The response status code was incorrect: " + statusLine);
ResponseTests.cs (1)
229readCompleted.SetException(new InvalidOperationException("The read wasn't supposed to succeed"));
ServerTests.cs (1)
212throw new InvalidOperationException();
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
61throw new InvalidOperationException("Buffer backed by array was expected");
src\Shared\TestResources.cs (2)
26throw new InvalidOperationException("Cannot acquire the global certificate mutex."); 63throw new InvalidOperationException("Cannot acquire the global certificate mutex.");
Microsoft.AspNetCore.Server.HttpSys.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
53throw new InvalidOperationException(message);
Microsoft.AspNetCore.Server.IIS (41)
Core\EmptyStream.cs (1)
34throw new InvalidOperationException(CoreStrings.SynchronousReadsDisallowed);
Core\HttpRequestStream.cs (1)
28throw new InvalidOperationException(CoreStrings.SynchronousReadsDisallowed);
Core\HttpResponseStream.cs (1)
37throw new InvalidOperationException(CoreStrings.SynchronousWritesDisallowed);
Core\IISHttpContext.cs (2)
670throw new InvalidOperationException("Response already started"); 832throw new InvalidOperationException(CoreStrings.FormatParameterReadOnlyAfterResponseStarted(name));
Core\IISHttpContext.FeatureCollection.cs (6)
342throw new InvalidOperationException(CoreStrings.UpgradeWithWrongProtocolVersion); 344throw new InvalidOperationException(CoreStrings.CannotUpgradeNonUpgradableRequest); 349throw new InvalidOperationException(CoreStrings.UpgradeCannotBeCalledMultipleTimes); 353throw new InvalidOperationException(CoreStrings.UpgradeCannotBeCalledMultipleTimes); 439throw new InvalidOperationException(CoreStrings.MaxRequestBodySizeCannotBeModifiedAfterRead); 443throw new InvalidOperationException(CoreStrings.MaxRequestBodySizeCannotBeModifiedForUpgradedRequests);
Core\IISHttpContext.Features.cs (1)
333throw new InvalidOperationException("Cannot set IISHttpContext in feature collection");
Core\IISServerSetupFilter.cs (1)
20throw new InvalidOperationException("Application is running inside IIS process but is not configured to use IIS server.");
Core\IO\AsyncIOEngine.cs (1)
142throw new InvalidOperationException("Only one queued operation is allowed");
Core\IO\AsyncIOOperation.cs (1)
55throw new InvalidOperationException("Multiple awaiters are not allowed");
Core\IO\AsyncWriteOperationBase.cs (1)
30throw new InvalidOperationException($"Writes larger then {int.MaxValue} are not supported.");
Core\IO\WebSocketsAsyncIOEngine.cs (2)
97throw new InvalidOperationException("Unexpected completion for WebSocket operation"); 111throw new InvalidOperationException("Socket IO not initialized yet");
Core\ThrowingWasUpgradedWriteOnlyStreamInternal.cs (3)
16=> throw new InvalidOperationException(CoreStrings.ResponseStreamWasUpgraded); 20=> throw new InvalidOperationException(CoreStrings.ResponseStreamWasUpgraded); 24=> throw new InvalidOperationException(CoreStrings.ResponseStreamWasUpgraded);
src\Shared\Buffers.MemoryPool\MemoryPoolThrowHelper.cs (8)
32throw new InvalidOperationException(GenerateMessage("Can't unpin, pin count is zero", block)); 37throw new InvalidOperationException(GenerateMessage("Disposing pinned block", block)); 42throw new InvalidOperationException("Object is being disposed twice"); 47throw new InvalidOperationException(GenerateMessage("Block is being disposed twice", block)); 52throw new InvalidOperationException(GenerateMessage("Block is being returned to disposed pool", block)); 57throw new InvalidOperationException(GenerateMessage("Block is backed by disposed slab", block)); 62throw new InvalidOperationException(GenerateMessage($"Memory pool with active blocks is being disposed, {returned} of {total} returned", blocks)); 67throw new InvalidOperationException(GenerateMessage($"Blocks were not returned in time, {returned} of {total} returned ", blocks));
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (4)
258throw new InvalidOperationException("The response trailers cannot be modified because the response has already completed. " 261throw new InvalidOperationException("The response headers cannot be modified because the response has already started."); 282=> throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "Invalid control character in header: 0x{0:X2}", headerCharacters[invalidIndex])); 291throw new InvalidOperationException($"The '{key}' header is not allowed in HTTP trailers.");
src\Shared\HttpSys\RequestProcessing\RawUrlHelper.cs (1)
50throw new InvalidOperationException("Invalid URI format");
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
259throw new InvalidOperationException("The response headers cannot be modified because the response has already started.");
src\Shared\HttpSys\RequestProcessing\RequestUriBuilder.cs (1)
114throw new InvalidOperationException("The path contains null characters.");
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
61throw new InvalidOperationException("Buffer backed by array was expected");
src\Shared\ServerInfrastructure\StringUtilities.cs (4)
36throw new InvalidOperationException(); 45throw new InvalidOperationException(); 88throw new InvalidOperationException(); 113throw new InvalidOperationException();
Microsoft.AspNetCore.Server.IntegrationTesting (8)
ApplicationPublisher.cs (1)
117throw new InvalidOperationException("Unrecognized operation system platform");
CachingApplicationPublisher.cs (3)
20throw new InvalidOperationException("ApplicationPath mismatch"); 25throw new InvalidOperationException("DeploymentParameters.PublishEnvironmentVariables not supported"); 30throw new InvalidOperationException("DeploymentParameters.PublishedApplicationRootPath not supported");
Deployers\NginxDeployer.cs (3)
88throw new InvalidOperationException("Deploy failed"); 136var userName = GetUserName() ?? throw new InvalidOperationException("Could not identify the current username"); 176throw new InvalidOperationException("Failed to start nginx");
Deployers\RemoteWindowsDeployer\RemoteWindowsDeployer.cs (1)
33throw new InvalidOperationException($"Server type {_deploymentParameters.ServerType} is not supported for remote deployment." +
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (17)
IISDeployer.cs (7)
251throw new InvalidOperationException($"Can't find site for: {contentRoot} to start."); 270throw new InvalidOperationException("Site not started yet"); 277throw new InvalidOperationException("Site is started but no worker process found"); 332throw new InvalidOperationException("Redirection is enabled between test runs."); 413throw new InvalidOperationException($"Site {site.Name} not stopped yet"); 426throw new InvalidOperationException("WorkerProcess not stopped yet"); 444throw new InvalidOperationException("Site is stopped but host process is not");
IISDeployerBase.cs (1)
40throw new InvalidOperationException("Cannot modify web.config file if no published output.");
IISDeploymentParameterExtensions.cs (1)
139throw new InvalidOperationException("Testing freb requires site to be published.");
IISExpressDeployer.cs (7)
199started.TrySetException(new InvalidOperationException("Failed to start IIS Express")); 508throw new InvalidOperationException($"Unable to get window class name: {Marshal.GetLastWin32Error()}"); 522throw new InvalidOperationException($"Unable to PostMessage to process {pid}. LastError: {Marshal.GetLastWin32Error()}"); 544throw new InvalidOperationException($"Unable to find main window for process {pid}"); 561throw new InvalidOperationException($"iisexpress Process {hostProcess.Id} failed to gracefully shutdown."); 566throw new InvalidOperationException($"IISExpress exit code is non-zero after graceful shutdown. Exit code: {hostProcess.ExitCode}."); 571throw new InvalidOperationException($"iisexpress Process {hostProcess?.Id} crashed before shutdown was triggered.");
XElementExtensions.cs (1)
15throw new InvalidOperationException($"Element with name {name} not found in {element}");
Microsoft.AspNetCore.Server.Kestrel.Core (102)
CertificateLoader.cs (1)
60throw new InvalidOperationException(CoreStrings.FormatCertNotFoundInStore(subject, storeLocation, storeName, allowInvalid));
HttpsConfigurationService.cs (1)
131throw new InvalidOperationException(uninitializedError);
Internal\AddressBinder.cs (2)
111throw new InvalidOperationException(CoreStrings.FormatUnsupportedAddressScheme(address)); 116throw new InvalidOperationException(CoreStrings.FormatConfigurePathBaseFromMethodCall($"{nameof(IApplicationBuilder)}.UsePathBase()"));
Internal\Certificates\CertificateConfigLoader.cs (4)
35throw new InvalidOperationException(CoreStrings.FormatMultipleCertificateSources(endpointName)); 71throw new InvalidOperationException(CoreStrings.InvalidPemKey); 146throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, CoreStrings.UnrecognizedCertificateKeyOid, certificate.PublicKey.Oid.Value)); 152return new InvalidOperationException($"Error getting private key from '{keyPath}'.", ex);
Internal\ConfigurationReader.cs (6)
100throw new InvalidOperationException(CoreStrings.FormatEndpointMissingUrl(endpointConfig.Key)); 149throw new InvalidOperationException(CoreStrings.FormatSniNameCannotBeEmpty(endpointName)); 215throw new InvalidOperationException(CoreStrings.FormatEndpointHasUnusedHttpsConfig(endpoint.Name, CertificateKey)); 220throw new InvalidOperationException(CoreStrings.FormatEndpointHasUnusedHttpsConfig(endpoint.Name, ClientCertificateModeKey)); 225throw new InvalidOperationException(CoreStrings.FormatEndpointHasUnusedHttpsConfig(endpoint.Name, SslProtocolsKey)); 230throw new InvalidOperationException(CoreStrings.FormatEndpointHasUnusedHttpsConfig(endpoint.Name, SniKey));
Internal\Http\Http1ContentLengthMessageBody.cs (2)
208throw new InvalidOperationException("No reading operation to complete."); 281throw new InvalidOperationException("Reading is already in progress.");
Internal\Http\Http1MessageBody.cs (1)
217throw new InvalidOperationException("Reading is not allowed after the reader was completed.");
Internal\Http\Http1OutputProducer.cs (1)
772throw new InvalidOperationException("Writing is not allowed after writer was completed.");
Internal\Http\HttpHeaders.cs (3)
97throw new InvalidOperationException(CoreStrings.HeadersAreReadOnly); 686throw new InvalidOperationException(CoreStrings.FormatInvalidAsciiOrControlChar(string.Format(CultureInfo.InvariantCulture, "0x{0:X4}", (ushort)ch))); 691throw new InvalidOperationException(CoreStrings.InvalidEmptyHeaderName);
Internal\Http\HttpProtocol.cs (6)
880return new InvalidOperationException( 919ex = new InvalidOperationException( 1299throw new InvalidOperationException(CoreStrings.FormatParameterReadOnlyAfterResponseStarted(value)); 1310var ex = new InvalidOperationException(message); 1373throw new InvalidOperationException(CoreStrings.FormatWritingToResponseBodyNotSupported(StatusCode)); 1468throw new InvalidOperationException("Invalid ordering of calling StartAsync or CompleteAsync and Advance.");
Internal\Http\HttpProtocol.FeatureCollection.cs (9)
118throw new InvalidOperationException(CoreStrings.RequestTrailersNotAvailable); 207throw new InvalidOperationException(CoreStrings.MaxRequestBodySizeCannotBeModifiedAfterRead); 211throw new InvalidOperationException(CoreStrings.MaxRequestBodySizeCannotBeModifiedForUpgradedRequests); 263throw new InvalidOperationException(CoreStrings.CannotUpgradeNonUpgradableRequest); 268throw new InvalidOperationException(CoreStrings.UpgradeCannotBeCalledMultipleTimes); 273throw new InvalidOperationException(CoreStrings.UpgradedConnectionLimitReached); 296throw new InvalidOperationException(CoreStrings.CannotAcceptNonConnectRequest); 301throw new InvalidOperationException(CoreStrings.AcceptCannotBeCalledMultipleTimes); 306throw new InvalidOperationException(CoreStrings.ConnectStatusMustBe2XX);
Internal\Http\HttpRequestStream.cs (1)
56throw new InvalidOperationException(CoreStrings.SynchronousReadsDisallowed);
Internal\Http\HttpResponseHeaders.cs (2)
115throw new InvalidOperationException(CoreStrings.FormatInvalidContentLength_InvalidNumber(value)); 121throw new InvalidOperationException("Invalid Header Bits");
Internal\Http\HttpResponseStream.cs (2)
53throw new InvalidOperationException(CoreStrings.SynchronousWritesDisallowed); 77throw new InvalidOperationException(CoreStrings.SynchronousWritesDisallowed);
Internal\Http2\Http2OutputProducer.cs (2)
748throw new InvalidOperationException("Writing is not allowed after writer was completed."); 754throw new InvalidOperationException("Cannot write to response after the request has completed.");
Internal\Http3\Http3Connection.cs (1)
865throw new InvalidOperationException("Unexpected setting: " + type);
Internal\Http3\Http3FrameWriter.cs (1)
378throw new InvalidOperationException(ex.Message, ex); // Report the error to the user if this was the first write.
Internal\Http3\Http3OutputProducer.cs (2)
270throw new InvalidOperationException("Writing is not allowed after writer was completed."); 457throw new InvalidOperationException(nameof(Http3OutputProducer) + "." + nameof(ProcessDataWrites) + " observed an unexpected state where the streams output ended with data still remaining in the pipe.");
Internal\Http3\Http3Stream.cs (3)
1202throw new InvalidOperationException(CoreStrings.AcceptCannotBeCalledMultipleTimes); 1207throw new InvalidOperationException(CoreStrings.WebTransportIsDisabled); 1212throw new InvalidOperationException(CoreStrings.FormatFailedToNegotiateCommonWebTransportVersion(WebTransportSession.CurrentSupportedVersion));
Internal\Infrastructure\HttpUtilities.cs (2)
133throw new InvalidOperationException("Newline characters (CR/LF) are not allowed in request headers."); 157throw new InvalidOperationException(ex.Message, ex);
Internal\Infrastructure\KestrelConnection.cs (2)
79throw new InvalidOperationException("The connection is already complete."); 93throw new InvalidOperationException("The connection is already complete.");
Internal\Infrastructure\StatusCheckPipeWriter.cs (1)
36throw new InvalidOperationException(CoreStrings.FormatConnectResponseCanNotHaveBody(_context.StatusCode));
Internal\Infrastructure\StatusCheckWriteStream.cs (1)
30throw new InvalidOperationException(CoreStrings.FormatConnectResponseCanNotHaveBody(_context.StatusCode));
Internal\Infrastructure\ThrowingPipeWriter.cs (6)
17public override void Advance(int bytes) => throw new InvalidOperationException(_message); 19public override void CancelPendingFlush() => throw new InvalidOperationException(_message); 21public override void Complete(Exception? exception = null) => throw new InvalidOperationException(_message); 23public override ValueTask<FlushResult> FlushAsync(CancellationToken cancellationToken = default) => throw new InvalidOperationException(_message); 25public override Memory<byte> GetMemory(int sizeHint = 0) => throw new InvalidOperationException(_message); 27public override Span<byte> GetSpan(int sizeHint = 0) => throw new InvalidOperationException(_message);
Internal\Infrastructure\ThrowingWasUpgradedWriteOnlyStream.cs (3)
19=> throw new InvalidOperationException(CoreStrings.ResponseStreamWasUpgraded); 22=> throw new InvalidOperationException(CoreStrings.ResponseStreamWasUpgraded); 25=> throw new InvalidOperationException(CoreStrings.ResponseStreamWasUpgraded);
Internal\Infrastructure\TimeoutControl.cs (1)
321throw new InvalidOperationException(CoreStrings.ConcurrentTimeoutsNotSupported);
Internal\Infrastructure\TransportManager.cs (4)
40throw new InvalidOperationException($"Cannot bind with {nameof(ConnectionDelegate)} no {nameof(IConnectionListenerFactory)} is registered."); 62throw new InvalidOperationException($"No registered {nameof(IConnectionListenerFactory)} supports endpoint {endPoint.GetType().Name}: {endPoint}"); 69throw new InvalidOperationException($"Cannot bind with {nameof(MultiplexedConnectionDelegate)} no {nameof(IMultiplexedConnectionListenerFactory)} is registered."); 88throw new InvalidOperationException($"No registered {nameof(IMultiplexedConnectionListenerFactory)} supports endpoint {endPoint.GetType().Name}: {endPoint}");
Internal\KestrelServerImpl.cs (8)
63throw new InvalidOperationException(CoreStrings.TransportNotFound); 129throw new InvalidOperationException(CoreStrings.ServerAlreadyStarted); 167throw new InvalidOperationException("HTTP/3 requires HTTPS."); 174throw new InvalidOperationException("Unable to bind an HTTP/3 endpoint. This could be because QUIC has not been configured using UseQuic, or the platform doesn't support QUIC or HTTP/3."); 190throw new InvalidOperationException($"Cannot start HTTP/1.x or HTTP/2 server if no {nameof(IConnectionListenerFactory)} is registered."); 294throw new InvalidOperationException("Kestrel has already been stopped."); 416throw new InvalidOperationException( 423throw new InvalidOperationException(
Internal\ServerAddressesCollection.cs (1)
169throw new InvalidOperationException($"{nameof(IServerAddressesFeature)}.{nameof(IServerAddressesFeature.Addresses)} cannot be modified after the server has started.");
Internal\SniOptionsSelector.cs (1)
61throw new InvalidOperationException(CoreStrings.NoCertSpecifiedNoDevelopmentCertificateFound);
KestrelServerOptions.cs (1)
444throw new InvalidOperationException($"{nameof(ApplicationServices)} must not be null. This is normally set automatically via {nameof(IConfigureOptions<KestrelServerOptions>)}.");
ListenOptionsHttpsExtensions.cs (1)
179throw new InvalidOperationException(CoreStrings.NoCertSpecifiedNoDevelopmentCertificateFound);
LocalhostListenOptions.cs (1)
17throw new InvalidOperationException(CoreStrings.DynamicPortOnLocalhostNotSupported);
Middleware\HttpsConnectionMiddleware.cs (1)
469throw new InvalidOperationException(CoreStrings.FormatInvalidServerCertificateEku(certificate.Thumbprint));
src\Servers\Kestrel\shared\Http2HeadersEnumerator.cs (1)
132throw new InvalidOperationException("Unexpected headers collection type.");
src\Shared\CertificateGeneration\CertificateManager.cs (4)
524throw new InvalidOperationException("Unknown format."); 707throw new InvalidOperationException($"'{nameof(RemoveLocations.Undefined)}' is not a valid location."); 719throw new InvalidOperationException("Invalid location."); 749throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
105throw new InvalidOperationException("There was an error trusting the certificate."); 260throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'. 277throw new InvalidOperationException($"Can't determine the subject for the certificate with subject '{certificate.Subject}'."); 361throw new InvalidOperationException("Failed to add the certificate to the keychain. Are you running in a non-interactive session perhaps?");
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
54throw new InvalidOperationException("Trusting the certificate is not supported on linux");
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
61throw new InvalidOperationException("Buffer backed by array was expected");
src\Shared\ServerInfrastructure\StringUtilities.cs (4)
36throw new InvalidOperationException(); 45throw new InvalidOperationException(); 88throw new InvalidOperationException(); 113throw new InvalidOperationException();
src\Shared\UrlDecoder\UrlDecoder.cs (2)
108throw new InvalidOperationException("The path contains null characters."); 446throw new InvalidOperationException("The path contains null characters.");
TlsConfigurationLoader.cs (1)
106throw new InvalidOperationException(CoreStrings.NoCertSpecifiedNoDevelopmentCertificateFound);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (21)
AddressBinderTests.cs (1)
270throw new InvalidOperationException("EAFNOSUPPORT");
ConnectionDispatcherTests.cs (1)
132throw new InvalidOperationException("Unexpected error listening");
KestrelServerTests.cs (4)
605var unbindException = new InvalidOperationException(); 1015throw new InvalidOperationException(); 1023throw new InvalidOperationException(); 1033throw new InvalidOperationException();
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (1)
207throw new InvalidOperationException();
src\Servers\Kestrel\shared\test\TestApplicationErrorLogger.cs (1)
43throw new InvalidOperationException($"{nameof(WaitForMessage)} cannot be called concurrently.");
src\Shared\Buffers.MemoryPool\MemoryPoolThrowHelper.cs (8)
32throw new InvalidOperationException(GenerateMessage("Can't unpin, pin count is zero", block)); 37throw new InvalidOperationException(GenerateMessage("Disposing pinned block", block)); 42throw new InvalidOperationException("Object is being disposed twice"); 47throw new InvalidOperationException(GenerateMessage("Block is being disposed twice", block)); 52throw new InvalidOperationException(GenerateMessage("Block is being returned to disposed pool", block)); 57throw new InvalidOperationException(GenerateMessage("Block is backed by disposed slab", block)); 62throw new InvalidOperationException(GenerateMessage($"Memory pool with active blocks is being disposed, {returned} of {total} returned", blocks)); 67throw new InvalidOperationException(GenerateMessage($"Blocks were not returned in time, {returned} of {total} returned ", blocks));
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (1)
111throw new InvalidOperationException();
src\Shared\test\Shared.Tests\runtime\Http3\QPackDecoderTest.cs (2)
361throw new InvalidOperationException($"Error when checking header '{expectedValue.Key}'.", ex); 376throw new InvalidOperationException("Header with length zero.");
src\Shared\TestResources.cs (2)
26throw new InvalidOperationException("Cannot acquire the global certificate mutex."); 63throw new InvalidOperationException("Cannot acquire the global certificate mutex.");
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (30)
ErrorUtilities.cs (2)
12throw new InvalidOperationException("Invalid request line"); 17throw new InvalidOperationException("Invalid request headers");
Http3\Http3ConnectionBenchmarkBase.cs (1)
82throw new InvalidOperationException($"Unexpected frame: {frame.Type}");
Http3\QPackDecoderBenchmark.cs (2)
52throw new InvalidOperationException(); 63throw new InvalidOperationException();
InMemoryTransportBenchmark.cs (2)
79throw new InvalidOperationException(string.Join(Environment.NewLine, 204throw new InvalidOperationException($"Invalid response, length={length}");
NamedPipesTransportBenchmark.cs (1)
81throw new InvalidOperationException(string.Join(Environment.NewLine,
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (12)
180throw new InvalidOperationException($"Expected error code {expectedErrorCode}, got {currentError}."); 192throw new InvalidOperationException("Failed to read GO_AWAY stream ID."); 196throw new InvalidOperationException($"Expected stream ID {expectedLastStreamId}, got {streamId}."); 259throw new InvalidOperationException($"Expected {expected} frame. Got {actual}."); 524throw new InvalidOperationException("End not received."); 561throw new InvalidOperationException("No data received."); 631throw new InvalidOperationException("Stream not ended."); 643throw new InvalidOperationException($"Expected error code {protocolError}, got {(Http3ErrorCode)Error}."); 701throw new InvalidOperationException("The headers are too large."); 763throw new InvalidOperationException("End of stream not received."); 975throw new InvalidOperationException("Failed to read GO_AWAY stream ID."); 979throw new InvalidOperationException($"Expected stream ID {expectedLastStreamId}, got {streamId}.");
src\Servers\Kestrel\shared\test\TestApplicationErrorLogger.cs (1)
43throw new InvalidOperationException($"{nameof(WaitForMessage)} cannot be called concurrently.");
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
53throw new InvalidOperationException(message);
src\Shared\Buffers.MemoryPool\MemoryPoolThrowHelper.cs (8)
32throw new InvalidOperationException(GenerateMessage("Can't unpin, pin count is zero", block)); 37throw new InvalidOperationException(GenerateMessage("Disposing pinned block", block)); 42throw new InvalidOperationException("Object is being disposed twice"); 47throw new InvalidOperationException(GenerateMessage("Block is being disposed twice", block)); 52throw new InvalidOperationException(GenerateMessage("Block is being returned to disposed pool", block)); 57throw new InvalidOperationException(GenerateMessage("Block is backed by disposed slab", block)); 62throw new InvalidOperationException(GenerateMessage($"Memory pool with active blocks is being disposed, {returned} of {total} returned", blocks)); 67throw new InvalidOperationException(GenerateMessage($"Blocks were not returned in time, {returned} of {total} returned ", blocks));
Microsoft.AspNetCore.Server.Kestrel.Tests (3)
KestrelConfigurationLoaderTests.cs (1)
1761serverOptions.ConfigurationLoader.LocalhostEndpoint(5001, _ => throw new InvalidOperationException());
src\Shared\TestResources.cs (2)
26throw new InvalidOperationException("Cannot acquire the global certificate mutex."); 63throw new InvalidOperationException("Cannot acquire the global certificate mutex.");
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (9)
Internal\NamedPipeConnectionListener.cs (1)
123throw new InvalidOperationException("Accept queue writer was unexpectedly closed.");
src\Shared\Buffers.MemoryPool\MemoryPoolThrowHelper.cs (8)
32throw new InvalidOperationException(GenerateMessage("Can't unpin, pin count is zero", block)); 37throw new InvalidOperationException(GenerateMessage("Disposing pinned block", block)); 42throw new InvalidOperationException("Object is being disposed twice"); 47throw new InvalidOperationException(GenerateMessage("Block is being disposed twice", block)); 52throw new InvalidOperationException(GenerateMessage("Block is being returned to disposed pool", block)); 57throw new InvalidOperationException(GenerateMessage("Block is backed by disposed slab", block)); 62throw new InvalidOperationException(GenerateMessage($"Memory pool with active blocks is being disposed, {returned} of {total} returned", blocks)); 67throw new InvalidOperationException(GenerateMessage($"Blocks were not returned in time, {returned} of {total} returned ", blocks));
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (21)
Internal\QuicConnectionContext.cs (1)
257throw new InvalidOperationException($"Required {nameof(IConnectionHeartbeatFeature)} not found in connection features.");
Internal\QuicConnectionListener.cs (4)
45throw new InvalidOperationException($"QUIC doesn't support listening on the configured endpoint type. Expected {nameof(IPEndPoint)} but got {endpoint.GetType().Name}."); 50throw new InvalidOperationException("No application protocols specified."); 150throw new InvalidOperationException($"The listener needs to be initialized by calling {nameof(CreateListenerAsync)}."); 161throw new InvalidOperationException("Couldn't find ConnectionContext for QuicConnection.");
Internal\QuicStreamContext.FeatureCollection.cs (2)
75throw new InvalidOperationException("Unable to abort reading from a stream that doesn't support reading."); 97throw new InvalidOperationException("Unable to abort writing to a stream that doesn't support writing.");
QuicTransportFactory.cs (2)
46throw new InvalidOperationException("Couldn't find HTTPS configuration for QUIC transport."); 50throw new InvalidOperationException("No application protocols specified for QUIC transport.");
src\Shared\Buffers.MemoryPool\MemoryPoolThrowHelper.cs (8)
32throw new InvalidOperationException(GenerateMessage("Can't unpin, pin count is zero", block)); 37throw new InvalidOperationException(GenerateMessage("Disposing pinned block", block)); 42throw new InvalidOperationException("Object is being disposed twice"); 47throw new InvalidOperationException(GenerateMessage("Block is being disposed twice", block)); 52throw new InvalidOperationException(GenerateMessage("Block is being returned to disposed pool", block)); 57throw new InvalidOperationException(GenerateMessage("Block is backed by disposed slab", block)); 62throw new InvalidOperationException(GenerateMessage($"Memory pool with active blocks is being disposed, {returned} of {total} returned", blocks)); 67throw new InvalidOperationException(GenerateMessage($"Blocks were not returned in time, {returned} of {total} returned ", blocks));
src\Shared\ServerInfrastructure\StringUtilities.cs (4)
36throw new InvalidOperationException(); 45throw new InvalidOperationException(); 88throw new InvalidOperationException(); 113throw new InvalidOperationException();
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (3)
src\Servers\Kestrel\shared\test\TestApplicationErrorLogger.cs (1)
43throw new InvalidOperationException($"{nameof(WaitForMessage)} cannot be called concurrently.");
src\Shared\TestResources.cs (2)
26throw new InvalidOperationException("Cannot acquire the global certificate mutex."); 63throw new InvalidOperationException("Cannot acquire the global certificate mutex.");
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (10)
Internal\BufferExtensions.cs (1)
19throw new InvalidOperationException("Buffer backed by array was expected");
SocketConnectionListener.cs (1)
38throw new InvalidOperationException(SocketsStrings.TransportAlreadyBound);
src\Shared\Buffers.MemoryPool\MemoryPoolThrowHelper.cs (8)
32throw new InvalidOperationException(GenerateMessage("Can't unpin, pin count is zero", block)); 37throw new InvalidOperationException(GenerateMessage("Disposing pinned block", block)); 42throw new InvalidOperationException("Object is being disposed twice"); 47throw new InvalidOperationException(GenerateMessage("Block is being disposed twice", block)); 52throw new InvalidOperationException(GenerateMessage("Block is being returned to disposed pool", block)); 57throw new InvalidOperationException(GenerateMessage("Block is backed by disposed slab", block)); 62throw new InvalidOperationException(GenerateMessage($"Memory pool with active blocks is being disposed, {returned} of {total} returned", blocks)); 67throw new InvalidOperationException(GenerateMessage($"Blocks were not returned in time, {returned} of {total} returned ", blocks));
Microsoft.AspNetCore.Session (2)
DistributedSession.cs (1)
154throw new InvalidOperationException(Resources.Exception_InvalidSessionEstablishment);
SessionOptions.cs (1)
62set => throw new InvalidOperationException(nameof(Expiration) + " cannot be set for the cookie defined by " + nameof(SessionOptions));
Microsoft.AspNetCore.Session.Tests (5)
SessionTests.cs (5)
581throw new InvalidOperationException("An error occurred."); 1165throw new InvalidOperationException(); 1174throw new InvalidOperationException(); 1190throw new InvalidOperationException(); 1210throw new InvalidOperationException();
Microsoft.AspNetCore.Shared.Tests (22)
ObjectMethodExecutorTest.cs (1)
582Task.FromException<string>(new InvalidOperationException("Test exception")));
runtime\Http3\QPackDecoderTest.cs (2)
361throw new InvalidOperationException($"Error when checking header '{expectedValue.Key}'.", ex); 376throw new InvalidOperationException("Header with length zero.");
src\Shared\ActivatorUtilities\ActivatorUtilities.cs (2)
51throw new InvalidOperationException(message); 158throw new InvalidOperationException($"Unable to resolve service for type '{_parameters[index].ParameterType}' while attempting to activate '{_constructor.DeclaringType}'.");
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (4)
258throw new InvalidOperationException("The response trailers cannot be modified because the response has already completed. " 261throw new InvalidOperationException("The response headers cannot be modified because the response has already started."); 282=> throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "Invalid control character in header: 0x{0:X2}", headerCharacters[invalidIndex])); 291throw new InvalidOperationException($"The '{key}' header is not allowed in HTTP trailers.");
src\Shared\HttpSys\RequestProcessing\RawUrlHelper.cs (1)
50throw new InvalidOperationException("Invalid URI format");
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
259throw new InvalidOperationException("The response headers cannot be modified because the response has already started.");
src\Shared\HttpSys\RequestProcessing\RequestUriBuilder.cs (1)
114throw new InvalidOperationException("The path contains null characters.");
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (1)
140throw new InvalidOperationException($"Cannot call {nameof(GetDefaultValueForParameter)}, because no parameter default values were supplied.");
src\Shared\ServerInfrastructure\BufferExtensions.cs (1)
61throw new InvalidOperationException("Buffer backed by array was expected");
src\Shared\ServerInfrastructure\StringUtilities.cs (4)
36throw new InvalidOperationException(); 45throw new InvalidOperationException(); 88throw new InvalidOperationException(); 113throw new InvalidOperationException();
src\Shared\UrlDecoder\UrlDecoder.cs (2)
108throw new InvalidOperationException("The path contains null characters."); 446throw new InvalidOperationException("The path contains null characters.");
src\Shared\ValueStopwatch\ValueStopwatch.cs (1)
32throw new InvalidOperationException("An uninitialized, or 'default', ValueStopwatch cannot be used to get elapsed time.");
Microsoft.AspNetCore.SignalR (1)
HubEndpointRouteBuilderExtensions.cs (1)
45throw new InvalidOperationException("Unable to find the required services. Please add all the required services by calling " +
Microsoft.AspNetCore.SignalR.Client.Core (18)
HubConnection.cs (11)
266throw new InvalidOperationException($"The {nameof(HubConnection)} cannot be started if it is not in the {nameof(HubConnectionState.Disconnected)} state."); 273throw new InvalidOperationException($"The {nameof(HubConnection)} cannot be started while {nameof(StopAsync)} is running."); 845throw new InvalidOperationException($"{reader.GetType()} is not a {typeof(ChannelReader<>).Name}."); 1153throw new InvalidOperationException($"Unexpected message type: {message.GetType().FullName}"); 1340throw new InvalidOperationException( 1805throw new InvalidOperationException($"Assertion failed in {memberName}, at {fileName}:{lineNumber}: {message}"); 1866throw new InvalidOperationException($"'{methodName}' already has a value returning handler. Multiple return values are not supported."); 1972throw new InvalidOperationException($"Invocation ID '{irq.InvocationId}' is already in use."); 2214throw new InvalidOperationException($"There are no callbacks registered for the method '{methodName}'"); 2245throw new InvalidOperationException($"The HubConnection failed to transition from the '{expectedState}' state to the '{newState}' state because it was actually in the '{OverallState}' state."); 2297throw new InvalidOperationException($"The '{methodName}' method cannot be called if the connection is not active");
HubConnectionBuilder.cs (3)
41throw new InvalidOperationException("HubConnectionBuilder allows creation only of a single instance of HubConnection."); 50throw new InvalidOperationException($"Cannot create {nameof(HubConnection)} instance. An {nameof(IConnectionFactory)} was not configured."); 53throw new InvalidOperationException($"Cannot create {nameof(HubConnection)} instance. An {nameof(EndPoint)} was not configured.");
Internal\InvocationRequest.cs (2)
85_channel.Writer.TryComplete(new InvalidOperationException("Server provided a result in a completion response to a streamed invocation.")); 160_completionSource.TrySetException(new InvalidOperationException($"Streaming hub methods must be invoked with the '{nameof(HubConnection)}.{nameof(HubConnectionExtensions.StreamAsChannelAsync)}' method."));
Internal\SerializedHubMessage.cs (1)
64throw new InvalidOperationException(
src\SignalR\common\Shared\MessageBuffer.cs (1)
218throw new InvalidOperationException("Sequence ID greater than amount of messages we've received.");
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (3)
Hubs.cs (3)
61throw new InvalidOperationException("Unable to get HttpContext from request."); 68throw new InvalidOperationException("Unable to get headers from context."); 237throw new InvalidOperationException("Error occurred while streaming.");
Microsoft.AspNetCore.SignalR.Client.Tests (9)
HubConnectionTests.cs (4)
35var exception = new InvalidOperationException(); 50var exception = new InvalidOperationException(); 158var exception = new InvalidOperationException(); 1008throw new InvalidOperationException("No Parsed Message provided");
LongPollingTransportTests.cs (1)
294throw new InvalidOperationException("Unexpected request");
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
63throw new InvalidOperationException("The reader wasn't returned!");
TestConnection.cs (1)
181throw new InvalidOperationException("The connection must be stopped before this method can be used.");
TestHttpMessageHandler.cs (1)
256return Task.FromException<HttpResponseMessage>(new InvalidOperationException($"Http endpoint not implemented: {request.Method} {request.RequestUri}"));
TestTransport.cs (1)
40throw new InvalidOperationException($"The '{transferFormat}' transfer format is not supported by this transport.");
Microsoft.AspNetCore.SignalR.Common (4)
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
63throw new InvalidOperationException("The reader wasn't returned!");
src\SignalR\common\Shared\ReusableUtf8JsonWriter.cs (1)
46throw new InvalidOperationException("The writer wasn't returned!");
src\SignalR\common\Shared\Utf8BufferTextReader.cs (1)
42throw new InvalidOperationException("The reader wasn't returned!");
src\SignalR\common\Shared\Utf8BufferTextWriter.cs (1)
51throw new InvalidOperationException("The writer wasn't returned!");
Microsoft.AspNetCore.SignalR.Common.Tests (4)
Internal\Protocol\TestBinder.cs (2)
50throw new InvalidOperationException("Unexpected binder call"); 59throw new InvalidOperationException("Unexpected binder call");
Internal\Protocol\TestHubMessageEqualityComparer.cs (1)
47throw new InvalidOperationException($"Unknown message type: {x.GetType().FullName}");
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (1)
111throw new InvalidOperationException();
Microsoft.AspNetCore.SignalR.Core (20)
DefaultHubLifetimeManager.cs (1)
235throw new InvalidOperationException("Cannot send to an empty group name.");
HubConnectionHandler.cs (1)
114throw new InvalidOperationException("There are no supported protocols");
Internal\HubCallerClients.cs (1)
110throw new InvalidOperationException("Client results inside OnConnectedAsync Hub methods are not allowed.");
Internal\HubConnectionBinder.cs (1)
31throw new InvalidOperationException($"Unknown invocation ID '{invocationId}'.");
Internal\HubMethodDescriptor.cs (4)
108throw new InvalidOperationException($"'{p.ParameterType}' is not in DI as a keyed service."); 113throw new InvalidOperationException($"Unable to resolve service referenced by {nameof(FromKeyedServicesAttribute)}. The service provider doesn't support keyed services."); 121throw new InvalidOperationException( 153throw new InvalidOperationException(
Internal\TypedClientBuilder.cs (6)
246throw new InvalidOperationException("Type must be an interface."); 251throw new InvalidOperationException("Type must not contain properties."); 256throw new InvalidOperationException("Type must not contain events."); 274throw new InvalidOperationException( 282throw new InvalidOperationException( 288throw new InvalidOperationException(
SerializedHubMessage.cs (1)
59throw new InvalidOperationException(
SignalRConnectionBuilderExtensions.cs (1)
28throw new InvalidOperationException("Unable to find the required services. Please add all the required services by calling " +
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (1)
140throw new InvalidOperationException($"Cannot call {nameof(GetDefaultValueForParameter)}, because no parameter default values were supplied.");
src\SignalR\common\Shared\ClientResultsManager.cs (2)
58throw new InvalidOperationException($"Connection ID '{connectionId}' is not valid for invocation ID '{message.InvocationId}'."); 98throw new InvalidOperationException($"Invocation ID '{invocationId}' is not associated with a pending client result.");
src\SignalR\common\Shared\MessageBuffer.cs (1)
218throw new InvalidOperationException("Sequence ID greater than amount of messages we've received.");
Microsoft.AspNetCore.SignalR.Microbenchmarks (12)
HubConnectionReceiveBenchmark.cs (1)
107throw new InvalidOperationException("Should never happen.");
HubProtocolBenchmark.cs (2)
65throw new InvalidOperationException("Failed to read message"); 75throw new InvalidOperationException("Failed to write message");
MessageParserBenchmark.cs (2)
60throw new InvalidOperationException("Failed to parse"); 70throw new InvalidOperationException("Failed to parse");
ServerSentEventsBenchmark.cs (1)
74throw new InvalidOperationException("Parse failed!");
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
53throw new InvalidOperationException(message);
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (1)
111throw new InvalidOperationException();
src\Shared\ValueStopwatch\ValueStopwatch.cs (1)
32throw new InvalidOperationException("An uninitialized, or 'default', ValueStopwatch cannot be used to get elapsed time.");
src\SignalR\common\Http.Connections\src\ServerSentEventsMessageFormatter.cs (1)
63throw new InvalidOperationException("Could not get last segment from sequence.");
TestBinder.cs (2)
47throw new InvalidOperationException("Unexpected binder call"); 56throw new InvalidOperationException("Unexpected binder call");
Microsoft.AspNetCore.SignalR.Protocols.Json (4)
Protocol\JsonHubProtocol.cs (1)
567throw new InvalidOperationException($"Unsupported message type: {message.GetType().FullName}");
src\SignalR\common\Shared\ReusableUtf8JsonWriter.cs (1)
46throw new InvalidOperationException("The writer wasn't returned!");
src\SignalR\common\Shared\Utf8BufferTextReader.cs (1)
42throw new InvalidOperationException("The reader wasn't returned!");
src\SignalR\common\Shared\Utf8BufferTextWriter.cs (1)
51throw new InvalidOperationException("The writer wasn't returned!");
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (1)
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
63throw new InvalidOperationException("The reader wasn't returned!");
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (4)
Protocol\NewtonsoftJsonHubProtocol.cs (1)
564throw new InvalidOperationException($"Unsupported message type: {message.GetType().FullName}");
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
63throw new InvalidOperationException("The reader wasn't returned!");
src\SignalR\common\Shared\Utf8BufferTextReader.cs (1)
42throw new InvalidOperationException("The reader wasn't returned!");
src\SignalR\common\Shared\Utf8BufferTextWriter.cs (1)
51throw new InvalidOperationException("The writer wasn't returned!");
Microsoft.AspNetCore.SignalR.Specification.Tests (3)
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
63throw new InvalidOperationException("The reader wasn't returned!");
src\SignalR\common\testassets\Tests.Utils\TestClient.cs (2)
120throw new InvalidOperationException("Connection aborted!"); 153throw new InvalidOperationException("Connection aborted!");
Microsoft.AspNetCore.SignalR.StackExchangeRedis (3)
src\SignalR\common\Shared\ClientResultsManager.cs (2)
58throw new InvalidOperationException($"Connection ID '{connectionId}' is not valid for invocation ID '{message.InvocationId}'."); 98throw new InvalidOperationException($"Invocation ID '{invocationId}' is not associated with a pending client result.");
src\SignalR\common\Shared\MemoryBufferWriter.cs (1)
63throw new InvalidOperationException("The reader wasn't returned!");
Microsoft.AspNetCore.SignalR.Tests (9)
EndToEndTests.cs (2)
176(request, cancellationToken) => Task.FromException<HttpResponseMessage>(new InvalidOperationException("HTTP requests should not be sent."))); 226(request, cancellationToken) => Task.FromException<HttpResponseMessage>(new InvalidOperationException("HTTP requests should not be sent.")));
HubConnectionHandlerTests.cs (1)
695.Throws(new InvalidOperationException("Lifetime manager OnConnectedAsync failed."));
HubConnectionHandlerTestUtils\Hubs.cs (5)
134throw new InvalidOperationException("BOOM!"); 144return Task.FromException(new InvalidOperationException("BOOM!")); 582tcs.SetException(new InvalidOperationException("Hub OnConnected failed.")); 592tcs.SetException(new InvalidOperationException("Hub OnDisconnected failed.")); 1225throw new InvalidOperationException("BOOM");
HubConnectionHandlerTestUtils\Utils.cs (1)
52throw new InvalidOperationException($"Unsupported Hub Message type {expected.GetType()}");
Microsoft.AspNetCore.SignalR.Tests.Utils (4)
HubProtocolHelpers.cs (1)
31throw new InvalidOperationException($"Could not find protocol with name '{name}'.");
src\Shared\ValueStopwatch\ValueStopwatch.cs (1)
32throw new InvalidOperationException("An uninitialized, or 'default', ValueStopwatch cannot be used to get elapsed time.");
TestClient.cs (2)
120throw new InvalidOperationException("Connection aborted!"); 153throw new InvalidOperationException("Connection aborted!");
Microsoft.AspNetCore.SpaServices.Extensions (11)
AngularCli\AngularCliBuilder.cs (3)
45throw new InvalidOperationException($"To use {nameof(AngularCliBuilder)}, you must supply a non-empty value for the {nameof(SpaOptions.SourcePath)} property of {nameof(SpaOptions)} when calling {nameof(SpaApplicationBuilderExtensions.UseSpa)}."); 74throw new InvalidOperationException( 81throw new InvalidOperationException(
AngularCli\AngularCliMiddleware.cs (1)
81throw new InvalidOperationException(
AngularCli\AngularCliMiddlewareExtensions.cs (1)
33throw new InvalidOperationException($"To use {nameof(UseAngularCliServer)}, you must supply a non-empty value for the {nameof(SpaOptions.SourcePath)} property of {nameof(SpaOptions)} when calling {nameof(SpaApplicationBuilderExtensions.UseSpa)}.");
Npm\NodeScriptRunner.cs (1)
141throw new InvalidOperationException(message, ex);
ReactDevelopmentServer\ReactDevelopmentServerMiddleware.cs (1)
95throw new InvalidOperationException(
ReactDevelopmentServer\ReactDevelopmentServerMiddlewareExtensions.cs (1)
33throw new InvalidOperationException($"To use {nameof(UseReactDevelopmentServer)}, you must supply a non-empty value for the {nameof(SpaOptions.SourcePath)} property of {nameof(SpaOptions)} when calling {nameof(SpaApplicationBuilderExtensions.UseSpa)}.");
SpaDefaultPageMiddleware.cs (1)
66throw new InvalidOperationException(message);
StaticFiles\SpaStaticFilesExtensions.cs (2)
38throw new InvalidOperationException($"No {nameof(SpaStaticFilesOptions.RootPath)} " + 123throw new InvalidOperationException($"To use {nameof(UseSpaStaticFiles)}, you must " +
Microsoft.AspNetCore.StaticAssets (8)
Development\StaticAssetDescriptorExtensions.cs (3)
22throw new InvalidOperationException("Content-Length header not found."); 35throw new InvalidOperationException("Last-Modified header not found."); 52throw new InvalidOperationException("ETag header not found.");
Development\StaticAssetDevelopmentRuntimeHandler.cs (1)
156throw new InvalidOperationException("The original asset was not found.");
StaticAssetEndpointFactory.cs (1)
43throw new InvalidOperationException($"The file '{resource.AssetFile}' could not be found.");
StaticAssetsEndpointRouteBuilderExtensions.cs (1)
67throw new InvalidOperationException($"The static resources manifest file '{manifestPath}' was not found.");
StaticAssetsInvoker.cs (1)
74throw new InvalidOperationException("The ETag header is required.");
StaticAssetsManifest.cs (1)
33throw new InvalidOperationException($"The static resources manifest file '{manifestPath}' could not be deserialized.");
Microsoft.AspNetCore.StaticFiles (1)
Helpers.cs (1)
17throw new InvalidOperationException("Missing FileProvider.");
Microsoft.AspNetCore.TestHost (18)
.packages\microsoft.extensions.hostfactoryresolver.sources\9.0.0-preview.5.24265.2\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
246_hostTcs.TrySetException(new InvalidOperationException("The entry point exited without ever building an IHost.")); 285throw new InvalidOperationException($"Timed out waiting for the entry point to build the IHost after {s_defaultWaitTimeout}. This timeout can be modified using the '{TimeoutEnvironmentKey}' environment variable.");
AsyncStreamWrapper.cs (2)
46throw new InvalidOperationException("Synchronous operations are disallowed. Call ReadAsync or set AllowSynchronousIO to true."); 86throw new InvalidOperationException("Synchronous operations are disallowed. Call WriteAsync or set AllowSynchronousIO to true.");
HttpContextBuilder.cs (1)
200throw new InvalidOperationException("An error occurred when completing the request. Request delegate may have finished while there is a pending read of the request body.", ex);
ResponseBodyWriterStream.cs (2)
46throw new InvalidOperationException("Synchronous operations are disallowed. Call WriteAsync or set AllowSynchronousIO to true."); 61throw new InvalidOperationException("Synchronous operations are disallowed. Call WriteAsync or set AllowSynchronousIO to true.");
ResponseFeature.cs (3)
37throw new InvalidOperationException("The status code cannot be set, the response has already started."); 55throw new InvalidOperationException("The reason phrase cannot be set, the response has already started."); 78throw new InvalidOperationException();
TestServer.cs (2)
117?? throw new InvalidOperationException("The TestServer constructor was not called with a IWebHostBuilder so IWebHost is not available."); 143get => _application ?? throw new InvalidOperationException("The server has not been started or no web application was configured.");
TestWebSocket.cs (2)
182throw new InvalidOperationException("Close already sent."); 190throw new InvalidOperationException("Close already received.");
WebHostBuilderExtensions.cs (1)
166throw new InvalidOperationException($"Solution root could not be located using application root {applicationBasePath}.");
WebSocketClient.cs (3)
101throw new InvalidOperationException("Incomplete handshake, status code: " + httpContext.Response.StatusCode); 107throw new InvalidOperationException("Incomplete handshake"); 140throw new InvalidOperationException("The response has already started");
Microsoft.AspNetCore.TestHost.Tests (13)
ClientHandlerTests.cs (5)
511throw new InvalidOperationException("Test Exception"); 527throw new InvalidOperationException("Test Exception"); 545throw new InvalidOperationException(new string('a', 1024 * 32)); 561throw new InvalidOperationException(new string('a', 1024 * 32)); 577throw new InvalidOperationException(new string('a', 1024 * 32));
HttpContextBuilderTests.cs (2)
271throw new InvalidOperationException("Test Exception"); 289throw new InvalidOperationException("Test Exception");
TestClientTests.cs (2)
254message.Content = new PushContent(stream => throw new InvalidOperationException("HttpContent exception")); 875throw new InvalidOperationException("The request was not aborted");
TestServerTests.cs (4)
115throw new InvalidOperationException(); 169throw new InvalidOperationException(); 803throw new InvalidOperationException("Dispose should not happen!"); 808throw new InvalidOperationException("DisposeAsync should not happen!");
Microsoft.AspNetCore.Tests (3)
WebApplicationTests.cs (3)
2031app.MapGet("/", void () => throw new InvalidOperationException("BOOM")); 2083app.MapGet("/", void () => throw new InvalidOperationException("BOOM")); 2910throw new InvalidOperationException("BOOM Filter");
Microsoft.AspNetCore.WebSockets (2)
HandshakeHelpers.cs (1)
68throw new InvalidOperationException("Could not compute the hash for the 'Sec-WebSocket-Accept' header.");
WebSocketMiddleware.cs (1)
136throw new InvalidOperationException("Not a WebSocket request.");
Microsoft.AspNetCore.WebSockets.Microbenchmarks (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
53throw new InvalidOperationException(message);
Microsoft.AspNetCore.WebSockets.Tests (1)
Http2WebSocketTests.cs (1)
68throw new InvalidOperationException("This is not an Extended CONNECT request.");
Microsoft.AspNetCore.WebUtilities (3)
FormPipeReader.cs (1)
119throw new InvalidOperationException("End of body before form was fully parsed.");
src\Shared\UrlDecoder\UrlDecoder.cs (2)
108throw new InvalidOperationException("The path contains null characters."); 446throw new InvalidOperationException("The path contains null characters.");
Microsoft.AspNetCore.WebUtilities.Microbenchmarks (5)
MultipartReaderBenchmark.cs (3)
43throw new InvalidOperationException(nameof(BoundarySize)); 111throw new InvalidOperationException(); 135throw new InvalidOperationException();
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
53throw new InvalidOperationException(message);
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (1)
111throw new InvalidOperationException();
Microsoft.AspNetCore.WebUtilities.Tests (2)
HttpRequestStreamReaderTest.cs (1)
566return new InvalidOperationException("The stream cannot be accessed synchronously");
src\Shared\Buffers.Testing\ReadOnlySequenceFactory.cs (1)
111throw new InvalidOperationException();
Microsoft.Build (36)
BackEnd\Client\MSBuildClient.cs (2)
582throw new InvalidOperationException($"Unexpected packet type {packet.GetType().Name}"); 597throw new InvalidOperationException($"Unexpected console output type {consoleWrite.OutputType}");
BackEnd\Components\Scheduler\Scheduler.cs (1)
1774new InvalidOperationException(
BackEnd\Node\OutOfProcServerNode.cs (2)
114shutdownException = new InvalidOperationException("MSBuild server is already running!"); 355_shutdownException = new InvalidOperationException("Client requested build while server is busy processing previous client build request.");
BuildCheck\Acquisition\BuildCheckAcquisitionModule.cs (1)
55throw new InvalidOperationException($"Failed to create an instance of type {analyzerType.FullName} as BuildAnalyzer.");
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (1)
30internal static IBuildCheckManager GlobalInstance => s_globalInstance ?? throw new InvalidOperationException("BuildCheckManagerProvider not initialized");
BuildCheck\Infrastructure\ConfigurationProvider.cs (1)
201throw new InvalidOperationException("Value is null");
Collections\ArrayDictionary.cs (1)
104throw new InvalidOperationException($"ArrayDictionary is at capacity {keys.Length}");
Collections\RetrievableEntryHashSet\HashSet.cs (5)
350throw new InvalidOperationException("Cannot do a constrained lookup on this collection."); 599throw new InvalidOperationException(); 974throw new InvalidOperationException(); 1006throw new InvalidOperationException(); 1016throw new InvalidOperationException();
CommunicationsUtilities.cs (2)
498throw new InvalidOperationException(); 560throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Client: rejected old host. Received byte {0} instead of {1}.", bytes[0], byteToAccept));
Construction\ProjectElementContainer.cs (2)
880throw new InvalidOperationException(); 987throw new InvalidOperationException();
ErrorUtilities.cs (1)
247throw new InvalidOperationException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, args));
Evaluation\LazyItemEvaluator.IncludeOperation.cs (1)
138throw new InvalidOperationException(fragment.GetType().ToString());
Evaluation\Profiler\EvaluationProfiler.cs (1)
135throw new InvalidOperationException("Evaluation frame disposed out of order");
Graph\GraphBuilder.cs (2)
537throw new InvalidOperationException(ResourceUtilities.GetResourceString("NullReferenceFromProjectInstanceFactory")); 581throw new InvalidOperationException(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword(
Graph\ParallelWorkSet.cs (1)
109throw new InvalidOperationException("Cannot add new work after work set is marked as completed.");
Graph\ProjectInterpretation.cs (1)
116throw new InvalidOperationException(
InprocTrackingNativeMethods.cs (1)
223throw new InvalidOperationException();
Instance\TaskRegistry.cs (1)
1498throw new InvalidOperationException(AssemblyResources.GetString("TaskFactoryTaskTypeIsNotSet"));
InterningBinaryReader.cs (1)
66throw new InvalidOperationException();
Logging\BinaryLogger\BinaryLogReplayEventSource.cs (2)
68public int FileFormatVersion => _fileFormatVersion ?? throw new InvalidOperationException(ResourceUtilities.GetResourceString("Binlog_Source_VersionUninitialized")); 69public int MinimumReaderVersion => _minimumReaderVersion ?? throw new InvalidOperationException(ResourceUtilities.GetResourceString("Binlog_Source_VersionUninitialized"));
Logging\BinaryLogger\BuildEventArgsReader.cs (2)
121throw new InvalidOperationException( 199throw new InvalidOperationException(
Logging\BinaryLogger\Postprocessing\TransparentReadStream.cs (2)
28throw new InvalidOperationException(ResourceUtilities.GetResourceString("Binlog_StreamUtils_MustBeReadable")); 43throw new InvalidOperationException(ResourceUtilities.GetResourceString("Binlog_StreamUtils_MustBeReadable"));
ManagedFileSystem.cs (2)
73throw new InvalidOperationException(ex.Message, ex); 78throw new InvalidOperationException(ex.Message, ex);
Microsoft.Build.Engine (1)
Shared\ErrorUtilities.cs (1)
267throw new InvalidOperationException(ResourceUtilities.FormatResourceString(resourceName, args));
Microsoft.Build.Engine.OM.UnitTests (1)
ErrorUtilities.cs (1)
247throw new InvalidOperationException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, args));
Microsoft.Build.Engine.UnitTests (7)
BackEnd\BuildRequestEngine_Tests.cs (4)
105BuildResult errorResult = new BuildResult(_entry.Request, new InvalidOperationException("ContinueRequest not received in time.")); 147BuildResult errorResult = new BuildResult(_entry.Request, new InvalidOperationException("ContinueRequest not received in time.")); 187throw new InvalidOperationException("ThrowExceptionOnContinue set."); 206throw new InvalidOperationException("ThrowExceptionOnCancel set.");
ConsoleLogger_Tests.cs (1)
677throw new InvalidOperationException($"Invalid expectedMessageType '{expectedMessageType}'");
Evaluation\ProjectRootElementCache_Tests.cs (2)
74ProjectRootElement projectRootElement2 = ProjectCollection.GlobalProjectCollection.ProjectRootElementCache.Get(rootedPath, (p, c) => { throw new InvalidOperationException(); }, true, false); 91projectRootElement = ProjectCollection.GlobalProjectCollection.ProjectRootElementCache.Get(projectPath, (p, c) => { throw new InvalidOperationException(); }, true, false);
Microsoft.Build.Framework (10)
ImmutableSegmentedList`1+ValueBuilder.cs (1)
76throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
LazyFormattedBuildEventArgs.cs (1)
185throw new InvalidOperationException(string.Format("Invalid type for message formatting argument, was {0}", param.GetType().FullName));
TaskItemData.cs (4)
53=> throw new InvalidOperationException($"{nameof(TaskItemData)} does not support write operations"); 69throw new InvalidOperationException($"{nameof(TaskItemData)} does not support write operations"); 80throw new InvalidOperationException($"{nameof(TaskItemData)} does not support write operations"); 85throw new InvalidOperationException($"{nameof(TaskItemData)} does not support write operations");
ThrowHelper.cs (4)
165throw new InvalidOperationException(GetResourceString(resource), e); 183throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 189throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 195throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported);
Microsoft.Build.Tasks.Core (7)
BootstrapperUtil\Product.cs (1)
35throw new InvalidOperationException();
ErrorUtilities.cs (1)
247throw new InvalidOperationException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, args));
InterningBinaryReader.cs (1)
66throw new InvalidOperationException();
ManifestUtil\Manifest.cs (3)
401throw new InvalidOperationException(String.Format(System.Globalization.CultureInfo.InvariantCulture, "XPath not found: {0}", XPaths.codebasePaths[0])); 410throw new InvalidOperationException(String.Format(System.Globalization.CultureInfo.InvariantCulture, "XPath not found: {0}", XPaths.dependencyPublicKeyTokenAttribute)); 429throw new InvalidOperationException(String.Format(System.Globalization.CultureInfo.InvariantCulture, "XPath not found: {0}", XPaths.fileSizeAttribute));
ManifestUtil\SecurityUtil.cs (1)
676throw new InvalidOperationException(resources.GetString("SignFile.CertNotInStore"));
Microsoft.Build.Tasks.UnitTests (1)
AssemblyDependency\TaskTranslatorHelpers.cs (1)
58throw new InvalidOperationException("GetWriteTranslator has to be called before GetReadTranslator");
Microsoft.Build.UnitTests.Shared (1)
RunnerUtilities.cs (1)
64?? throw new InvalidOperationException("This test assembly does not have the BootstrapLocationAttribute");
Microsoft.Build.Utilities.Core (6)
ErrorUtilities.cs (1)
247throw new InvalidOperationException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, args));
MuxLogger.cs (5)
154throw new InvalidOperationException("MuxLogger already initialized."); 199throw new InvalidOperationException("MuxLogger not initialized."); 237throw new InvalidOperationException("Cannot register a logger before the MuxLogger has been initialized."); 242throw new InvalidOperationException("Cannot register a logger for a submission once it has started."); 567throw new InvalidOperationException("Cannot register the same logger twice.");
Microsoft.Build.Utilities.UnitTests (4)
ProcessorArchitecture_Tests.cs (2)
110throw new InvalidOperationException("We should never hit ProcessorArchitecture.MSIL"); 113throw new InvalidOperationException("Untested or new ProcessorArchitecture type");
TaskLoggingHelper_Tests.cs (2)
248Exception inner = new InvalidOperationException(); 297new InvalidOperationException("The operation was invalid"),
Microsoft.Cci.Extensions (6)
Extensions\CSharp\CSharpCciExtensions.cs (2)
122throw new InvalidOperationException(String.Format("All delegates should have an Invoke method, but {0} doesn't have one.", type.FullName())); 134throw new InvalidOperationException("All enums should have a value__ field!");
HostEnvironment.cs (3)
276throw new InvalidOperationException("The Core Assembly can only be set once."); 470throw new InvalidOperationException(string.Format("Could not find core assembly '{0}' in the list of contracts.", coreAssemblySimpleName)); 657throw new InvalidOperationException(String.Format("Could not find core assembly '{0}' in the list of identities.", coreAssemblySimpleName));
Mappings\ElementMapping.cs (1)
39throw new InvalidOperationException("At least one element should be non-null!");
Microsoft.DotNet.Arcade.Sdk (5)
src\GenerateResxSource.cs (5)
181throw new InvalidOperationException(); 233throw new InvalidOperationException(); 258throw new InvalidOperationException(); 307throw new InvalidOperationException(); 361throw new InvalidOperationException();
Microsoft.DotNet.Build.Tasks.Packaging (5)
Extensions.cs (4)
150throw new InvalidOperationException("Invalid member expression."); 156throw new InvalidOperationException("Invalid member expression."); 172throw new InvalidOperationException("Invalid member expression."); 178throw new InvalidOperationException("Invalid member expression.");
PackageIndex.cs (1)
756throw new InvalidOperationException($"Package {packageId} cannot be mapped to {metaPackageId} because it is already mapped to {existingMetaPackage}.");
Microsoft.DotNet.Helix.Sdk (2)
AzureDevOpsTask.cs (1)
27throw new InvalidOperationException($"Required environment variable {name} not set.");
ProvisioningProfileProvider.cs (1)
202?? throw new InvalidOperationException("Failed to get provision profile file name");
Microsoft.DotNet.NuGetRepack.Tasks (2)
src\NuGetVersionUpdater.cs (2)
175throw new InvalidOperationException($"Can only update pre-release packages: '{packagePath}' has release version"); 339errors.Add(new InvalidOperationException($"Package '{package.Id}' depends on a pre-release package '{id}, {versionRangeAttribute.Value}'"));
Microsoft.DotNet.NuGetRepack.Tests (1)
TestHelpers\ResourceLoader.cs (1)
19throw new InvalidOperationException($"Resource '{name}' not found in {assembly.FullName}.");
Microsoft.DotNet.Open.Api.Tools.Tests (2)
src\Tools\Shared\TestHelpers\TemporaryCSharpProject.cs (1)
117throw new InvalidOperationException("Can add project reference to self");
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (1)
71throw new InvalidOperationException("This is the root directory");
Microsoft.DotNet.RemoteExecutor (1)
RemoteExecutor.cs (1)
424throw new InvalidOperationException("RuntimeConfigurationOptions are only supported on .NET Core");
Microsoft.DotNet.SignTool (1)
src\BatchSignUtil.cs (1)
296throw new InvalidOperationException("No progress made on signing which indicates a bug");
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (5)
Modeler\ServiceClientModelFactory.cs (4)
69throw new InvalidOperationException( 83throw new InvalidOperationException( 97throw new InvalidOperationException( 111throw new InvalidOperationException(
ServiceClientCodeFactory.cs (1)
44throw new InvalidOperationException($"File '{filePath}' was already generated.");
Microsoft.DotNet.VersionTools (2)
src\BuildManifest\Model\OrchestratedBuildModel.cs (1)
33throw new InvalidOperationException(
src\Dependencies\Submodule\IndicatorPackageSubmoduleUpdater.cs (1)
88throw new InvalidOperationException(
Microsoft.DotNet.XUnitExtensions (1)
DiscovererHelpers.cs (1)
53throw new InvalidOperationException($"Unable to get member, please check input for {entry}.");
Microsoft.Extensions.ApiDescription.Client.Tests (2)
src\Tools\Shared\TestHelpers\TemporaryCSharpProject.cs (1)
117throw new InvalidOperationException("Can add project reference to self");
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (1)
71throw new InvalidOperationException("This is the root directory");
Microsoft.Extensions.Caching.Hybrid (7)
Internal\DefaultHybridCache.L2.cs (1)
81throw new InvalidOperationException($"Maximum cache length ({MaximumPayloadBytes} bytes) exceeded");
Internal\DefaultHybridCache.Serialization.cs (1)
48throw new InvalidOperationException($"No {nameof(IHybridCacheSerializer<T>)} configured for type '{typeof(T).Name}'");
Internal\DefaultHybridCache.Stampede.cs (1)
101throw new InvalidOperationException($"All calls to {nameof(HybridCache)} with the same key should use the same data type; the same key is being used for '{existingType.FullName}' and '{newType.FullName}' data")
Internal\DefaultHybridCache.StampedeStateT.cs (2)
129static Task<CacheItem<T>> Invalid() => System.Threading.Tasks.Task.FromException<CacheItem<T>>(new InvalidOperationException("Task should not be accessed for non-shared instances")); 199private static CacheItem<T> ThrowUnexpectedCacheItem() => throw new InvalidOperationException("Unexpected cache item");
Internal\RecyclableArrayBufferWriter.cs (2)
101=> throw new InvalidOperationException("Max length exceeded"); 198static void ThrowOutOfMemoryException() => throw new InvalidOperationException("Unable to grow buffer as requested");
Microsoft.Extensions.Caching.Memory (1)
MemoryCache.cs (1)
122throw new InvalidOperationException(SR.Format(SR.CacheEntryHasEmptySize, nameof(entry.Size), nameof(_options.SizeLimit)));
Microsoft.Extensions.Caching.MicroBenchmarks (2)
src\Caching\Hybrid\src\Internal\RecyclableArrayBufferWriter.cs (2)
101=> throw new InvalidOperationException("Max length exceeded"); 198static void ThrowOutOfMemoryException() => throw new InvalidOperationException("Unable to grow buffer as requested");
Microsoft.Extensions.Caching.SqlServer (2)
DatabaseOperations.cs (2)
381throw new InvalidOperationException("The absolute expiration value must be in the future."); 393throw new InvalidOperationException("Either absolute or sliding expiration needs " +
Microsoft.Extensions.Caching.StackExchangeRedis (1)
RedisCache.cs (1)
364_ = connection ?? throw new InvalidOperationException($"{nameof(connection)} cannot be null.");
Microsoft.Extensions.Configuration (3)
ConfigurationRoot.cs (1)
133throw new InvalidOperationException(SR.Error_NoSources);
StreamConfigurationProvider.cs (2)
45throw new InvalidOperationException(SR.StreamConfigurationProvidersAlreadyLoaded); 50throw new InvalidOperationException(SR.StreamConfigurationSourceStreamCannotBeNull);
Microsoft.Extensions.Configuration.Abstractions (1)
ConfigurationExtensions.cs (1)
107throw new InvalidOperationException(SR.Format(SR.InvalidSectionName, key));
Microsoft.Extensions.Configuration.Binder (17)
ConfigurationBinder.cs (17)
243throw new InvalidOperationException(SR.Format(SR.Error_MissingConfig, 455throw new InvalidOperationException(SR.Format(SR.Error_CannotActivateAbstractOrInterface, type)); 465throw new InvalidOperationException(SR.Format(SR.Error_MissingPublicInstanceConstructor, type)); 470throw new InvalidOperationException(SR.Format(SR.Error_MultipleParameterizedConstructors, type)); 480throw new InvalidOperationException(SR.Format(SR.Error_CannotBindToConstructorParameter, type, nameOfInvalidParameter)); 488throw new InvalidOperationException(SR.Format(SR.Error_ConstructorParametersDoNotMatchProperties, type, nameOfInvalidParameters)); 508throw new InvalidOperationException(SR.Format(SR.Error_FailedToActivate, type), ex); 511return instance ?? throw new InvalidOperationException(SR.Format(SR.Error_FailedToActivate, type)); 688throw new InvalidOperationException(SR.Format(SR.Error_GeneralErrorWhenBinding, 727throw new InvalidOperationException(SR.Format(SR.Error_GeneralErrorWhenBinding, 744throw new InvalidOperationException(SR.Format(SR.Error_UnsupportedMultidimensionalArray, type)); 783throw new InvalidOperationException(SR.Format(SR.Error_GeneralErrorWhenBinding, 854throw new InvalidOperationException(SR.Format(SR.Error_GeneralErrorWhenBinding, 895error = new InvalidOperationException(SR.Format(SR.Error_FailedBinding, path, type), ex); 908error = new InvalidOperationException(SR.Format(SR.Error_FailedBinding, path, type), ex); 1020throw new InvalidOperationException(SR.Format(SR.Error_ParameterBeingBoundToIsUnnamed, type)); 1040throw new InvalidOperationException(SR.Format(SR.Error_ParameterHasNoMatchingConfig, type, parameterName));
Microsoft.Extensions.Configuration.KeyPerFile.Tests (1)
KeyPerFileTests.cs (1)
539throw new InvalidOperationException("Cannot create stream from directory");
Microsoft.Extensions.Configuration.UserSecrets (3)
PathHelper.cs (2)
52throw new InvalidOperationException( 73throw new InvalidOperationException(SR.Format(SR.Error_Missing_UserSecretsLocation, userSecretsFallbackDir));
UserSecretsConfigurationExtensions.cs (1)
132throw new InvalidOperationException(SR.Format(SR.Error_Missing_UserSecretsIdAttribute, assembly.GetName().Name));
Microsoft.Extensions.DependencyInjection (16)
ServiceLookup\CallSiteChain.cs (1)
24throw new InvalidOperationException(CreateCircularDependencyExceptionMessage(serviceIdentifier));
ServiceLookup\CallSiteFactory.cs (9)
279throw new InvalidOperationException(SR.Format(SR.AotCannotCreateEnumerableValueType, itemType)); 400throw new InvalidOperationException(SR.InvalidServiceDescriptor); 473throw new InvalidOperationException(SR.Format(SR.NoConstructorMatch, implementationType)); 536throw new InvalidOperationException(string.Join( 549throw new InvalidOperationException( 585throw new InvalidOperationException(SR.InvalidServiceKeyType); 609throw new InvalidOperationException(SR.Format(SR.CannotResolveService, 637throw new InvalidOperationException(SR.Format(SR.AotCannotCreateGenericValueType, serviceType, typeArg)); 779throw new InvalidOperationException(SR.ServiceDescriptorNotExist);
ServiceLookup\CallSiteValidator.cs (3)
26throw new InvalidOperationException( 31throw new InvalidOperationException( 56throw new InvalidOperationException(SR.Format(SR.ScopedInSingletonException,
ServiceLookup\ServiceProviderEngineScope.cs (1)
134throw new InvalidOperationException(SR.Format(SR.AsyncDisposableServiceDispose, TypeNameHelper.GetTypeDisplayName(toDispose[i])));
ServiceProvider.cs (2)
130throw new InvalidOperationException(SR.Format(SR.NoServiceRegistered, serviceType)); 201throw new InvalidOperationException($"Error while validating the service descriptor '{descriptor}': {e.Message}", e);
Microsoft.Extensions.DependencyInjection.Abstractions (17)
ActivatorUtilities.cs (11)
59throw new InvalidOperationException(SR.CannotCreateAbstractClasses); 165throw new InvalidOperationException(SR.Format(SR.MultipleCtorsFoundWithBestLength, instanceType, bestLength)); 392throw new InvalidOperationException(SR.Format(SR.UnableToResolveService, type, requiredBy)); 578throw new InvalidOperationException(SR.Format(SR.CtorNotLocated, instanceType)); 616throw new InvalidOperationException(SR.Format(SR.MultipleCtorsFound, instanceType)); 772throw new InvalidOperationException(SR.KeyedServicesNotSupported); 792throw new InvalidOperationException(SR.KeyedServicesNotSupported); 873throw new InvalidOperationException(SR.Format(SR.UnableToResolveService, _constructor.Parameters[index].ParameterType, _constructor.Info.DeclaringType)); 917throw new InvalidOperationException(SR.Format(SR.MultipleCtorsMarkedWithAttribute, nameof(ActivatorUtilitiesConstructorAttribute))); 922throw new InvalidOperationException(SR.Format(SR.MarkedCtorMissingArgumentTypes, nameof(ActivatorUtilitiesConstructorAttribute))); 1231throw new InvalidOperationException(SR.KeyedServicesNotSupported);
ServiceCollection.cs (1)
124throw new InvalidOperationException(SR.ServiceCollectionReadOnly);
ServiceDescriptor.cs (2)
1061private static void ThrowKeyedDescriptor() => throw new InvalidOperationException(SR.KeyedDescriptorMisuse); 1063private static void ThrowNonKeyedDescriptor() => throw new InvalidOperationException(SR.NonKeyedDescriptorMisuse);
ServiceProviderKeyedServiceExtensions.cs (2)
31throw new InvalidOperationException(SR.KeyedServicesNotSupported); 52throw new InvalidOperationException(SR.KeyedServicesNotSupported);
ServiceProviderServiceExtensions.cs (1)
48throw new InvalidOperationException(SR.Format(SR.NoServiceRegistered, serviceType));
Microsoft.Extensions.DependencyModel (3)
CompilationLibrary.cs (1)
78throw new InvalidOperationException(SR.Format(SR.LibraryLocationNotFound, Name));
DependencyContextJsonReader.cs (1)
764throw new InvalidOperationException(SR.Format(SR.LibraryInformationNotFound, nameWithVersion));
Resolution\ReferenceAssemblyPathResolver.cs (1)
56throw new InvalidOperationException(SR.Format(SR.ReferenceAssemblyNotFound, assembly, library.Name));
Microsoft.Extensions.Diagnostics (2)
Metrics\DefaultMeterFactory.cs (1)
27throw new InvalidOperationException(SR.InvalidScope);
Metrics\ListenerSubscription.cs (1)
179throw new InvalidOperationException(SR.MoreThanOneWildcard);
Microsoft.Extensions.Diagnostics.HealthChecks (1)
src\Shared\ValueStopwatch\ValueStopwatch.cs (1)
32throw new InvalidOperationException("An uninitialized, or 'default', ValueStopwatch cannot be used to get elapsed time.");
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (9)
DefaultHealthCheckServiceTest.cs (9)
205var thrownException = new InvalidOperationException("Whoops!"); 206var faultedException = new InvalidOperationException("Ohnoes!"); 277var thrownException = new InvalidOperationException("Whoops!"); 278var faultedException = new InvalidOperationException("Ohnoes!"); 653throw new InvalidOperationException("Should only used once"); 748throw new InvalidOperationException("Dependency disposed multiple times."); 762throw new InvalidOperationException("Dependency disposed multiple times."); 779throw new InvalidOperationException("Dependency disposed multiple times."); 788throw new InvalidOperationException("Dependency disposed multiple times.");
Microsoft.Extensions.Features (3)
FeatureCollection.cs (1)
128throw new InvalidOperationException(
FeatureCollectionExtensions.cs (2)
26return featureCollection.Get<TFeature>() ?? throw new InvalidOperationException($"Feature '{typeof(TFeature)}' is not present."); 41return featureCollection[key] ?? throw new InvalidOperationException($"Feature '{key}' is not present.");
Microsoft.Extensions.FileProviders.Embedded (18)
EmbeddedResourceFileInfo.cs (1)
97throw new InvalidOperationException($"Couldn't get resource at '{_resourcePath}'.");
Manifest\EmbeddedFilesManifest.cs (1)
84throw new InvalidOperationException($"Invalid path: '{path}'");
Manifest\ManifestDirectory.cs (4)
75throw new InvalidOperationException($"Invalid entry type '{nameof(ManifestSinkDirectory)}'"); 80throw new InvalidOperationException($"Can't add a root folder as a child"); 97throw new InvalidOperationException("Unexpected manifest node."); 108throw new InvalidOperationException("Unexpected manifest node.");
Manifest\ManifestDirectoryInfo.cs (2)
45throw new InvalidOperationException("Cannot create a stream for a directory."); 68_ => throw new InvalidOperationException("Unknown entry type")
Manifest\ManifestEntry.cs (1)
26throw new InvalidOperationException("Directory already has a parent.");
Manifest\ManifestFileInfo.cs (1)
68throw new InvalidOperationException($"Couldn't get resource at '{ManifestFile.ResourcePath}'.");
Manifest\ManifestParser.cs (8)
32throw new InvalidOperationException($"Could not load the embedded file manifest " + 43throw new InvalidOperationException($"The embedded file manifest '{name}' for " + 72throw new InvalidOperationException( 85throw new InvalidOperationException($"Invalid manifest format. Expected a 'File' or a 'Directory' node:" + 111throw new InvalidOperationException($"Invalid manifest format.Expected a 'File' or a 'Directory' node. " + 120throw new InvalidOperationException($"Invalid manifest format. Missing '{elementName}' element name"); 131throw new InvalidOperationException($"Invalid manifest format. '{element.Name}' must contain a 'Name' attribute."); 147throw new InvalidOperationException(
Microsoft.Extensions.FileProviders.Physical (3)
PhysicalDirectoryInfo.cs (2)
68throw new InvalidOperationException(SR.CannotCreateStream); 97_ => throw new InvalidOperationException(SR.UnexpectedFileSystemInfo)
PhysicalFileProvider.cs (1)
105throw new InvalidOperationException(SR.Format(SR.CannotModifyWhenFileWatcherInitialized, nameof(UsePollingFileWatcher)));
Microsoft.Extensions.FileSystemGlobbing (11)
Abstractions\DirectoryInfoWrapper.cs (1)
95throw new InvalidOperationException(
Internal\PathSegments\WildcardPathSegment.cs (1)
27_ => throw new InvalidOperationException(SR.Format(SR.StringComparisonTypeShouldBeOrdinal, comparisonType)),
Internal\PatternContexts\PatternContextLinear.cs (1)
24throw new InvalidOperationException(SR.CannotTestFile);
Internal\PatternContexts\PatternContextLinearExclude.cs (1)
20throw new InvalidOperationException(SR.CannotTestDirectory);
Internal\PatternContexts\PatternContextLinearInclude.cs (2)
20throw new InvalidOperationException(SR.CannotDeclarePathSegment); 38throw new InvalidOperationException(SR.CannotTestDirectory);
Internal\PatternContexts\PatternContextRagged.cs (1)
23throw new InvalidOperationException(SR.CannotTestFile);
Internal\PatternContexts\PatternContextRaggedExclude.cs (1)
20throw new InvalidOperationException(SR.CannotTestDirectory);
Internal\PatternContexts\PatternContextRaggedInclude.cs (2)
21throw new InvalidOperationException(SR.CannotDeclarePathSegment); 43throw new InvalidOperationException(SR.CannotTestDirectory);
Util\StringComparisonHelper.cs (1)
18_ => throw new InvalidOperationException(SR.Format(SR.UnexpectedStringComparisonType, comparisonType))
Microsoft.Extensions.Hosting (5)
HostApplicationBuilder.cs (1)
236throw new InvalidOperationException(SR.BuildCalled);
HostBuilder.cs (2)
152throw new InvalidOperationException(SR.BuildCalled); 361throw new InvalidOperationException(SR.NullIServiceProvider);
Internal\ServiceFactoryAdapter.cs (2)
41throw new InvalidOperationException(SR.ResolverReturnedNull); 51throw new InvalidOperationException(SR.CreateBuilderCallBeforeCreateServiceProvider);
Microsoft.Extensions.Hosting.WindowsServices (1)
WindowsServiceLifetime.cs (1)
101_delayStart.TrySetException(new InvalidOperationException("Stopped without starting"));
Microsoft.Extensions.Http (7)
DefaultHttpMessageHandlerBuilder.cs (1)
42throw new InvalidOperationException(message);
DependencyInjection\HttpClientBuilderExtensions.cs (2)
374throw new InvalidOperationException($"{nameof(HttpClientBuilderExtensions.AddTypedClient)} isn't supported with {nameof(HttpClientFactoryServiceCollectionExtensions.ConfigureHttpClientDefaults)}."); 672throw new InvalidOperationException(message);
DependencyInjection\SocketsHttpHandlerBuilderExtensions.cs (1)
37throw new InvalidOperationException(message);
HttpMessageHandlerBuilder.cs (2)
98throw new InvalidOperationException(message); 111throw new InvalidOperationException(message);
ValueStopwatch.cs (1)
30throw new InvalidOperationException("An uninitialized, or 'default', ValueStopwatch cannot be used to get elapsed time.");
Microsoft.Extensions.Http.Polly (2)
PolicyHttpMessageHandler.cs (1)
185throw new InvalidOperationException(message);
src\Shared\ValueStopwatch\ValueStopwatch.cs (1)
32throw new InvalidOperationException("An uninitialized, or 'default', ValueStopwatch cannot be used to get elapsed time.");
Microsoft.Extensions.Http.Polly.Tests (6)
PolicyHttpMessageHandlerTest.cs (6)
44throw new InvalidOperationException(); 89throw new InvalidOperationException(); 135throw new InvalidOperationException(); 187throw new InvalidOperationException(); 259throw new InvalidOperationException(); 336throw new InvalidOperationException();
Microsoft.Extensions.Identity.Core (13)
DefaultPersonalDataProtector.cs (1)
40throw new InvalidOperationException("Malformed data.");
IdentityBuilder.cs (6)
148throw new InvalidOperationException(Resources.FormatInvalidManagerType(provider.Name, "IUserTwoFactorTokenProvider", UserType.Name)); 180throw new InvalidOperationException(Resources.FormatInvalidManagerType(customType.Name, "UserManager", UserType.Name)); 214throw new InvalidOperationException(Resources.NoRoleType); 245throw new InvalidOperationException(Resources.NoRoleType); 260throw new InvalidOperationException(Resources.NoRoleType); 266throw new InvalidOperationException(Resources.FormatInvalidManagerType(customType.Name, "RoleManager", RoleType.Name));
PasswordHasher.cs (2)
60throw new InvalidOperationException(Resources.InvalidPasswordHasherIterationCount); 65throw new InvalidOperationException(Resources.InvalidPasswordHasherCompatibilityMode);
UserManager.cs (4)
126throw new InvalidOperationException(Resources.StoreNotIProtectedUserStore); 130throw new InvalidOperationException(Resources.NoPersonalDataProtector); 828throw new InvalidOperationException(Resources.NullSecurityStamp); 2306throw new InvalidOperationException(Resources.NullSecurityStamp);
Microsoft.Extensions.Logging (1)
LoggerRuleSelector.cs (1)
58throw new InvalidOperationException(SR.MoreThanOneWildcard);
Microsoft.Extensions.Logging.Configuration (1)
LoggerFilterConfigureOptions.cs (1)
85throw new InvalidOperationException(SR.Format(SR.ValueNotSupported, value));
Microsoft.Extensions.Logging.Console (2)
ConfigurationConsoleLoggerSettings.cs (2)
55throw new InvalidOperationException(message); 99throw new InvalidOperationException(message);
Microsoft.Extensions.Logging.Generators (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
184_ => throw new InvalidOperationException("Unreachable"),
Microsoft.Extensions.ObjectPool.Microbenchmark (1)
src\Shared\BenchmarkRunner\AspNetCoreBenchmarkAttribute.cs (1)
53throw new InvalidOperationException(message);
Microsoft.Extensions.Options (1)
OptionsServiceCollectionExtensions.cs (1)
199throw new InvalidOperationException(
Microsoft.Extensions.Options.SourceGeneration (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
184_ => throw new InvalidOperationException("Unreachable"),
Microsoft.Extensions.Primitives (3)
ChangeToken.cs (1)
139throw new InvalidOperationException("Somebody else set the _disposable field");
ThrowHelper.cs (2)
33throw new InvalidOperationException(GetResourceText(resource)); 41throw new InvalidOperationException(message);
Microsoft.Extensions.SecretManager.Tools.Tests (2)
src\Tools\Shared\TestHelpers\TemporaryCSharpProject.cs (1)
117throw new InvalidOperationException("Can add project reference to self");
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (1)
71throw new InvalidOperationException("This is the root directory");
Microsoft.Interop.ComInterfaceGenerator (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
184_ => throw new InvalidOperationException("Unreachable"),
Microsoft.Interop.LibraryImportGenerator (2)
Analyzers\NativeMarshallingAttributeAnalyzer.cs (1)
173_ => throw new InvalidOperationException()
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
184_ => throw new InvalidOperationException("Unreachable"),
Microsoft.Interop.SourceGeneration (12)
DiagnosticOr.cs (2)
39public override T Value => throw new InvalidOperationException(); 50public override ImmutableArray<DiagnosticInfo> Diagnostics => throw new InvalidOperationException();
GeneratorDiagnosticsBag.cs (1)
101throw new InvalidOperationException();
IncrementalValuesProviderExtensions.cs (1)
21throw new InvalidOperationException("The two value providers must provide the same number of values.");
ManualTypeMarshallingHelper.cs (1)
55throw new InvalidOperationException();
Marshalling\MarshallerHelpers.cs (1)
176throw new InvalidOperationException(SR.GraphHasCycles);
Marshalling\MarshallingGeneratorExtensions.cs (3)
27_ => throw new InvalidOperationException() 101_ => throw new InvalidOperationException() 150_ => throw new InvalidOperationException()
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
184_ => throw new InvalidOperationException("Unreachable"),
StringMarshallingInfoProvider.cs (1)
64_ => throw new InvalidOperationException()
StubCodeContext.cs (1)
159throw new InvalidOperationException("Stub contexts should not be bidirectional");
Microsoft.JSInterop (4)
Infrastructure\DotNetDispatcher.cs (3)
243throw new InvalidOperationException($"In call to '{methodIdentifier}', parameter of type '{parameterType.Name}' at index {(index + 1)} must be declared as type 'DotNetObjectRef<{parameterType.Name}>' to receive the incoming value."); 415throw new InvalidOperationException($"The type {type.Name} contains more than one " + 451throw new InvalidOperationException($"The assembly '{assemblyKey.AssemblyName}' contains more than one " +
JSRuntime.cs (1)
313throw new InvalidOperationException($"{dotNetObjectReference.GetType().Name} is already being tracked by a different instance of {nameof(JSRuntime)}." +
Microsoft.JSInterop.Tests (1)
Infrastructure\DotNetDispatcherTest.cs (1)
887=> throw new InvalidOperationException("Shouldn't be called");
Microsoft.Net.Http.Headers (1)
HeaderUtilities.cs (1)
736throw new InvalidOperationException("The object cannot be modified because it is read-only.");
Microsoft.NET.Sdk.WebAssembly.Pack.Tasks (3)
ComputeWasmPublishAssets.cs (3)
414throw new InvalidOperationException(message); 513throw new InvalidOperationException("Related asset not found."); 531_ => throw new InvalidOperationException("Invalid asset role"),
Microsoft.NET.StringTools (2)
InternableString.cs (1)
275throw new InvalidOperationException($"Length of {Length} does not match the sum of span lengths of {destPtr - resultPtr}.");
WeakStringCacheInterner.cs (1)
88throw new InvalidOperationException(String.Format("Interned string {0} should have been {1}", internedString, expectedString));
Microsoft.NET.StringTools.net35 (1)
WeakStringCacheInterner.cs (1)
88throw new InvalidOperationException(String.Format("Interned string {0} should have been {1}", internedString, expectedString));
Microsoft.NET.WebAssembly.Webcil (9)
WebcilConverter.cs (3)
289throw new InvalidOperationException("relative virtual address not in any section"); 303throw new InvalidOperationException($"file offset not in any section (Webcil) for {InputPath}"); 316throw new InvalidOperationException($"file offset {fileOffset.Position} not in any section (PE) for {InputPath}");
WebcilReader.Reflection.cs (3)
27throw new InvalidOperationException("Could not find BlobReader.ReadUtf8NullTerminated"); 46throw new InvalidOperationException("Could not find CodeViewDebugDirectoryData constructor"); 59throw new InvalidOperationException("Could not find PdbChecksumDebugDirectoryData constructor");
WebcilWasmWrapper.cs (3)
47throw new InvalidOperationException("webcil payload too large"); 168throw new InvalidOperationException ("adding padding would cause data section's encoded length to chane"); // TODO: fixme: there's upto one extra byte to encode the section length - take away a padding byte. 177throw new InvalidOperationException ("padding would cause segment 0 to need a multi-byte ULEB128 size encoding");
Microsoft.VisualBasic.Core (2)
Microsoft\VisualBasic\CompilerServices\ExceptionUtils.vb (1)
221Return New InvalidOperationException(Description)
Microsoft\VisualBasic\CompilerServices\Utils.LateBinder.vb (1)
528Throw New InvalidOperationException()
Microsoft.Web.Xdt.Extensions (1)
InsertOrAppendAttribute.cs (1)
103throw new InvalidOperationException("No target attribute to append");
MobileBuildTasks (1)
Android\Ndk\NdkVersion.cs (1)
32throw new InvalidOperationException ($"Failed to parse '{ver}' as a valid NDK version.");
MonoAOTCompiler (2)
src\tasks\Common\FileCache.cs (2)
46throw new InvalidOperationException("Cache is not enabled. Make sure the cache file path is set"); 55throw new InvalidOperationException("Cache is not enabled. Make sure the cache file path is set");
MSBuild (7)
CommunicationsUtilities.cs (2)
498throw new InvalidOperationException(); 560throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Client: rejected old host. Received byte {0} instead of {1}.", bytes[0], byteToAccept));
ErrorUtilities.cs (1)
247throw new InvalidOperationException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, args));
InterningBinaryReader.cs (1)
66throw new InvalidOperationException();
MSBuildClientApp.cs (1)
118CurrentHost = currentProcess.MainModule?.FileName ?? throw new InvalidOperationException("Failed to retrieve process executable.");
TerminalLogger\Terminal.cs (2)
96throw new InvalidOperationException(); 106throw new InvalidOperationException();
MSBuildTaskHost (4)
CommunicationsUtilities.cs (2)
498throw new InvalidOperationException(); 560throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Client: rejected old host. Received byte {0} instead of {1}.", bytes[0], byteToAccept));
D\a\_work\1\s\bin\repo\msbuild\src\Shared\ErrorUtilities.cs\ErrorUtilities.cs (1)
247throw new InvalidOperationException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, args));
InterningBinaryReader.cs (1)
66throw new InvalidOperationException();
Mvc.RoutingWebSite (2)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
20throw new InvalidOperationException("ActionContext should not be null here.");
StartupForDynamicOrder.cs (1)
70throw new InvalidOperationException("Invalid scenario configuration.");
PresentationBuildTasks (26)
Microsoft\Build\Tasks\Windows\UidManager.cs (2)
1300throw new InvalidOperationException(); 1310throw new InvalidOperationException();
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlRecords.cs (1)
782throw new InvalidOperationException(SR.ParserMultiBamls);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlParseException.cs (1)
476throw new InvalidOperationException(message);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (5)
4365throw new InvalidOperationException(SR.Format(SR.ParserCanOnlyHaveOneChild, 6036throw new InvalidOperationException(SR.Format(SR.ParserAbandonedTypeConverterText,_typeConverterTextWrittenAndNotProcessed)); 6052throw new InvalidOperationException(SR.Format(SR.ParserTypeConverterTextUnusable,initializationText)); 6178throw new InvalidOperationException(SR.Format(SR.ParserTypeConverterTextNeedsEndElement, _typeConverterTextWrittenAndNotProcessed)); 6632throw new InvalidOperationException(SR.Format(SR.ParserCanOnlyHaveOneChild,
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlSerializer.cs (3)
66throw new InvalidOperationException(SR.InvalidDeSerialize); 108throw new InvalidOperationException(SR.InvalidCustomSerialize); 119throw new InvalidOperationException(SR.InvalidCustomSerialize);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XmlnsCache.cs (1)
403throw new InvalidOperationException(SR.Format(SR.ParserCompatDuplicate, oldXmlns,
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XmlnsDictionary.cs (1)
599throw new InvalidOperationException(SR.ParserDictionarySealed);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\TokenizerHelper.cs (8)
126throw new System.InvalidOperationException(SR.Format(SR.TokenizerHelperExtraDataEncountered, _charIndex, _str)); 147throw new System.InvalidOperationException(SR.Format(SR.TokenizerHelperPrematureStringTermination, _str)); 161throw new System.InvalidOperationException(SR.Format(SR.TokenizerHelperPrematureStringTermination, _str)); 253throw new System.InvalidOperationException(SR.Format(SR.TokenizerHelperMissingEndQuote, _str)); 264throw new System.InvalidOperationException(SR.Format(SR.TokenizerHelperEmptyToken, _charIndex, _str)); 284throw new System.InvalidOperationException(SR.Format(SR.TokenizerHelperExtraDataEncountered, _charIndex, _str)); 302throw new System.InvalidOperationException(SR.Format(SR.TokenizerHelperEmptyToken, _charIndex, _str)); 321throw new System.InvalidOperationException(SR.Format(SR.TokenizerHelperEmptyToken, _charIndex, _str));
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Xaml\Parser\SpecialBracketCharacters.cs (4)
53throw new InvalidOperationException(); 78throw new InvalidOperationException("Opening bracket character cannot be the same as closing bracket character."); 82throw new InvalidOperationException("Bracket characters cannot be alpha-numeric or whitespace."); 86throw new InvalidOperationException("Bracket characters cannot be one of the following: '=' , ',', '\'', '\"', '{ ', ' }', '\\'");
PresentationCore (518)
MS\Internal\Automation\ElementUtil.cs (1)
243throw new InvalidOperationException(SR.AutomationDispatcherShutdown);
MS\Internal\Automation\SynchronizedInputAdaptor.cs (3)
57throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 67throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 75throw new InvalidOperationException(SR.Automation_RecursivePublicCall);
MS\Internal\FontCache\FamilyCollection.cs (1)
564throw new InvalidOperationException();
MS\Internal\Ink\ExtendedProperty.cs (1)
216throw new InvalidOperationException(SR.InvalidDataTypeForExtendedProperty);
MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (3)
73throw new InvalidOperationException(SR.UnspecifiedGestureConstructionException); 125throw new InvalidOperationException(SR.UnspecifiedSetEnabledGesturesException); 200throw new InvalidOperationException(SR.UnspecifiedGestureException);
MS\Internal\Ink\InkSerializedFormat\Compress.cs (3)
103throw new InvalidOperationException(StrokeCollectionSerializer.ISFDebugMessage(SR.DecompressPacketDataFailed)); 172throw new InvalidOperationException(StrokeCollectionSerializer.ISFDebugMessage(SR.DecompressPropertyFailed)); 302throw new InvalidOperationException(SR.IsfOperationFailed);
MS\Internal\Ink\InkSerializedFormat\CustomAttributeSerializer.cs (3)
307throw new InvalidOperationException(SR.InvalidEpInIsf); 428throw new InvalidOperationException(SR.EmptyDataToLoad); 703throw new InvalidOperationException(SR.InvalidEpInIsf);
MS\Internal\Ink\InkSerializedFormat\DrawingAttributeSerializer.cs (3)
188throw new InvalidOperationException(StrokeCollectionSerializer. ISFDebugMessage("ROP data size was not found")); 543throw new InvalidOperationException(StrokeCollectionSerializer.ISFDebugMessage("ROP data size was not found")); 552throw new InvalidOperationException(StrokeCollectionSerializer.ISFDebugMessage("ROP data was incorrectly serialized"));
MS\Internal\Ink\InkSerializedFormat\GorillaCodec.cs (1)
400throw new InvalidOperationException(StrokeCollectionSerializer.ISFDebugMessage("Transform returned unexpected results"));
MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (19)
339throw new InvalidOperationException(ISFDebugMessage("ISF decoder cannot operate on non-empty ink container")); 675throw new InvalidOperationException(ISFDebugMessage("Invalid ISF tag logic")); 1757throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1776throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1789throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1801throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1810throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1819throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1828throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1839throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1849throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1870throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1911throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1925throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1939throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1953throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1969throw new InvalidOperationException(ISFDebugMessage("Encoded stroke size != reported size")); 1987throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size")); 1990throw new InvalidOperationException(ISFDebugMessage("Calculated ISF stream size != actual stream size"));
MS\Internal\Ink\InkSerializedFormat\StrokeSerializer.cs (1)
328throw new InvalidOperationException(StrokeCollectionSerializer.ISFDebugMessage("ExtendedProperty decoded totalBytesInStrokeBlockOfIsfStream exceeded ISF stream totalBytesInStrokeBlockOfIsfStream"));
MS\Internal\Ink\Renderer.cs (2)
299throw new System.InvalidOperationException(SR.CannotAttachVisualTwice); 335throw new System.InvalidOperationException(SR.VisualCannotBeDetached);
MS\Internal\IO\Packaging\ByteRangeDownloader.cs (3)
308throw new InvalidOperationException(SR.RequestAlreadyStarted); 339throw new InvalidOperationException(SR.RequestAlreadyStarted); 433throw new InvalidOperationException(SR.ByteRangeDownloaderErroredOut, _erroredOutException);
MS\Internal\IO\Packaging\DeobfuscatingStream.cs (1)
206throw new InvalidOperationException(SR.InvalidPartName);
MS\Internal\Media\VisualTreeUtils.cs (1)
260throw new System.InvalidOperationException(SR.Format(SR.Visual_NotAVisual, element.GetType()));
MS\Internal\Text\TextInterface\DWriteLoader.cs (1)
25throw new InvalidOperationException();
MS\Internal\TextFormatting\TextFormatterImp.cs (1)
573throw new InvalidOperationException(SR.TextFormatterReentranceProhibited);
MS\Win32\UnsafeNativeMethodsPenimc.cs (5)
115throw new InvalidOperationException(SR.Format(SR.PenImcSxSRegistrationFailed, ExternDll.Penimc)); 184throw new InvalidOperationException(); 200throw new InvalidOperationException(); 319throw new InvalidOperationException(); 356throw new InvalidOperationException();
src\Microsoft.DotNet.Wpf\src\Common\Graphics\wgx_render.cs (7)
806return new System.InvalidOperationException(SR.Image_WrongState, exceptionForHR); 819return new System.InvalidOperationException(SR.WIC_NotInitialized, exceptionForHR); 831return new System.InvalidOperationException(SR.Image_CodecPresent, exceptionForHR); 837return new System.InvalidOperationException(SR.Image_NoPalette, exceptionForHR); 843return new System.InvalidOperationException(SR.Image_InternalError, exceptionForHR); 869return new System.InvalidOperationException(SR.Image_StreamWrite, exceptionForHR); 917return new System.InvalidOperationException(SR.Image_DisplayStateInvalid, exceptionForHR);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\GenericEnumerator.cs (3)
61throw new InvalidOperationException(SR.Enumerator_VerifyContext); 92throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 120throw new InvalidOperationException(SR.Enumerator_CollectionChanged);
src\Microsoft.DotNet.Wpf\src\Shared\Telemetry\Managed\EventSourceActivity.cs (3)
318throw new InvalidOperationException(); 331throw new InvalidOperationException(); 341throw new InvalidOperationException();
System\IO\Packaging\PackageStore.cs (1)
116throw new InvalidOperationException(SR.PackageAlreadyExists);
System\IO\Packaging\PackWebRequest.cs (1)
171throw new InvalidOperationException(SR.SchemaInvalidForTransport);
System\Windows\Automation\Peers\AutomationPeer.cs (30)
755throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 773throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 793throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 813throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 833throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 851throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 871throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 891throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 910throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 928throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 948throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 968throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 986throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1006throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1026throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1046throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1070throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1095throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1115throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1135throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1155throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1175throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1200throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1218throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1242throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1294throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1322throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1392throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1420throw new InvalidOperationException(SR.Automation_RecursivePublicCall); 1444throw new InvalidOperationException(SR.Automation_RecursivePublicCall);
System\Windows\Automation\Peers\ContentElementAutomationPeer.cs (1)
312throw new InvalidOperationException(SR.SetFocusFailed);
System\Windows\Automation\Peers\UIElement3DAutomationPeer.cs (1)
418throw new InvalidOperationException(SR.SetFocusFailed);
System\Windows\Automation\Peers\UIElementAutomationPeer.cs (1)
530throw new InvalidOperationException(SR.SetFocusFailed);
System\Windows\CoreCompatibilityPreferences.cs (3)
70throw new InvalidOperationException(SR.Format(SR.CompatibilityPreferencesSealed, "IsAltKeyRequiredInAccessKeyDefaultScope", "CoreCompatibilityPreferences")); 110throw new InvalidOperationException(SR.Format(SR.CompatibilityPreferencesSealed, "IncludeAllInkInBoundingBox", "CoreCompatibilityPreferences")); 151throw new InvalidOperationException(SR.Format(SR.CompatibilityPreferencesSealed, "DisableMultimonDisplayClipping", "CoreCompatibilityPreferences"));
System\Windows\dataobject.cs (1)
2674throw new InvalidOperationException(SR.DataObject_CannotSetDataOnAFozenOLEDataDbject);
System\Windows\Diagnostics\VisualDiagnostics.cs (2)
219throw new InvalidOperationException(SR.Format(SR.ReentrantVisualTreeChangeError, nameof(VisualTreeChanged))); 260throw new InvalidOperationException(SR.Format(SR.MethodCallNotAllowed, nameof(VisualDiagnostics.EnableVisualTreeChanged)));
System\Windows\Duration.cs (1)
406throw new InvalidOperationException(SR.Format(SR.Timing_NotTimeSpan, this));
System\Windows\FreezableCollection.cs (7)
782throw new InvalidOperationException(SR.Freezable_UnexpectedChange); 854throw new InvalidOperationException(SR.Format(SR.Freezable_CloneInvalidType, typeof(T).Name)); 961throw new InvalidOperationException(SR.Freezable_Reentrant); 1050throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 1068throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 1102throw new InvalidOperationException(SR.Enumerator_NotStarted); 1107throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Generated\ContentElement.cs (2)
99throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); 166throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType()));
System\Windows\Generated\TextDecorationCollection.cs (4)
796throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 814throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 848throw new InvalidOperationException(SR.Enumerator_NotStarted); 853throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Generated\UIElement.cs (2)
99throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); 166throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType()));
System\Windows\GlobalEventManager.cs (1)
440throw new InvalidOperationException(SR.TooManyRoutedEvents);
System\Windows\Ink\GestureRecognizer.cs (1)
267throw new InvalidOperationException(SR.GestureRecognizerNotAvailable);
System\Windows\Ink\IncrementalHitTester.cs (2)
56throw new System.InvalidOperationException(SR.EndHitTestingCalled); 79throw new System.InvalidOperationException(SR.EndHitTestingCalled);
System\Windows\Input\Command\RoutedCommand.cs (2)
134throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, target.GetType())); 170throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, target.GetType()));
System\Windows\Input\FocusChangedEventArgs.cs (2)
35throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldFocus.GetType())); 38throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, newFocus.GetType()));
System\Windows\Input\InputLanguageManager.cs (1)
473throw new InvalidOperationException(SR.InputLanguageManager_NotReadyToChangeCurrentLanguage);
System\Windows\Input\InputManager.cs (2)
156throw new InvalidOperationException(SR.RequiresSTA); 367throw new InvalidOperationException();
System\Windows\Input\KeyboardDevice.cs (3)
147throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, element.GetType())); 442throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, o.GetType())); 468throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, o.GetType()));
System\Windows\Input\Manipulation.cs (7)
80throw new InvalidOperationException(SR.Manipulation_ManipulationNotActive); 112throw new InvalidOperationException(SR.Manipulation_ManipulationNotActive); 153throw new InvalidOperationException(SR.Manipulation_ManipulationNotActive); 192throw new InvalidOperationException(SR.Manipulation_ManipulationNotActive); 226throw new InvalidOperationException(SR.Manipulation_ManipulationNotEnabled); 246throw new InvalidOperationException(SR.Manipulation_ManipulationNotActive); 280throw new InvalidOperationException(SR.Manipulation_ManipulationNotActive);
System\Windows\Input\MouseDevice.cs (2)
334throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, eltDO.GetType())); 584throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, relativeTo.GetType()));
System\Windows\Input\ProcessInputEventArgs.cs (4)
57throw new InvalidOperationException(SR.NotAllowedToAccessStagingArea); 77throw new InvalidOperationException(SR.NotAllowedToAccessStagingArea); 95throw new InvalidOperationException(SR.NotAllowedToAccessStagingArea); 113throw new InvalidOperationException(SR.NotAllowedToAccessStagingArea);
System\Windows\Input\Stylus\Common\RawStylusInput.cs (1)
129throw new InvalidOperationException(SR.Stylus_CanOnlyCallForDownMoveOrUp);
System\Windows\Input\Stylus\Common\StylusPointCollection.cs (2)
261throw new InvalidOperationException(SR.InvalidStylusPointCollectionZeroCount); 278throw new InvalidOperationException(SR.InvalidStylusPointCollectionZeroCount);
System\Windows\Input\Stylus\Common\StylusPointDescription.cs (1)
255throw new InvalidOperationException();
System\Windows\Input\Stylus\Pointer\PointerLogic.cs (5)
551throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldCapture.GetType())); 577throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusCapture.GetType())); 642throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldOver.GetType())); 671throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusOver.GetType())); 807throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusCapture.GetType()));
System\Windows\Input\Stylus\Pointer\PointerStylusDevice.cs (2)
577throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, doStylusCapture.GetType())); 732throw new InvalidOperationException();
System\Windows\Input\Stylus\Wisp\PenContexts.cs (1)
41throw new InvalidOperationException(SR.Stylus_PenContextFailure);
System\Windows\Input\Stylus\Wisp\PenThreadWorker.cs (1)
794throw new InvalidOperationException(SR.PenService_InvalidPacketData);
System\Windows\Input\Stylus\Wisp\WispLogic.cs (8)
2084throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldCapture.GetType())); 2113throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusCapture.GetType())); 2172throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldOver.GetType())); 2201throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusOver.GetType())); 2441throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusCapture.GetType())); 3012InvalidOperationException ioe = new InvalidOperationException(); 3144throw new InvalidOperationException(SR.PenService_WindowAlreadyRegistered); 3213throw new InvalidOperationException(SR.PenService_WindowNotRegistered);
System\Windows\Input\Stylus\Wisp\WispStylusDevice.cs (2)
279throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, doStylusCapture.GetType())); 1194throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, relativeTo.GetType()));
System\Windows\Input\TouchDevice.cs (2)
707throw new InvalidOperationException(SR.Touch_DeviceAlreadyActivated); 732throw new InvalidOperationException(SR.Touch_DeviceNotActivated);
System\Windows\InterOp\D3DImage.cs (5)
142throw new InvalidOperationException(SR.Image_MustBeLocked); 271throw new InvalidOperationException(SR.Image_MustBeLocked); 306throw new InvalidOperationException(SR.Image_MustBeLocked); 311throw new InvalidOperationException(SR.D3DImage_MustHaveBackBuffer); 600throw new InvalidOperationException(SR.Image_LockCountLimit);
System\Windows\InterOp\HwndSource.cs (1)
2259throw new InvalidOperationException(SR.KeyboardSinkNotAChild);
System\Windows\InterOp\HwndSourceParameters.cs (1)
305throw new InvalidOperationException(SR.UsesPerPixelOpacityIsObsolete);
System\Windows\InterOp\HwndTarget.cs (2)
557throw new InvalidOperationException( 598throw new InvalidOperationException(SR.HwndTarget_HardwareNotSupportDueToProtocolMismatch);
System\Windows\LayoutManager.cs (3)
66throw new InvalidOperationException(); 149throw new InvalidOperationException(SR.Format(SR.LayoutManager_DeepRecursion, s_LayoutRecursionLimit)); 166throw new InvalidOperationException(SR.Format(SR.LayoutManager_DeepRecursion, s_LayoutRecursionLimit));
System\Windows\Markup\XamlSerializerUtil.cs (1)
40throw new InvalidOperationException();
System\Windows\Markup\XmlLanguage.cs (5)
205throw new InvalidOperationException(SR.Format(SR.XmlLangGetCultureFailure, lowerCaseTag), e); 241throw new InvalidOperationException(SR.Format(SR.XmlLangGetSpecificCulture, _lowerCaseTag)); 258throw new InvalidOperationException(SR.Format(SR.XmlLangGetSpecificCulture, _lowerCaseTag), e); 528throw new InvalidOperationException(SR.Enumerator_NotStarted); 532throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Animation\AnimationStorage.cs (3)
346throw new InvalidOperationException( 995throw new InvalidOperationException(SR.Format( 1021throw new InvalidOperationException(
System\Windows\Media\Animation\Clock.cs (4)
596throw new InvalidOperationException( 640throw new System.InvalidOperationException(SR.Timing_SlipBehavior_SyncOnlyWithSimpleParents); 983throw new InvalidOperationException(SR.Timing_SkipToFillDestinationIndefinite); 3238throw new InvalidOperationException(SR.Timing_SeekDestinationAmbiguousDueToSlip);
System\Windows\Media\Animation\ClockController.cs (4)
181throw new InvalidOperationException(SR.Timing_SeekDestinationIndefinite); 193throw new InvalidOperationException(SR.Timing_SeekDestinationNegative); 223throw new InvalidOperationException(SR.Timing_SeekDestinationIndefinite); 235throw new InvalidOperationException(SR.Timing_SeekDestinationNegative);
System\Windows\Media\Animation\Generated\Animatable.cs (2)
105throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); 172throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType()));
System\Windows\Media\Animation\Generated\BooleanAnimationUsingKeyFrames.cs (1)
288throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\ByteAnimation.cs (2)
324throw new InvalidOperationException( 335throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\ByteAnimationUsingKeyFrames.cs (1)
288throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\CharAnimationUsingKeyFrames.cs (1)
288throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\ColorAnimation.cs (2)
324throw new InvalidOperationException( 335throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\ColorAnimationUsingKeyFrames.cs (1)
288throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\DecimalAnimation.cs (2)
324throw new InvalidOperationException( 335throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\DecimalAnimationUsingKeyFrames.cs (1)
288throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\DoubleAnimation.cs (2)
324throw new InvalidOperationException( 335throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\DoubleAnimationUsingKeyFrames.cs (1)
288throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\Int16Animation.cs (2)
324throw new InvalidOperationException( 335throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\Int16AnimationUsingKeyFrames.cs (1)
288throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\Int32Animation.cs (2)
324throw new InvalidOperationException( 335throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\Int32AnimationUsingKeyFrames.cs (1)
288throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\Int64Animation.cs (2)
324throw new InvalidOperationException( 335throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\Int64AnimationUsingKeyFrames.cs (1)
288throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\MatrixAnimationUsingKeyFrames.cs (1)
288throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\ObjectAnimationUsingKeyFrames.cs (1)
288throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\Point3DAnimation.cs (2)
324throw new InvalidOperationException( 335throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\Point3DAnimationUsingKeyFrames.cs (1)
288throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\PointAnimation.cs (2)
324throw new InvalidOperationException( 335throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\PointAnimationUsingKeyFrames.cs (1)
288throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\QuaternionAnimation.cs (2)
324throw new InvalidOperationException( 335throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\QuaternionAnimationUsingKeyFrames.cs (1)
288throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\RectAnimation.cs (2)
324throw new InvalidOperationException( 335throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\RectAnimationUsingKeyFrames.cs (1)
288throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\Rotation3DAnimation.cs (2)
324throw new InvalidOperationException( 335throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\Rotation3DAnimationUsingKeyFrames.cs (1)
288throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\SingleAnimation.cs (2)
324throw new InvalidOperationException( 335throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\SingleAnimationUsingKeyFrames.cs (1)
288throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\SizeAnimation.cs (2)
324throw new InvalidOperationException( 335throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\SizeAnimationUsingKeyFrames.cs (1)
288throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\StringAnimationUsingKeyFrames.cs (1)
288throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\TimelineCollection.cs (4)
815throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 833throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 867throw new InvalidOperationException(SR.Enumerator_NotStarted); 872throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Animation\Generated\Vector3DAnimation.cs (2)
324throw new InvalidOperationException( 335throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\Vector3DAnimationUsingKeyFrames.cs (1)
288throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\Generated\VectorAnimation.cs (2)
324throw new InvalidOperationException( 335throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\VectorAnimationUsingKeyFrames.cs (1)
288throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\KeyTime.cs (2)
251throw new InvalidOperationException(); 273throw new InvalidOperationException();
System\Windows\Media\Animation\RepeatBehavior.cs (2)
135throw new InvalidOperationException(SR.Format(SR.Timing_RepeatBehaviorNotIterationCount, this)); 154throw new InvalidOperationException(SR.Format(SR.Timing_RepeatBehaviorNotRepeatDuration, this));
System\Windows\Media\Animation\Timeline.cs (1)
731throw new InvalidOperationException(SR.Timing_AccelAndDecelGreaterThanOne);
System\Windows\Media\Animation\TimelineClockCollection.cs (2)
360throw new InvalidOperationException(SR.Timing_EnumeratorOutOfRange); 402throw new InvalidOperationException(SR.Timing_EnumeratorInvalidated);
System\Windows\Media\Animation\TimelineGroup.cs (1)
210throw new InvalidOperationException(SR.Timing_NoTextChildren);
System\Windows\Media\BitmapCacheBrush.cs (3)
368throw new InvalidOperationException(SR.BitmapCacheBrush_OpacityChanged); 377throw new InvalidOperationException(SR.BitmapCacheBrush_TransformChanged); 386throw new InvalidOperationException(SR.BitmapCacheBrush_RelativeTransformChanged);
System\Windows\Media\ByteStreamGeometryContext.cs (4)
221throw new InvalidOperationException(SR.StreamGeometry_NeedBeginFigure); 280throw new InvalidOperationException(SR.StreamGeometry_NeedBeginFigure); 643throw new InvalidOperationException(SR.StreamGeometry_NeedBeginFigure); 686throw new InvalidOperationException(SR.StreamGeometry_NeedBeginFigure);
System\Windows\Media\CharacterMetricsDictionary.cs (1)
594throw new InvalidOperationException(SR.Enumerator_VerifyContext);
System\Windows\Media\Color.cs (7)
390throw new InvalidOperationException(SR.Format(SR.Color_NullColorContext, null)); 841throw new InvalidOperationException(SR.Format(SR.Color_ColorContextNotsRGB_or_scRGB, null)); 865throw new InvalidOperationException(SR.Format(SR.Color_ColorContextNotsRGB_or_scRGB, null)); 889throw new InvalidOperationException(SR.Format(SR.Color_ColorContextNotsRGB_or_scRGB, null)); 943throw new InvalidOperationException(SR.Format(SR.Color_ColorContextNotsRGB_or_scRGB, null)); 968throw new InvalidOperationException(SR.Format(SR.Color_ColorContextNotsRGB_or_scRGB, null)); 993throw new InvalidOperationException(SR.Format(SR.Color_ColorContextNotsRGB_or_scRGB, null));
System\Windows\Media\ColorContextHelper.cs (2)
87throw new InvalidOperationException(SR.Image_ColorContextInvalid); 100throw new InvalidOperationException(SR.Image_ColorContextInvalid);
System\Windows\Media\ColorTransformHelper.cs (1)
125throw new InvalidOperationException(SR.Image_ColorTransformInvalid);
System\Windows\Media\CultureSpecificStringDictionary.cs (1)
408throw new InvalidOperationException(SR.Enumerator_VerifyContext);
System\Windows\Media\DrawingDrawingContext.cs (1)
1066throw new InvalidOperationException(SR.DrawingContext_TooManyPops);
System\Windows\Media\DrawingGroup.cs (3)
147throw new InvalidOperationException(SR.DrawingGroup_CannotAppendToNullCollection); 152throw new InvalidOperationException(SR.DrawingGroup_CannotAppendToFrozenCollection); 317throw new InvalidOperationException(SR.DrawingGroup_AlreadyOpen);
System\Windows\Media\Effects\BitmapEffect.cs (2)
48throw new InvalidOperationException(SR.RequiresSTA); 122throw new InvalidOperationException(SR.Format(SR.Effect_No_ContextInputSource, null));
System\Windows\Media\Effects\Generated\BitmapEffectCollection.cs (4)
802throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 820throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 854throw new InvalidOperationException(SR.Enumerator_NotStarted); 859throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Effects\PixelShader.cs (2)
143throw new InvalidOperationException(SR.Effect_ShaderSeekableStream); 150throw new InvalidOperationException(SR.Effect_ShaderBytecodeSize);
System\Windows\Media\Effects\ShaderEffect.cs (3)
206throw new InvalidOperationException(SR.Effect_20ShaderUsing30Registers); 361throw new InvalidOperationException(SR.Format(SR.Effect_ShaderConstantType, dp.PropertyType.Name)); 577throw new InvalidOperationException(SR.Effect_ShaderPixelShaderSet);
System\Windows\Media\FamilyMapCollection.cs (2)
268throw new InvalidOperationException(SR.CompositeFont_TooManyFamilyMaps); 432throw new InvalidOperationException(SR.Enumerator_VerifyContext);
System\Windows\Media\FamilyTypefaceCollection.cs (1)
449throw new InvalidOperationException(SR.Enumerator_VerifyContext);
System\Windows\Media\GeneralTransform.cs (1)
60throw new InvalidOperationException(SR.Format(SR.GeneralTransform_TransformFailed, null));
System\Windows\Media\Generated\DoubleCollection.cs (4)
825throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 843throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 877throw new InvalidOperationException(SR.Enumerator_NotStarted); 882throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Generated\DrawingCollection.cs (4)
845throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 863throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 897throw new InvalidOperationException(SR.Enumerator_NotStarted); 902throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Generated\GeneralTransformCollection.cs (4)
804throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 822throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 856throw new InvalidOperationException(SR.Enumerator_NotStarted); 861throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Generated\GeometryCollection.cs (4)
845throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 863throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 897throw new InvalidOperationException(SR.Enumerator_NotStarted); 902throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Generated\GradientStopCollection.cs (4)
907throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 925throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 959throw new InvalidOperationException(SR.Enumerator_NotStarted); 964throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Generated\Int32Collection.cs (4)
825throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 843throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 877throw new InvalidOperationException(SR.Enumerator_NotStarted); 882throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Generated\PathFigureCollection.cs (4)
894throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 912throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 946throw new InvalidOperationException(SR.Enumerator_NotStarted); 951throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Generated\PathSegmentCollection.cs (4)
804throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 822throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 856throw new InvalidOperationException(SR.Enumerator_NotStarted); 861throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Generated\PointCollection.cs (4)
827throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 845throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 879throw new InvalidOperationException(SR.Enumerator_NotStarted); 884throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Generated\RenderDataDrawingContext.cs (1)
1305throw new InvalidOperationException(SR.DrawingContext_TooManyPops);
System\Windows\Media\Generated\TextEffectCollection.cs (4)
804throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 822throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 856throw new InvalidOperationException(SR.Enumerator_NotStarted); 861throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Generated\TransformCollection.cs (4)
845throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 863throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 897throw new InvalidOperationException(SR.Enumerator_NotStarted); 902throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Generated\VectorCollection.cs (4)
827throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 845throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 879throw new InvalidOperationException(SR.Enumerator_NotStarted); 884throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\GlyphRun.cs (5)
2318throw new InvalidOperationException(SR.OnlyOneInitialization); 2324throw new InvalidOperationException(SR.InInitialization); 2335throw new InvalidOperationException(SR.NotInInitialization); 2371throw new InvalidOperationException(SR.InitializationIncomplete); 2382throw new InvalidOperationException(SR.NotInInitialization);
System\Windows\Media\GlyphTypeface.cs (5)
1660throw new InvalidOperationException(SR.OnlyOneInitialization); 1666throw new InvalidOperationException(SR.InInitialization); 1677throw new InvalidOperationException(SR.NotInInitialization); 1690throw new InvalidOperationException(SR.InitializationIncomplete); 1698throw new InvalidOperationException(SR.NotInInitialization);
System\Windows\Media\HostVisual.cs (1)
162throw new InvalidOperationException(
System\Windows\Media\Imaging\BitmapDecoder.cs (4)
1003throw new System.InvalidOperationException(SR.Image_OriginalStreamReadOnly); 1553throw new System.InvalidOperationException( 1572throw new System.InvalidOperationException( 1580throw new System.InvalidOperationException(
System\Windows\Media\Imaging\BitmapEncoder.cs (6)
153throw new InvalidOperationException(SR.Image_EncoderNoColorContext); 180throw new InvalidOperationException(SR.Image_EncoderNoGlobalThumbnail); 209throw new InvalidOperationException(SR.Image_MetadataNotCompatible); 214throw new InvalidOperationException(SR.Image_EncoderNoGlobalMetadata); 241throw new InvalidOperationException(SR.Image_EncoderNoPreview); 346throw new InvalidOperationException(SR.Image_OnlyOneSave);
System\Windows\Media\Imaging\BitmapImage.cs (1)
93throw new InvalidOperationException(SR.Format(SR.Image_NeitherArgument, "UriSource", "StreamSource"));
System\Windows\Media\Imaging\BitmapInitialize.cs (6)
42throw new InvalidOperationException(SR.Format(SR.Image_OnlyOneInit, null)); 45throw new InvalidOperationException(SR.Format(SR.Image_InInitialize, null)); 53throw new InvalidOperationException(SR.Format(SR.Image_EndInitWithoutBeginInit, null)); 63throw new InvalidOperationException(SR.Format(SR.Image_SetPropertyOutsideBeginEndInit, null)); 86throw new InvalidOperationException(SR.Format(SR.Image_InitializationIncomplete, null)); 89throw new InvalidOperationException(SR.Format(SR.Image_NotInitialized, null));
System\Windows\Media\Imaging\BitmapMetadata.cs (3)
1039throw new System.InvalidOperationException(SR.Image_MetadataReadOnly); 1161throw new System.InvalidOperationException(SR.Image_MetadataReadOnly); 1530throw new System.InvalidOperationException(SR.Image_MetadataInitializationIncomplete);
System\Windows\Media\Imaging\BitmapMetadataEnumerator.cs (2)
140throw new InvalidOperationException(SR.Enumerator_NotStarted); 145throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media\Imaging\BitmapPalette.cs (2)
54throw new InvalidOperationException(SR.Format(SR.Image_PaletteZeroColors, null)); 323throw new InvalidOperationException(SR.Format(SR.Image_PaletteZeroColors, null));
System\Windows\Media\Imaging\CachedBitmap.cs (1)
412throw new InvalidOperationException(SR.Image_IndexedPixelFormatRequiresPalette);
System\Windows\Media\Imaging\ColorConvertedBitmap.cs (3)
158throw new InvalidOperationException(SR.Format(SR.Image_NoArgument, "Source")); 167throw new InvalidOperationException(SR.Color_NullColorContext); 176throw new InvalidOperationException(SR.Format(SR.Image_NoArgument, "DestinationColorContext"));
System\Windows\Media\Imaging\CroppedBitmap.cs (1)
177throw new InvalidOperationException(SR.Format(SR.Image_NoArgument, "Source"));
System\Windows\Media\Imaging\FormatConvertedBitmap.cs (3)
192throw new InvalidOperationException(SR.Format(SR.Image_NoArgument, "Source")); 202throw new InvalidOperationException(SR.Image_IndexedPixelFormatRequiresPalette); 210throw new InvalidOperationException(SR.Image_PaletteColorsDoNotMatchFormat);
System\Windows\Media\Imaging\InplaceBitmapMetadataWriter.cs (5)
149throw new InvalidOperationException(SR.Image_InplaceMetadataNoCopy); 157throw new InvalidOperationException(SR.Image_InplaceMetadataNoCopy); 165throw new InvalidOperationException(SR.Image_InplaceMetadataNoCopy); 173throw new InvalidOperationException(SR.Image_InplaceMetadataNoCopy); 181throw new InvalidOperationException(SR.Image_InplaceMetadataNoCopy);
System\Windows\Media\Imaging\PropVariant.cs (3)
127throw new InvalidOperationException(SR.Image_InsufficientBufferSize); 337throw new System.InvalidOperationException(SR.Image_PropertyNotSupported); 448throw new System.InvalidOperationException(SR.Image_PropertyNotSupported);
System\Windows\Media\Imaging\TransformedBitmap.cs (5)
56throw new InvalidOperationException(SR.Format(SR.Image_NoArgument, "Transform")); 61throw new InvalidOperationException(SR.Image_OnlyOrthogonal); 297throw new InvalidOperationException(SR.Format(SR.Image_NoArgument, "Source")); 307throw new InvalidOperationException(SR.Format(SR.Image_NoArgument, "Transform")); 316throw new InvalidOperationException(SR.Image_OnlyOrthogonal);
System\Windows\Media\Imaging\WriteableBitmap.cs (4)
89throw new InvalidOperationException(SR.Image_IndexedPixelFormatRequiresPalette); 178throw new InvalidOperationException(SR.Image_MustBeLocked); 261throw new InvalidOperationException(SR.Image_LockCountLimit); 325throw new InvalidOperationException(SR.Image_MustBeLocked);
System\Windows\Media\MediaContext.cs (5)
429throw new InvalidOperationException(SR.MediaContext_NoBadShaderHandler); 454throw new System.InvalidOperationException(SR.MediaContext_RenderThreadError); 1823throw new InvalidOperationException(SR.MediaContext_InfiniteTickLoop); 1962throw new InvalidOperationException(SR.MediaContext_InfiniteLayoutLoop); 2335throw new InvalidOperationException(SR.MediaContext_APINotAllowed);
System\Windows\Media\MediaPlayerState.cs (1)
1010throw new InvalidOperationException(SR.Media_NotAllowedWhileTimingEngineInControl);
System\Windows\Media\MediaSystem.cs (1)
202throw new System.InvalidOperationException(SR.MediaSystem_OutOfOrderConnectOrDisconnect);
System\Windows\Media\MediaTimeline.cs (2)
141throw new InvalidOperationException(SR.Media_UriNotSpecified); 262throw new InvalidOperationException(SR.Media_UriNotSpecified);
System\Windows\Media\PathFigure.cs (1)
94throw new InvalidOperationException(SR.PathGeometry_InternalReadBackError);
System\Windows\Media\PathGeometry.cs (5)
312throw new System.InvalidOperationException(); 314throw new System.InvalidOperationException(); 484throw new System.InvalidOperationException(SR.PathGeometry_InternalReadBackError); 515throw new System.InvalidOperationException(SR.PathGeometry_InternalReadBackError); 548throw new System.InvalidOperationException(SR.PathGeometry_InternalReadBackError);
System\Windows\Media\textformatting\TextParagraphCache.cs (1)
94throw new InvalidOperationException(SR.Format(SR.CreateParaBreakingSessionFailure, lserr), callbackException);
System\Windows\Media\Visual.cs (8)
2756throw new InvalidOperationException(SR.Format(SR.LayoutManager_DeepRecursion, TreeLevelLimit)); 4389throw new System.InvalidOperationException(SR.Visual_NoCommonAncestor); 4598throw new System.InvalidOperationException(inverse ? SR.Visual_NotADescendant : SR.Visual_NotAnAncestor); 4694throw new System.InvalidOperationException(SR.Visual_NotAnAncestor); 4751throw new InvalidOperationException(SR.Visual_NoPresentationSource); 4758throw new InvalidOperationException(SR.Visual_CannotTransformPoint); 4780throw new InvalidOperationException(SR.Visual_NoPresentationSource); 4791throw new InvalidOperationException(SR.Visual_CannotTransformPoint);
System\Windows\Media\VisualCollection.cs (7)
118throw new InvalidOperationException(SR.VisualCollection_ReadOnly); 400throw new InvalidOperationException(SR.CannotModifyVisualChildrenDuringTreeWalk); 440throw new InvalidOperationException(SR.CannotModifyVisualChildrenDuringTreeWalk); 960throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 992throw new InvalidOperationException(SR.Enumerator_NotStarted); 998throw new InvalidOperationException(SR.Enumerator_ReachedEnd); 1016throw new InvalidOperationException(SR.Enumerator_CollectionChanged);
System\Windows\Media\VisualTreeHelper.cs (1)
122throw new InvalidOperationException("UpdateDPI should only be called on the root of a Visual tree");
System\Windows\Media3D\GeneralTransform2DTo3D.cs (1)
110throw new InvalidOperationException(SR.Format(SR.GeneralTransform_TransformFailed, null));
System\Windows\Media3D\GeneralTransform3D.cs (1)
66throw new InvalidOperationException(SR.Format(SR.GeneralTransform_TransformFailed, null));
System\Windows\Media3D\GeneralTransform3DTo2D.cs (1)
73throw new InvalidOperationException(SR.Format(SR.GeneralTransform_TransformFailed, null));
System\Windows\Media3D\Generated\GeneralTransform3DCollection.cs (4)
800throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 818throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 852throw new InvalidOperationException(SR.Enumerator_NotStarted); 857throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media3D\Generated\MaterialCollection.cs (4)
841throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 859throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 893throw new InvalidOperationException(SR.Enumerator_NotStarted); 898throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media3D\Generated\Model3DCollection.cs (4)
841throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 859throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 893throw new InvalidOperationException(SR.Enumerator_NotStarted); 898throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media3D\Generated\Point3DCollection.cs (4)
824throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 842throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 876throw new InvalidOperationException(SR.Enumerator_NotStarted); 881throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media3D\Generated\Transform3DCollection.cs (4)
841throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 859throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 893throw new InvalidOperationException(SR.Enumerator_NotStarted); 898throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media3D\Generated\Vector3DCollection.cs (4)
824throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 842throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 876throw new InvalidOperationException(SR.Enumerator_NotStarted); 881throw new InvalidOperationException(SR.Enumerator_ReachedEnd);
System\Windows\Media3D\Generated\Visual3D.cs (2)
105throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); 172throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType()));
System\Windows\Media3D\Matrix3D.cs (1)
666throw new InvalidOperationException(SR.Format(SR.Matrix3D_NotInvertible, null));
System\Windows\Media3D\ModelVisual3D.cs (1)
109throw new System.InvalidOperationException(SR.Format(SR.AddText_Invalid, this.GetType().Name));
System\Windows\Media3D\Quaternion.cs (1)
92throw new System.InvalidOperationException(SR.Quaternion_ZeroAxisSpecified);
System\Windows\Media3D\Rect3D.cs (9)
164throw new System.InvalidOperationException(SR.Rect3D_CannotModifyEmptyRect); 195throw new System.InvalidOperationException(SR.Rect3D_CannotModifyEmptyRect); 218throw new System.InvalidOperationException(SR.Rect3D_CannotModifyEmptyRect); 243throw new System.InvalidOperationException(SR.Rect3D_CannotModifyEmptyRect); 268throw new System.InvalidOperationException(SR.Rect3D_CannotModifyEmptyRect); 293throw new System.InvalidOperationException(SR.Rect3D_CannotModifyEmptyRect); 313throw new System.InvalidOperationException(SR.Rect3D_CannotModifyEmptyRect); 333throw new System.InvalidOperationException(SR.Rect3D_CannotModifyEmptyRect); 542throw new System.InvalidOperationException(SR.Rect3D_CannotCallMethod);
System\Windows\Media3D\Size3D.cs (3)
97throw new System.InvalidOperationException(SR.Size3D_CannotModifyEmptySize); 122throw new System.InvalidOperationException(SR.Size3D_CannotModifyEmptySize); 148throw new System.InvalidOperationException(SR.Size3D_CannotModifyEmptySize);
System\Windows\Media3D\Viewport3DVisual.cs (2)
336throw new InvalidOperationException(SR.CannotModifyVisualChildrenDuringTreeWalk); 387throw new InvalidOperationException(SR.CannotModifyVisualChildrenDuringTreeWalk);
System\Windows\Media3D\Visual3D.cs (3)
240throw new InvalidOperationException(SR.CannotModifyVisualChildrenDuringTreeWalk); 291throw new InvalidOperationException(SR.CannotModifyVisualChildrenDuringTreeWalk); 1743throw new System.InvalidOperationException(inverse ? SR.Visual_NotADescendant : SR.Visual_NotAnAncestor);
System\Windows\Media3D\Visual3DCollection.cs (3)
634throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 654throw new InvalidOperationException(SR.Enumerator_CollectionChanged); 688throw new InvalidOperationException(SR.Enumerator_VerifyContext);
System\Windows\Navigation\BaseUriHelper.cs (1)
395throw new InvalidOperationException(SR.Format(SR.CannotNavigateToApplicationResourcesInWebBrowser, packUri));
System\Windows\PresentationSource.cs (4)
175throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, o.GetType())); 256throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, o.GetType())); 331throw new InvalidOperationException(); 733throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, doTarget.GetType()));
System\Windows\RoutedEventArgs.cs (5)
98throw new InvalidOperationException(SR.RoutedEventCannotChangeWhileRouting); 138throw new InvalidOperationException(SR.RoutedEventArgsMustHaveRoutedEvent); 190throw new InvalidOperationException(SR.RoutedEventCannotChangeWhileRouting); 194throw new InvalidOperationException(SR.RoutedEventArgsMustHaveRoutedEvent); 288throw new InvalidOperationException(SR.RoutedEventArgsMustHaveRoutedEvent);
System\Windows\UIElement.cs (5)
589throw new InvalidOperationException(SR.UIElement_Layout_NaNMeasure); 682throw new InvalidOperationException(SR.Format(SR.UIElement_Layout_PositiveInfinityReturned, this.GetType().FullName)); 686throw new InvalidOperationException(SR.Format(SR.UIElement_Layout_NaNReturned, this.GetType().FullName)); 809throw new InvalidOperationException( 1721throw new InvalidOperationException(SR.TreeLoop);
System\Windows\UIPropertyMetadata.cs (1)
113throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse);
PresentationFramework (890)
Microsoft\Win32\CommonDialog.cs (4)
77throw new InvalidOperationException(SR.CantShowModalOnNonInteractive); 154throw new InvalidOperationException(SR.CantShowModalOnNonInteractive); 163throw new InvalidOperationException(); 264throw new InvalidOperationException(SR.CantShowOnDifferentThread);
Microsoft\Win32\FileDialog.cs (1)
754throw new InvalidOperationException(SR.FileDialogInvalidFilterIndex);
Microsoft\Win32\OpenFileDialog.cs (2)
80throw new InvalidOperationException(SR.FileNameMustNotBeNull); 115throw new InvalidOperationException(SR.FileNameMustNotBeNull);
Microsoft\Win32\SaveFileDialog.cs (1)
81throw new InvalidOperationException(SR.FileNameMustNotBeNull);
MS\Internal\Annotations\Anchoring\LocatorManager.cs (1)
300throw new InvalidOperationException(SR.AnnotationServiceNotEnabled);
MS\Internal\Annotations\Component\AdornerPresentationContext.cs (3)
52throw new InvalidOperationException(SR.Format(SR.ComponentAlreadyInPresentationContext, adorner.AnnotationComponent)); 208if (foundAdorner == null) throw new InvalidOperationException(SR.Format(SR.ComponentNotInPresentationContext, component)); 502if (adorner == null) throw new InvalidOperationException(SR.Format(SR.ComponentNotInPresentationContext, component));
MS\Internal\Annotations\Component\AnnotationComponentManager.cs (1)
186throw new InvalidOperationException(SR.Format(SR.NoPresentationContextForGivenElement, annotatedElement));
MS\Internal\Annotations\Component\HighlightComponent.cs (1)
329throw new InvalidOperationException(SR.NoAttachedAnnotationToModify);
MS\Internal\Annotations\Component\MarkedHighlightComponent.cs (2)
194throw new InvalidOperationException(SR.InvalidAttachedAnnotation); 494if (layer == null) throw new InvalidOperationException(SR.Format(SR.NoPresentationContextForGivenElement, AnnotatedElement));
MS\Internal\Annotations\TextAnchor.cs (2)
639throw new InvalidOperationException(SR.TextSegmentsMustNotOverlap); 643throw new InvalidOperationException(SR.TextSegmentsMustNotOverlap);
MS\Internal\AppModel\AppModelKnownContentFactory.cs (4)
44throw new InvalidOperationException(SR.Format(SR.BamlIsNotSupportedOutsideOfApplicationResources)); 50throw new InvalidOperationException(SR.BamlIsNotSupportedOutsideOfApplicationResources); 59throw new InvalidOperationException(SR.BamlIsNotSupportedOutsideOfApplicationResources); 142throw new InvalidOperationException(SR.Format(SR.BamlIsNotSupportedOutsideOfApplicationResources));
MS\Internal\AppModel\AppSecurityManager.cs (1)
154throw new InvalidOperationException(SR.FailToLaunchDefaultBrowser,
MS\Internal\AppModel\JournalNavigationScope.cs (2)
186throw new InvalidOperationException(SR.NoForwardEntry); 208throw new InvalidOperationException(SR.NoBackEntry);
MS\Internal\Controls\ActiveXSite.cs (1)
191throw new InvalidOperationException(SR.AxWindowlessControl);
MS\Internal\Controls\ConnectionPointCookie.cs (1)
69ex = new InvalidOperationException(SR.Format(SR.AxNoSinkAdvise, eventInterface.Name, hr));
MS\Internal\Controls\EmptyEnumerator.cs (1)
62throw new InvalidOperationException();
MS\Internal\Controls\InnerItemCollectionView.cs (1)
716throw new InvalidOperationException(SR.ReparentModelChildIllegal);
MS\Internal\Controls\ModelTreeEnumerator.cs (2)
88throw new InvalidOperationException(SR.EnumeratorInvalidOperation); 132throw new InvalidOperationException(SR.EnumeratorVersionChanged);
MS\Internal\Controls\StickyNote\StickyNoteAnnotations.cs (2)
930throw new InvalidOperationException(SR.AddAnnotationsNotImplemented); 1019throw new InvalidOperationException(SR.InvalidAnchorPosition);
MS\Internal\Controls\StickyNote\StickyNoteContentControl.cs (4)
217throw new InvalidOperationException(SR.MaximumNoteSizeExceeded); 386throw new InvalidOperationException(SR.MaximumNoteSizeExceeded); 482throw new InvalidOperationException(SR.Format(SR.InvalidStickyNoteTemplate, type, typeof(RichTextBox), SNBConstants.c_ContentControlId)); 491throw new InvalidOperationException(SR.Format(SR.InvalidStickyNoteTemplate, type, typeof(InkCanvas), SNBConstants.c_ContentControlId));
MS\Internal\Data\CollectionViewGroupInternal.cs (2)
804throw new InvalidOperationException(); 840throw new InvalidOperationException();
MS\Internal\Data\CollectionViewProxy.cs (13)
415throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "NewItemPlaceholderPosition")); 454throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "AddNew")); 473throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "CommitNew")); 490throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "CancelNew")); 571throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "RemoveAt")); 587throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "Remove")); 611throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "EditItem")); 628throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "CommitEdit")); 645throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "CancelEdit")); 752throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "AddNewItem")); 816throw new InvalidOperationException(SR.Format(SR.CannotChangeLiveShaping, "IsLiveSorting", "CanChangeLiveSorting")); 839throw new InvalidOperationException(SR.Format(SR.CannotChangeLiveShaping, "IsLiveFiltering", "CanChangeLiveFiltering")); 862throw new InvalidOperationException(SR.Format(SR.CannotChangeLiveShaping, "IsLiveGrouping", "CanChangeLiveGrouping"));
MS\Internal\Data\CompositeCollectionView.cs (5)
635throw new InvalidOperationException(SR.CompositeCollectionResetOnlyOnClear); 1467throw new InvalidOperationException(SR.CannotMoveToUnknownPosition); 1570throw new InvalidOperationException(SR.EnumeratorNotStarted); 1575throw new InvalidOperationException(SR.EnumeratorReachedEnd); 1612throw new InvalidOperationException(SR.EnumeratorVersionChanged);
MS\Internal\Data\DefaultAsyncDataDispatcher.cs (1)
91request.Fail(new InvalidOperationException(SR.Format(SR.NonCLSException, "processing an async data request")));
MS\Internal\Data\EnumerableCollectionView.cs (6)
425throw new InvalidOperationException(SR.RemovedItemNotFound); 431throw new InvalidOperationException(SR.Format(SR.AddedItemNotAtIndex, index)); 441throw new InvalidOperationException(SR.Format(SR.AddedItemNotAtIndex, index)); 448throw new InvalidOperationException(SR.CannotMoveToUnknownPosition); 460throw new InvalidOperationException(SR.Format(SR.AddedItemNotAtIndex, oldIndex)); 474throw new InvalidOperationException(SR.Format(SR.AddedItemNotAtIndex, oldIndex));
MS\Internal\Data\IndexedEnumerable.cs (2)
737throw new InvalidOperationException(SR.EnumeratorVersionChanged); 748throw new InvalidOperationException(SR.EnumeratorVersionChanged);
MS\Internal\Data\ParameterCollection.cs (1)
172throw new InvalidOperationException(SR.ObjectDataProviderParameterCollectionIsNotInUse);
MS\Internal\Data\PropertyPathWorker.cs (5)
1570_host.ReportGetValueError(k, item, new InvalidOperationException(SR.Format(SR.NonCLSException, "GetValue"))); 1626throw new InvalidOperationException(SR.Format(SR.CannotWriteToReadOnly, item.GetType(), pi.Name)); 1631throw new InvalidOperationException(SR.Format(SR.CannotWriteToReadOnly, item.GetType(), pd.Name)); 1636throw new InvalidOperationException(SR.Format(SR.CannotWriteToReadOnly, item.GetType(), dp.Name)); 1641throw new InvalidOperationException(SR.Format(SR.CannotWriteToReadOnly, item.GetType(), dpa.PropertyName));
MS\Internal\Data\RBTree.cs (1)
130throw new InvalidOperationException(SR.InvalidOperation_IComparerFailed, e);
MS\Internal\Data\ViewManager.cs (1)
399throw new InvalidOperationException(SR.Format(SR.CollectionView_MissingSynchronizationCallback, collection));
MS\Internal\Documents\ContentElementCollection.cs (4)
324throw new InvalidOperationException(SR.EnumeratorVersionChanged); 349throw new InvalidOperationException(SR.EnumeratorNotStarted); 353throw new InvalidOperationException(SR.EnumeratorReachedEnd); 376throw new InvalidOperationException(SR.EnumeratorVersionChanged);
MS\Internal\Documents\DocumentGrid.cs (5)
1064throw new InvalidOperationException(SR.DocumentGridVisualTreeContainsNonBorderAsFirstElement); 1079throw new InvalidOperationException(SR.DocumentGridVisualTreeContainsNonDocumentGridPage); 1206throw new InvalidOperationException(SR.DocumentGridVisualTreeOutOfSync); 1234throw new InvalidOperationException(SR.DocumentGridVisualTreeContainsNonUIElement); 2479throw new InvalidOperationException(SR.DocumentGridInvalidViewMode);
MS\Internal\Documents\DocumentPageTextView.cs (11)
103throw new InvalidOperationException(SR.TextViewInvalidLayout); 128throw new InvalidOperationException(SR.TextViewInvalidLayout); 150throw new InvalidOperationException(SR.TextViewInvalidLayout); 179throw new InvalidOperationException(SR.TextViewInvalidLayout); 215throw new InvalidOperationException(SR.TextViewInvalidLayout); 246throw new InvalidOperationException(SR.TextViewInvalidLayout); 263throw new InvalidOperationException(SR.TextViewInvalidLayout); 280throw new InvalidOperationException(SR.TextViewInvalidLayout); 297throw new InvalidOperationException(SR.TextViewInvalidLayout); 314throw new InvalidOperationException(SR.TextViewInvalidLayout); 331throw new InvalidOperationException(SR.TextViewInvalidLayout);
MS\Internal\Documents\FlowDocumentFormatter.cs (2)
63throw new InvalidOperationException(SR.FlowDocumentFormattingReentrancy); 67throw new InvalidOperationException(SR.TextContainerChangingReentrancyInvalid);
MS\Internal\Documents\FlowDocumentPaginator.cs (8)
84throw new InvalidOperationException(SR.FlowDocumentFormattingReentrancy); 88throw new InvalidOperationException(SR.TextContainerChangingReentrancyInvalid); 157throw new InvalidOperationException(SR.FlowDocumentFormattingReentrancy); 161throw new InvalidOperationException(SR.TextContainerChangingReentrancyInvalid); 300throw new InvalidOperationException(SR.FlowDocumentFormattingReentrancy); 304throw new InvalidOperationException(SR.TextContainerChangingReentrancyInvalid); 542throw new InvalidOperationException(SR.FlowDocumentInvalidContnetChange); 774throw new InvalidOperationException(SR.FlowDocumentFormattingReentrancy);
MS\Internal\Documents\HostedElements.cs (2)
173throw new InvalidOperationException(SR.EnumeratorCollectionDisposed); 180throw new InvalidOperationException(SR.EnumeratorNotStarted);
MS\Internal\Documents\MultiPageTextView.cs (15)
100throw new InvalidOperationException(SR.TextViewInvalidLayout); 127throw new InvalidOperationException(SR.TextViewInvalidLayout); 150throw new InvalidOperationException(SR.TextViewInvalidLayout); 195throw new InvalidOperationException(SR.TextViewInvalidLayout); 208throw new InvalidOperationException(SR.TextViewInvalidLayout); 224throw new InvalidOperationException(SR.TextViewInvalidLayout); 246throw new InvalidOperationException(SR.TextViewInvalidLayout); 268throw new InvalidOperationException(SR.TextViewInvalidLayout); 290throw new InvalidOperationException(SR.TextViewInvalidLayout); 309throw new InvalidOperationException(SR.TextViewInvalidLayout); 326throw new InvalidOperationException(SR.TextViewInvalidLayout); 388throw new InvalidOperationException(SR.TextViewInvalidLayout); 485throw new InvalidOperationException(SR.TextViewInvalidLayout); 508throw new InvalidOperationException(SR.TextViewInvalidLayout); 608throw new InvalidOperationException(SR.TextViewInvalidLayout);
MS\Internal\Documents\PageCache.cs (1)
343throw new InvalidOperationException("parameter");
MS\Internal\Documents\ParentUndoUnit.cs (5)
72throw new InvalidOperationException(SR.UndoUnitCantBeOpenedTwice); 123throw new InvalidOperationException(SR.UndoNoOpenUnit); 240throw new InvalidOperationException(SR.UndoUnitCantBeAddedTwice); 245throw new InvalidOperationException(SR.UndoUnitLocked); 270throw new InvalidOperationException(SR.UndoUnitLocked);
MS\Internal\Documents\RowCache.cs (6)
294throw new InvalidOperationException(SR.RowCachePageNotFound); 447throw new InvalidOperationException(SR.RowCacheRecalcWithNoPageCache); 502throw new InvalidOperationException(SR.RowCacheRecalcWithNoPageCache); 872throw new InvalidOperationException(SR.RowCacheCannotModifyNonExistentLayout); 1002throw new InvalidOperationException(SR.RowCacheCannotModifyNonExistentLayout); 1056throw new InvalidOperationException(SR.RowCacheCannotModifyNonExistentLayout);
MS\Internal\Documents\TextDocumentView.cs (11)
67throw new InvalidOperationException(SR.TextViewInvalidLayout); 90throw new InvalidOperationException(SR.TextViewInvalidLayout); 117throw new InvalidOperationException(SR.TextViewInvalidLayout); 234throw new InvalidOperationException(SR.TextViewInvalidLayout); 285throw new InvalidOperationException(SR.TextViewInvalidLayout); 304throw new InvalidOperationException(SR.TextViewInvalidLayout); 324throw new InvalidOperationException(SR.TextViewInvalidLayout); 343throw new InvalidOperationException(SR.TextViewInvalidLayout); 364throw new InvalidOperationException(SR.TextViewInvalidLayout); 391throw new InvalidOperationException(SR.TextViewInvalidLayout); 430throw new InvalidOperationException(SR.TextViewInvalidLayout);
MS\Internal\Documents\TextParagraphView.cs (9)
70throw new InvalidOperationException(SR.TextViewInvalidLayout); 94throw new InvalidOperationException(SR.TextViewInvalidLayout); 113throw new InvalidOperationException(SR.TextViewInvalidLayout); 138throw new InvalidOperationException(SR.TextViewInvalidLayout); 199throw new InvalidOperationException(SR.TextViewInvalidLayout); 218throw new InvalidOperationException(SR.TextViewInvalidLayout); 241throw new InvalidOperationException(SR.TextViewInvalidLayout); 267throw new InvalidOperationException(SR.TextViewInvalidLayout); 292throw new InvalidOperationException(SR.TextViewInvalidLayout);
MS\Internal\Documents\TextViewBase.cs (5)
112throw new InvalidOperationException(SR.TextViewInvalidLayout); 183throw new InvalidOperationException(SR.TextViewInvalidLayout); 198throw new InvalidOperationException(SR.TextViewInvalidLayout); 216throw new InvalidOperationException(SR.TextViewInvalidLayout); 234throw new InvalidOperationException(SR.TextViewInvalidLayout);
MS\Internal\Documents\UndoManager.cs (19)
110throw new InvalidOperationException(SR.UndoManagerAlreadyAttached); 200throw new InvalidOperationException(SR.UndoServiceDisabled); 208throw new InvalidOperationException(SR.UndoUnitCantBeOpenedTwice); 249throw new InvalidOperationException(SR.UndoServiceDisabled); 256throw new InvalidOperationException(SR.UndoUnitAlreadyOpen); 266throw new InvalidOperationException(SR.UndoUnitNotOnTopOfStack); 276throw new InvalidOperationException(SR.UndoUnitNotOnTopOfStack); 290throw new InvalidOperationException(SR.UndoUnitLocked); 325throw new InvalidOperationException(SR.UndoServiceDisabled); 332throw new InvalidOperationException(SR.UndoNoOpenUnit); 418throw new InvalidOperationException(SR.UndoServiceDisabled); 471throw new InvalidOperationException(SR.UndoNoOpenParentUnit); 485throw new InvalidOperationException(SR.UndoServiceDisabled); 516throw new InvalidOperationException(SR.UndoServiceDisabled); 524throw new InvalidOperationException(SR.UndoNotInNormalState); 529throw new InvalidOperationException(SR.UndoUnitOpen); 581throw new InvalidOperationException(SR.UndoServiceDisabled); 589throw new InvalidOperationException(SR.UndoNotInNormalState); 594throw new InvalidOperationException(SR.UndoUnitOpen);
MS\Internal\FrameworkObject.cs (1)
70throw new InvalidOperationException(SR.Format(SR.MustBeFrameworkDerived, arg));
MS\Internal\Globalization\BamlResourceDeserializer.cs (1)
324throw new InvalidOperationException(SR.NullParentNode);
MS\Internal\Helper.cs (1)
301throw new InvalidOperationException(SR.Format(SR.MustBeFrameworkDerived, d.GetType()));
MS\Internal\IO\Packaging\CorePropertiesFilter.cs (1)
408throw new InvalidOperationException(
MS\Internal\IO\Packaging\indexingfiltermarshaler.cs (2)
105throw new InvalidOperationException(SR.FilterGetTextBufferOverflow); 209throw new InvalidOperationException(
MS\Internal\Markup\StaticExtension.cs (1)
48throw new InvalidOperationException(SR.MarkupExtensionStaticMember);
MS\Internal\Navigation\JournalEntryStack.cs (1)
148throw new InvalidOperationException(SR.EnumeratorVersionChanged);
MS\Internal\PtsHost\ContainerParagraph.cs (1)
1042throw new InvalidOperationException(SR.Format(SR.TextSchema_TextIsNotAllowedInThisContext, Element.GetType().Name));
MS\Internal\PtsHost\StructuralCache.cs (1)
120throw new InvalidOperationException(SR.IllegalTreeChangeDetectedPostAction);
MS\Internal\WindowsRuntime\Generated\WinRT\ComWrappersSupport.net5.cs (1)
139throw new InvalidOperationException("Cannot release objects that are not runtime wrappers of native WinRT objects.");
MS\Internal\WindowsRuntime\Generated\WinRT\ExceptionHelpers.cs (1)
146ex = new InvalidOperationException(description);
MS\Internal\WindowsRuntime\Generated\WinRT\GuidGenerator.cs (1)
81throw new InvalidOperationException("unsupported value type");
MS\Internal\WindowsRuntime\Generated\WinRT\Marshalers.cs (1)
997throw new InvalidOperationException("Arrays may not be marshaled generically.");
MS\Internal\WindowsRuntime\Generated\WinRT\ObjectReference.cs (1)
88throw new InvalidOperationException("Target type is not a projected interface.");
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IEnumerable.cs (6)
83throw new InvalidOperationException("Unexpected type for enumerator"); 245throw new InvalidOperationException(ErrorStrings.InvalidOperation_EnumNotStarted); 248throw new InvalidOperationException(ErrorStrings.InvalidOperation_EnumEnded); 259throw new InvalidOperationException(ErrorStrings.InvalidOperation_EnumNotStarted); 262throw new InvalidOperationException(ErrorStrings.InvalidOperation_EnumEnded); 308throw new InvalidOperationException(ErrorStrings.InvalidOperation_EnumFailedVersion);
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IReadOnlyList.cs (1)
80throw new InvalidOperationException(ErrorStrings.InvalidOperation_CollectionBackingListTooLarge);
MS\Internal\WindowsRuntime\Generated\WinRT\TypeExtensions.cs (1)
40throw new InvalidOperationException($"Target type is not a projected type: {type.FullName}.");
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Xaml\Parser\SpecialBracketCharacters.cs (4)
53throw new InvalidOperationException(); 78throw new InvalidOperationException("Opening bracket character cannot be the same as closing bracket character."); 82throw new InvalidOperationException("Bracket characters cannot be alpha-numeric or whitespace."); 86throw new InvalidOperationException("Bracket characters cannot be one of the following: '=' , ',', '\'', '\"', '{ ', ' }', '\\'");
src\Microsoft.DotNet.Wpf\src\Shared\Telemetry\Managed\EventSourceActivity.cs (3)
318throw new InvalidOperationException(); 331throw new InvalidOperationException(); 341throw new InvalidOperationException();
System\Windows\Annotations\Annotation.cs (1)
204throw new InvalidOperationException(SR.CannotSerializeInvalidInstance);
System\Windows\Annotations\AnnotationHelper.cs (3)
511throw new InvalidOperationException(SR.EmptySelectionNotSupported); 935throw new InvalidOperationException(SR.EmptySelectionNotSupported); 1113throw new InvalidOperationException(SR.OnlyFlowFixedSupported);
System\Windows\Annotations\AnnotationService.cs (8)
179throw new InvalidOperationException(SR.AnnotationServiceIsAlreadyEnabled); 218throw new InvalidOperationException(SR.OnlyFlowFixedSupported); 239throw new InvalidOperationException(SR.AnnotationServiceNotEnabled); 372throw new InvalidOperationException(SR.AnnotationServiceNotEnabled); 407throw new InvalidOperationException(SR.AnnotationServiceNotEnabled); 441throw new InvalidOperationException(SR.AnnotationServiceNotEnabled); 1068throw new InvalidOperationException(SR.AnnotationServiceAlreadyExists); 1154throw new InvalidOperationException(SR.AnnotationServiceAlreadyExists);
System\Windows\Annotations\Storage\XmlStreamStore.cs (2)
587throw new InvalidOperationException(SR.CannotParseId, fe); 943throw new InvalidOperationException(SR.StreamNotSet);
System\Windows\Application.cs (6)
130throw new InvalidOperationException(SR.MultiSingleton); 874throw new InvalidOperationException(SR.ShutdownModeWhenAppShutdown); 1054throw new InvalidOperationException(SR.Format(SR.PropertyIsImmutable, "ResourceAssembly", "Application")); 1642throw new InvalidOperationException(SR.Format(SR.CannotCallRunMultipleTimes, this.GetType().FullName)); 2035throw new InvalidOperationException(SR.ApplicationShuttingDown); 2393throw new InvalidOperationException(SR.ApplicationAlreadyRunning);
System\Windows\Automation\Peers\CalendarAutomationPeer.cs (4)
204throw new InvalidOperationException(SR.SetFocusFailed); 210throw new InvalidOperationException(SR.SetFocusFailed); 507throw new InvalidOperationException(SR.InavalidStartItem); 531throw new InvalidOperationException(SR.CalendarNamePropertyValueNotValid);
System\Windows\Automation\Peers\ComboBoxAutomationPeer.cs (3)
112throw new InvalidOperationException(SR.SetFocusFailed); 115throw new InvalidOperationException(SR.SetFocusFailed); 120throw new InvalidOperationException(SR.SetFocusFailed);
System\Windows\Automation\Peers\DataGridCellItemAutomationPeer.cs (6)
660throw new InvalidOperationException(SR.DataGrid_AutomationInvokeFailed); 697throw new InvalidOperationException(SR.DataGrid_CannotSelectCell); 712throw new InvalidOperationException(); 722throw new InvalidOperationException(SR.DataGrid_CannotSelectCell); 738throw new InvalidOperationException(SR.DataGrid_CannotSelectCell); 763throw new InvalidOperationException(SR.DataGrid_ColumnIsReadOnly);
System\Windows\Automation\Peers\DataGridColumnHeaderItemAutomationPeer.cs (3)
173throw new InvalidOperationException(SR.DataGridColumnHeaderItemAutomationPeer_Unsupported); 184throw new InvalidOperationException(SR.DataGridColumnHeaderItemAutomationPeer_Unresizable); 190throw new InvalidOperationException(SR.DataGridColumnHeaderItemAutomationPeer_Unsupported);
System\Windows\Automation\Peers\DataGridColumnHeadersPresenterAutomationPeer.cs (1)
191throw new InvalidOperationException(SR.InavalidStartItem);
System\Windows\Automation\Peers\DataGridItemAutomationPeer.cs (6)
163throw new InvalidOperationException(SR.InavalidStartItem); 257throw new InvalidOperationException(SR.DataGrid_AutomationInvokeFailed); 294throw new InvalidOperationException(SR.DataGridRow_CannotSelectRowWhenCells); 309throw new InvalidOperationException(); 322throw new InvalidOperationException(SR.DataGridRow_CannotSelectRowWhenCells); 338throw new InvalidOperationException(SR.DataGridRow_CannotSelectRowWhenCells);
System\Windows\Automation\Peers\DatePickerAutomationPeer.cs (2)
71throw new InvalidOperationException(SR.SetFocusFailed); 77throw new InvalidOperationException(SR.SetFocusFailed);
System\Windows\Automation\Peers\GridSplitterAutomationPeer.cs (2)
64throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed); 68throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed);
System\Windows\Automation\Peers\GridViewColumnHeaderAutomationPeer.cs (2)
85throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed); 110throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed);
System\Windows\Automation\Peers\GroupItemAutomationPeer.cs (1)
330throw new InvalidOperationException(SR.SetFocusFailed);
System\Windows\Automation\Peers\ItemsControlAutomationPeer.cs (1)
284throw new InvalidOperationException(SR.InavalidStartItem);
System\Windows\Automation\Peers\MenuItemAutomationPeer.cs (3)
216throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed); 234throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed); 292throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed);
System\Windows\Automation\Peers\PasswordBoxAutomationPeer.cs (1)
121throw new InvalidOperationException();
System\Windows\Automation\Peers\ProgressBarAutomationPeer.cs (1)
55throw new InvalidOperationException(SR.ProgressBarReadOnly);
System\Windows\Automation\Peers\RadioButtonAutomationPeer.cs (2)
75throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed); 86throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed);
System\Windows\Automation\Peers\ScrollViewerAutomationPeer.cs (4)
94throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed); 114throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed); 134throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed); 157throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed);
System\Windows\Automation\Peers\SelectorItemAutomationPeer.cs (2)
54throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed); 74throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed);
System\Windows\Automation\Peers\TabItemAutomationPeer.cs (1)
100throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed);
System\Windows\Automation\Peers\TreeViewItemAutomationPeer.cs (3)
284throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed); 300throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed); 352throw new InvalidOperationException(SR.UIA_OperationCannotBePerformed);
System\Windows\ColorConvertedBitmapExtension.cs (4)
67throw new InvalidOperationException(SR.ColorConvertedBitmapExtensionSyntax); 85throw new InvalidOperationException(SR.ColorConvertedBitmapExtensionNoSourceImage); 89throw new InvalidOperationException(SR.ColorConvertedBitmapExtensionNoSourceProfile); 100throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, "IUriContext" ));
System\Windows\ComponentResourceKey.cs (2)
57throw new InvalidOperationException(SR.ChangingTypeNotAllowed); 89throw new InvalidOperationException(SR.ChangingIdNotAllowed);
System\Windows\Condition.cs (11)
89throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "Condition")); 94throw new InvalidOperationException(SR.ConditionCannotUseBothPropertyAndBinding); 112throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "Condition")); 117throw new InvalidOperationException(SR.ConditionCannotUseBothPropertyAndBinding); 135throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "Condition")); 170throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "Condition")); 191throw new InvalidOperationException(SR.ConditionCannotUseBothPropertyAndBinding); 199throw new InvalidOperationException(SR.Format(SR.NullPropertyIllegal, "Property")); 204throw new InvalidOperationException(SR.Format(SR.InvalidPropertyValue, _value, _property.Name)); 212throw new InvalidOperationException(SR.Format(SR.NullPropertyIllegal, "Binding")); 217throw new InvalidOperationException(SR.Format(SR.UnexpectedValueTypeForCondition, type));
System\Windows\ConditionCollection.cs (1)
106throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "ConditionCollection"));
System\Windows\Controls\AdornedElementPlaceholder.cs (2)
173throw new InvalidOperationException(SR.AdornedElementPlaceholderMustBeInTemplate); 191throw new InvalidOperationException(SR.AdornedElementPlaceholderMustBeInTemplate);
System\Windows\Controls\AVElementHelper.cs (1)
729throw new InvalidOperationException(SR.MediaElement_CannotSetSourceOnMediaElementDrivenByClock);
System\Windows\Controls\Calendar.cs (1)
586throw new InvalidOperationException(SR.Calendar_OnSelectedDateChanged_InvalidOperation);
System\Windows\Controls\ColumnDefinition.cs (7)
547throw new InvalidOperationException(SR.Format(SR.GridCollection_CannotModifyReadOnly, "ColumnDefinitionCollection")); 812throw new InvalidOperationException(SR.EnumeratorNotStarted); 817throw new InvalidOperationException(SR.EnumeratorReachedEnd); 838throw new InvalidOperationException(SR.EnumeratorNotStarted); 843throw new InvalidOperationException(SR.EnumeratorReachedEnd); 886throw new InvalidOperationException(SR.EnumeratorCollectionDisposed); 890throw new InvalidOperationException(SR.EnumeratorVersionChanged);
System\Windows\Controls\ContentControl.cs (1)
205throw new InvalidOperationException(SR.ContentControlCannotHaveMultipleContent);
System\Windows\Controls\ContextMenu.cs (2)
686throw new InvalidOperationException(SR.Format(SR.ElementMustBeInPopup, "ContextMenu")); 696throw new InvalidOperationException(SR.Format(SR.ElementMustBeInPopup, "ContextMenu"));
System\Windows\Controls\DataErrorValidationRule.cs (1)
120throw new InvalidOperationException(SR.Format(SR.ValidationRule_UnexpectedValue, this, value));
System\Windows\Controls\DataGrid.cs (2)
4154throw new InvalidOperationException(SR.DataGrid_CannotSelectCell); 7159throw new InvalidOperationException(SR.DataGrid_ProbableInvalidSortDescription, invalidOperationException);
System\Windows\Controls\DataGridColumnHeaderCollection.cs (3)
115throw new InvalidOperationException(); 123throw new InvalidOperationException(); 139throw new InvalidOperationException();
System\Windows\Controls\DataGridRow.cs (1)
1087throw new InvalidOperationException(SR.DataGridRow_CannotSelectRowWhenCells);
System\Windows\Controls\Frame.cs (4)
551throw new InvalidOperationException(SR.FrameNoAddChild); 863throw new InvalidOperationException(SR.InvalidOperation_NoJournal); 937throw new InvalidOperationException(SR.InvalidOperation_NoJournal); 951throw new InvalidOperationException(SR.InvalidOperation_NoJournal);
System\Windows\Controls\Grid.cs (2)
3934throw new InvalidOperationException(SR.EnumeratorNotStarted); 3939throw new InvalidOperationException(SR.EnumeratorReachedEnd);
System\Windows\Controls\GridView.cs (1)
64throw new InvalidOperationException(SR.ListView_IllegalChildrenType);
System\Windows\Controls\GridViewColumnCollection.cs (2)
435throw new InvalidOperationException(SR.ListView_NotAllowShareColumnToTwoColumnCollection); 443throw new InvalidOperationException(SR.ListView_GridViewColumnCollectionIsReadOnly);
System\Windows\Controls\GroupItem.cs (2)
198throw new InvalidOperationException(SR.Format(SR.StyleForWrongType, style.TargetType.Name, this.GetType().Name)); 282throw new InvalidOperationException(SR.PageCacheSizeNotAllowed);
System\Windows\Controls\ItemCollection.cs (15)
256throw new InvalidOperationException(SR.ItemsSourceInUse); 348throw new InvalidOperationException(SR.ItemCollectionHasNoCollection); 904throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "NewItemPlaceholderPosition")); 943throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "AddNew")); 962throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "CommitNew")); 979throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "CancelNew")); 1060throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "RemoveAt")); 1076throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "Remove")); 1100throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "EditItem")); 1117throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "CommitEdit")); 1134throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "CancelEdit")); 1241throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "AddNewItem")); 1514throw new InvalidOperationException(SR.CannotUseItemsSource); 1952throw new InvalidOperationException(SR.ItemsSourceInUse); 1997throw new InvalidOperationException(SR.NoCheckOrChangeWhenDeferred);
System\Windows\Controls\ItemContainerGenerator.cs (9)
214throw new InvalidOperationException(SR.GenerationInProgress); 223throw new InvalidOperationException(SR.GenerationInProgress); 232throw new InvalidOperationException(SR.GenerationNotInProgress); 240throw new InvalidOperationException(SR.GenerationNotInProgress); 309throw new InvalidOperationException(SR.Format(SR.CannotRemoveUnrealizedItems, index, count)); 340throw new InvalidOperationException(SR.CannotRecyleHeterogeneousTypes); 1108throw new InvalidOperationException(SR.Generator_Inconsistent, exception); 2262throw new InvalidOperationException(SR.CannotFindRemovedItem); 2387throw new InvalidOperationException(SR.Format(SR.CollectionAddEventMissingItem, item));
System\Windows\Controls\ItemsControl.cs (4)
422throw new InvalidOperationException(SR.DisplayMemberPathAndItemTemplateSelectorDefined); 667throw new InvalidOperationException(SR.ItemTemplateSelectorBreaksDisplayMemberPath); 671throw new InvalidOperationException(SR.DisplayMemberPathAndItemTemplateDefined); 3517throw new InvalidOperationException(SR.Format(SR.StyleForWrongType, style.TargetType.Name, container.GetType().Name));
System\Windows\Controls\ItemsPanelTemplate.cs (3)
79throw new InvalidOperationException(SR.TemplateNotTargetType); 123throw new InvalidOperationException(SR.Format(SR.ItemsPanelNotAPanel, templateHolder.RootType)); 131throw new InvalidOperationException(SR.Format(SR.ItemsPanelNotAPanel, root.Type));
System\Windows\Controls\ItemsPresenter.cs (1)
51throw new InvalidOperationException(SR.ItemsPanelNotSingleNode);
System\Windows\Controls\ListBox.cs (1)
1016throw new InvalidOperationException(SR.Format(SR.ListBoxInvalidAnchorItem, value));
System\Windows\Controls\ListView.cs (1)
94throw new InvalidOperationException(SR.ListView_ViewCannotBeShared);
System\Windows\Controls\MenuItem.cs (1)
2119throw new InvalidOperationException(SR.Format(SR.InvalidItemContainer, this.GetType().Name, typeof(MenuItem).Name, typeof(Separator).Name, itemContainer));
System\Windows\Controls\MultipleCopiesCollection.cs (4)
294throw new InvalidOperationException(); 355throw new InvalidOperationException(); 380throw new InvalidOperationException(); 392throw new InvalidOperationException();
System\Windows\Controls\Page.cs (6)
95throw new InvalidOperationException(SR.PageCannotHaveMultipleContent); 172throw new InvalidOperationException(SR.CannotQueryPropertiesWhenPageNotInTreeWithWindow); 229throw new InvalidOperationException(SR.CannotQueryPropertiesWhenPageNotInTreeWithWindow); 283throw new InvalidOperationException(SR.CannotQueryPropertiesWhenPageNotInTreeWithWindow); 381throw new InvalidOperationException(SR.CannotQueryPropertiesWhenPageNotInTreeWithWindow); 721throw new InvalidOperationException(SR.ParentOfPageMustBeWindowOrFrame);
System\Windows\Controls\Panel.cs (2)
92throw new InvalidOperationException(SR.Panel_BoundPanel_NoChildren); 582throw new InvalidOperationException(SR.Panel_ItemsControlNotFound);
System\Windows\Controls\Primitives\DocumentViewerBase.cs (1)
1737throw new InvalidOperationException(SR.DocumentViewerCanHaveOnlyOneChild);
System\Windows\Controls\Primitives\MenuBase.cs (1)
514throw new InvalidOperationException(SR.Format(SR.InvalidItemContainer, this.GetType().Name, typeof(MenuItem).Name, typeof(Separator).Name, itemContainer));
System\Windows\Controls\Primitives\Popup.cs (3)
363throw new InvalidOperationException(SR.PopupReopeningNotAllowed); 902throw new InvalidOperationException(SR.Format(SR.CreateRootPopup_ChildHasLogicalParent, child, currentParent)); 907throw new InvalidOperationException(SR.Format(SR.CreateRootPopup_ChildHasVisualParent, child, currentParent));
System\Windows\Controls\Primitives\Selector.cs (2)
874throw new InvalidOperationException(SR.ChangingCollectionNotSupported); 1443throw new InvalidOperationException(SR.CannotSelectNotSelectableItem);
System\Windows\Controls\Primitives\StatusBar.cs (1)
127throw new InvalidOperationException(SR.Format(SR.InvalidItemContainer, this.GetType().Name, typeof(StatusBarItem).Name, typeof(Separator).Name, itemContainer));
System\Windows\Controls\Primitives\TextBoxBase.cs (3)
404throw new InvalidOperationException(SR.TextBoxBase_UnmatchedEndChange); 1704throw new InvalidOperationException(SR.TextBoxBase_CantSetIsUndoEnabledInsideChangeBlock); 1734throw new InvalidOperationException(SR.TextBoxBase_CantSetIsUndoEnabledInsideChangeBlock);
System\Windows\Controls\RichTextBox.cs (1)
368throw new InvalidOperationException(SR.RichTextBox_CantSetDocumentInsideChangeBlock);
System\Windows\Controls\RowDefinition.cs (7)
547throw new InvalidOperationException(SR.Format(SR.GridCollection_CannotModifyReadOnly, "RowDefinitionCollection")); 812throw new InvalidOperationException(SR.EnumeratorNotStarted); 817throw new InvalidOperationException(SR.EnumeratorReachedEnd); 838throw new InvalidOperationException(SR.EnumeratorNotStarted); 843throw new InvalidOperationException(SR.EnumeratorReachedEnd); 886throw new InvalidOperationException(SR.EnumeratorCollectionDisposed); 890throw new InvalidOperationException(SR.EnumeratorVersionChanged);
System\Windows\Controls\SelectedDatesCollection.cs (2)
451throw new InvalidOperationException(SR.Calendar_OnSelectedDateChanged_InvalidOperation); 456throw new InvalidOperationException(SR.Calendar_CheckSelectionMode_InvalidOperation);
System\Windows\Controls\SelectedItemCollection.cs (7)
89throw new InvalidOperationException(SR.InsertInDeferSelectionActive); 108throw new InvalidOperationException(SR.SetInDeferSelectionActive); 130throw new InvalidOperationException(SR.MoveInDeferSelectionActive); 191throw new InvalidOperationException(SR.DeferSelectionActive); 204throw new InvalidOperationException(SR.DeferSelectionNotActive); 228throw new InvalidOperationException(SR.DeferSelectionNotActive); 241throw new InvalidOperationException(SR.DeferSelectionNotActive);
System\Windows\Controls\StickyNote.cs (1)
1727throw new InvalidOperationException(SR.CannotProcessInkCommand);
System\Windows\Controls\TextAdaptor.cs (2)
500throw new InvalidOperationException(SR.TextProvider_TextSelectionNotSupported); 651throw new InvalidOperationException(SR.TextProvider_InvalidChildElement);
System\Windows\Controls\TextBlock.cs (7)
402throw new InvalidOperationException(SR.TextContainerChangingReentrancyInvalid); 1865throw new InvalidOperationException(SR.TextContainerChangingReentrancyInvalid); 3360throw new InvalidOperationException(SR.IllegalTreeChangeDetected); 3579throw new InvalidOperationException(SR.MeasureReentrancyInvalid); 3584throw new InvalidOperationException(SR.ArrangeReentrancyInvalid); 3589throw new InvalidOperationException(SR.TextContainerChangingReentrancyInvalid); 4034throw new InvalidOperationException();
System\Windows\Controls\TextBox.cs (1)
136throw new InvalidOperationException(SR.Format(SR.TextBoxInvalidChild, value.ToString()));
System\Windows\Controls\TextRangeAdaptor.cs (3)
2039throw new InvalidOperationException(SR.TextProvider_TextSelectionNotSupported); 2054throw new InvalidOperationException(); 2064throw new InvalidOperationException();
System\Windows\Controls\ToolTip.cs (2)
470throw new InvalidOperationException(SR.Format(SR.ElementMustBeInPopup, "ToolTip")); 480throw new InvalidOperationException(SR.Format(SR.ElementMustBeInPopup, "ToolTip"));
System\Windows\Controls\TreeViewItem.cs (1)
365throw new InvalidOperationException(SR.PageCacheSizeNotAllowed);
System\Windows\Controls\UIElementCollection.cs (1)
535throw new InvalidOperationException(SR.Panel_BoundPanel_NoChildren);
System\Windows\Controls\VirtualizingStackPanel.cs (1)
4271throw new InvalidOperationException(SR.CantSwitchVirtualizationModePostMeasure);
System\Windows\Controls\WebBrowser.cs (3)
346throw new InvalidOperationException(SR.CannotInvokeScript); 665throw new InvalidOperationException(SR.WebBrowserNoCastToIWebBrowser2); 751throw new InvalidOperationException(SR.CannotBeInsidePopup);
System\Windows\Data\Binding.cs (5)
226throw new InvalidOperationException(); // This is actually never called since CurrentDispatcher will throw if null. 343throw new InvalidOperationException(SR.Format(SR.BindingConflict, SourceProperties.StaticSource, _sourceInUse)); 542throw new InvalidOperationException(SR.Format(SR.BindingConflict, SourceProperties.Source, _sourceInUse)); 576throw new InvalidOperationException(SR.Format(SR.BindingConflict, SourceProperties.RelativeSource, _sourceInUse)); 595throw new InvalidOperationException(SR.Format(SR.BindingConflict, SourceProperties.ElementName, _sourceInUse));
System\Windows\Data\BindingBase.cs (1)
425throw new InvalidOperationException(SR.ChangeSealedBinding);
System\Windows\Data\BindingExpression.cs (7)
193throw new InvalidOperationException(SR.BindingExpressionIsDetached); 203throw new InvalidOperationException(SR.BindingExpressionIsDetached); 225throw new InvalidOperationException(SR.Format(SR.ArgumentPropertyMustNotBeNull, "Property", "args")); 417throw new InvalidOperationException(SR.TwoWayBindingNeedsPath); 838throw new InvalidOperationException(SR.MissingValueConverter); // report instead of throw? 1576throw new InvalidOperationException(SR.Format(SR.ValidationRule_UnknownStep, validationRule.ValidationStep, validationRule)); 2154throw new InvalidOperationException(SR.Format(SR.ValidationRule_UnknownStep, validationStep, bindingGroup));
System\Windows\Data\BindingExpressionBase.cs (3)
1286throw new InvalidOperationException(SR.Format(SR.RequiresExplicitCulture, TargetProperty.Name)); 1852throw new InvalidOperationException(SR.BindingGroup_CannotChangeGroups); 2125throw new InvalidOperationException(SR.Format(SR.BindingExpressionStatusChanged, _status, status));
System\Windows\Data\BindingListCollectionView.cs (22)
312throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "CustomFilter")); 375throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "GroupBySelector")); 435throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringTransaction, "NewItemPlaceholderPosition", "AddNew")); 575throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "AddNew")); 661throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringTransaction, "CommitNew", "EditItem")); 708throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringTransaction, "CancelNew", "EditItem")); 887throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "RemoveAt")); 899throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Remove")); 912throw new InvalidOperationException(SR.RemovingPlaceholder); 998throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringTransaction, "CommitEdit", "AddNew")); 1037throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringTransaction, "CancelEdit", "AddNew")); 1051throw new InvalidOperationException(SR.CancelEditNotSupported); 1143set { throw new InvalidOperationException(SR.Format(SR.CannotChangeLiveShaping, "IsLiveSorting", "CanChangeLiveSorting")); } 1155set { throw new InvalidOperationException(SR.Format(SR.CannotChangeLiveShaping, "IsLiveFiltering", "CanChangeLiveFiltering")); } 1939throw new InvalidOperationException(SR.Format(SR.InconsistentBindingList, InternalList, args.ListChangedType)); 1951throw new InvalidOperationException(SR.Format(SR.InconsistentBindingList, InternalList, args.ListChangedType)); 2008throw new InvalidOperationException(SR.Format(SR.InconsistentBindingList, InternalList, args.ListChangedType)); 2191throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Sorting")); 2330throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Grouping")); 2340throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Grouping")); 2472throw new InvalidOperationException(SR.CannotMoveToUnknownPosition); 2537throw new InvalidOperationException(SR.BindingListCanOnlySortByOneProperty);
System\Windows\Data\BindingOperations.cs (1)
374throw new InvalidOperationException(SR.Format(SR.AccessCollectionAfterShutDown, collection));
System\Windows\Data\CollectionView.cs (8)
309throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Refresh")); 335throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "DeferRefresh")); 845throw new InvalidOperationException(SR.Format(SR.ImplementOtherMembersWithSort, "Refresh()")); 900throw new InvalidOperationException(SR.Format(SR.ImplementOtherMembersWithSort, "GetEnumerator()")); 1433throw new InvalidOperationException(SR.NoCheckOrChangeWhenDeferred); 1650throw new InvalidOperationException(SR.EnumeratorVersionChanged); 1992throw new InvalidOperationException(SR.RemovedItemNotFound); 2004throw new InvalidOperationException(SR.CannotMoveToUnknownPosition);
System\Windows\Data\CollectionViewSource.cs (4)
186throw new InvalidOperationException(SR.CollectionViewTypeIsInitOnly); 1002throw new InvalidOperationException(SR.Format(SR.CannotSortView, view)); 1020throw new InvalidOperationException(SR.Format(SR.CannotFilterView, view)); 1032throw new InvalidOperationException(SR.Format(SR.CannotGroupView, view));
System\Windows\Data\ListCollectionView.cs (21)
444throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Filter")); 468throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "CustomSort")); 490throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Grouping")); 549throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringTransaction, "NewItemPlaceholderPosition", "AddNew")); 723throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "AddNew")); 746throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedForView, "AddNewItem")); 838throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringTransaction, "CommitNew", "EditItem")); 954throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringTransaction, "CancelNew", "EditItem")); 1066throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "RemoveAt")); 1078throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Remove")); 1091throw new InvalidOperationException(SR.RemovingPlaceholder); 1196throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringTransaction, "CommitEdit", "AddNew")); 1307throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringTransaction, "CancelEdit", "AddNew")); 1321throw new InvalidOperationException(SR.CancelEditNotSupported); 2543throw new InvalidOperationException(SR.CannotMoveToUnknownPosition); 2694throw new InvalidOperationException(SR.Format(SR.CollectionChangeIndexOutOfRange, index, ilFull.Count)); 2701throw new InvalidOperationException(SR.Format(SR.AddedItemNotAtIndex, index)); 2708throw new InvalidOperationException(SR.AddedItemNotInCollection); 2934throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Sorting")); 3027throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Grouping")); 3037throw new InvalidOperationException(SR.Format(SR.MemberNotAllowedDuringAddOrEdit, "Grouping"));
System\Windows\Data\MultiBinding.cs (2)
347throw new InvalidOperationException(SR.MultiBindingHasNoConverter); 384throw new InvalidOperationException(SR.NoUpdateSourceTriggerForInnerBindingOfMultiBinding);
System\Windows\Data\MultiBindingExpression.cs (3)
123throw new InvalidOperationException(SR.BindingExpressionIsDetached); 139throw new InvalidOperationException(SR.BindingExpressionIsDetached); 861throw new InvalidOperationException(SR.Format(SR.ValidationRule_UnknownStep, validationStep, bindingGroup));
System\Windows\Data\ObjectDataProvider.cs (5)
104throw new InvalidOperationException(SR.ObjectDataProviderCanHaveOnlyOneSource); 157throw new InvalidOperationException(SR.ObjectDataProviderCanHaveOnlyOneSource); 389e = new InvalidOperationException(SR.ObjectDataProviderHasNoSource); 494e = new InvalidOperationException(SR.Format(SR.ObjectDataProviderNonCLSException, _objectType.Name)); 584e = new InvalidOperationException(SR.Format(SR.ObjectDataProviderNonCLSExceptionInvoke, MethodName, _objectType.Name));
System\Windows\Data\RelativeSource.cs (5)
87throw new InvalidOperationException(SR.RelativeSourceNeedsMode); 89throw new InvalidOperationException(SR.RelativeSourceNeedsAncestorType); 156throw new InvalidOperationException(SR.RelativeSourceModeIsImmutable); 180throw new InvalidOperationException(SR.RelativeSourceNotInFindAncestorMode); 216throw new InvalidOperationException(SR.RelativeSourceNotInFindAncestorMode);
System\Windows\Data\XmlDataProvider.cs (1)
581throw new InvalidOperationException(SR.GetResponseFailed);
System\Windows\Data\XmlNamespaceMapping.cs (6)
48throw new InvalidOperationException(SR.Format(SR.PropertyIsInitializeOnly, "Prefix", this.GetType().Name)); 50throw new InvalidOperationException(SR.Format(SR.PropertyIsImmutable, "Prefix", this.GetType().Name)); 67throw new InvalidOperationException(SR.Format(SR.PropertyIsInitializeOnly, "Uri", this.GetType().Name)); 69throw new InvalidOperationException(SR.Format(SR.PropertyIsImmutable, "Uri", this.GetType().Name)); 145throw new InvalidOperationException(SR.Format(SR.PropertyMustHaveValue, "Prefix", this.GetType().Name)); 149throw new InvalidOperationException(SR.Format(SR.PropertyMustHaveValue, "Uri", this.GetType().Name));
System\Windows\DataTemplate.cs (1)
143throw new InvalidOperationException(SR.TemplateNotTargetType);
System\Windows\DataTrigger.cs (3)
47throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "DataTrigger")); 75throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "DataTrigger")); 177throw new InvalidOperationException(SR.Format(SR.UnexpectedValueTypeForDataTrigger, propertyValue.ValueType));
System\Windows\DeferrableContentConverter.cs (4)
54throw new InvalidOperationException(SR.ExpectedBamlSchemaContext); 67throw new InvalidOperationException(SR.ExpectedResourceDictionaryTarget); 81throw new InvalidOperationException(SR.ExpectedBinaryContent); 98throw new InvalidOperationException(SR.Format(SR.DeferringLoaderNoContext, typeof(DeferrableContentConverter).Name, typeof(T).Name));
System\Windows\DescendentsWalker.cs (2)
392throw new InvalidOperationException(SR.LogicalTreeLoop); 418throw new InvalidOperationException(SR.LogicalTreeLoop);
System\Windows\DialogResultConverter.cs (2)
63throw new InvalidOperationException(SR.CantSetInMarkup); 75throw new InvalidOperationException(SR.CantSetInMarkup);
System\Windows\Documents\AdornerLayer.cs (6)
240throw new InvalidOperationException(SR.AdornedElementNotFound); 565throw new InvalidOperationException(SR.AdornedElementNotFound); 570throw new InvalidOperationException(SR.AdornerNotFound); 591throw new InvalidOperationException(SR.AdornedElementNotFound); 596throw new InvalidOperationException(SR.AdornerNotFound); 685throw new InvalidOperationException(SR.AdornedElementNotFound);
System\Windows\Documents\DocumentSequence.cs (1)
130throw new InvalidOperationException(SR.PrevoiusUninitializedDocumentReferenceOutstanding);
System\Windows\Documents\DocumentSequenceTextPointer.cs (3)
235throw new InvalidOperationException(SR.DocumentReadOnly); 247throw new InvalidOperationException(SR.DocumentReadOnly); 463if (_isFrozen) throw new InvalidOperationException(SR.TextPositionIsFrozen);
System\Windows\Documents\FixedDocument.cs (1)
165throw new InvalidOperationException(SR.PrevoiusPartialPageContentOutstanding);
System\Windows\Documents\FixedTextPointer.cs (5)
217throw new InvalidOperationException(SR.NoElementObject); 399if (_isFrozen) throw new InvalidOperationException(SR.TextPositionIsFrozen); 434throw new InvalidOperationException(SR.NoElementObject); 503throw new InvalidOperationException(SR.FixedDocumentReadonly); 511throw new InvalidOperationException(SR.FixedDocumentReadonly);
System\Windows\Documents\FlowDocument.cs (4)
797throw new InvalidOperationException(SR.FlowDocumentInvalidContnetChange); 1397throw new InvalidOperationException(SR.FlowDocumentInvalidContnetChange); 1450throw new InvalidOperationException(SR.FlowDocumentInvalidContnetChange); 1485throw new InvalidOperationException(SR.FlowDocumentInvalidContnetChange);
System\Windows\Documents\InlineCollection.cs (1)
169throw new InvalidOperationException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, this.Parent.GetType().Name, child.GetType().Name));
System\Windows\Documents\List.cs (1)
185throw new InvalidOperationException(SR.ListElementItemNotAChildOfList);
System\Windows\Documents\PageContent.cs (2)
196throw new InvalidOperationException(SR.Format(SR.CanOnlyHaveOneChild, typeof(PageContent), value)); 289throw new InvalidOperationException(SR.Format(SR.CanOnlyHaveOneChild, typeof(PageContent), value));
System\Windows\Documents\RangeContentEnumerator.cs (5)
76throw new InvalidOperationException(SR.EnumeratorNotStarted); 91throw new InvalidOperationException(SR.EnumeratorReachedEnd); 101throw new InvalidOperationException(SR.EnumeratorVersionChanged); 163throw new InvalidOperationException(SR.EnumeratorVersionChanged); 222throw new InvalidOperationException(SR.EnumeratorVersionChanged);
System\Windows\Documents\Span.cs (2)
127throw new InvalidOperationException(SR.Format(SR.TextSchema_CannotSplitElement, nonMergeableAncestor.GetType().Name)); 131throw new InvalidOperationException(SR.Format(SR.TextSchema_CannotSplitElement, nonMergeableAncestor.GetType().Name));
System\Windows\Documents\Table.cs (4)
449throw new InvalidOperationException(SR.EnumeratorVersionChanged); 496throw new InvalidOperationException(SR.EnumeratorNotStarted); 501throw new InvalidOperationException(SR.EnumeratorReachedEnd); 512throw new InvalidOperationException(SR.EnumeratorVersionChanged);
System\Windows\Documents\TableCell.cs (1)
102throw new InvalidOperationException(SR.Format(SR.TableInvalidParentNodeType, newParent.GetType().ToString()));
System\Windows\Documents\TableRow.cs (1)
105throw new InvalidOperationException(SR.Format(SR.TableInvalidParentNodeType, newParent.GetType().ToString()));
System\Windows\Documents\TableRowGroup.cs (1)
321throw new InvalidOperationException(SR.Format(SR.TableInvalidParentNodeType, newParent.GetType().ToString()));
System\Windows\Documents\TextContainer.cs (2)
3260throw new InvalidOperationException(SR.Format(SR.NotInThisTree, "position")); 3268throw new InvalidOperationException(SR.NoElement);
System\windows\Documents\TextEditor.cs (1)
346throw new InvalidOperationException(
System\Windows\Documents\TextElement.cs (1)
899throw new InvalidOperationException(SR.Format(SR.TextSchema_TextIsNotAllowed, this.GetType().Name));
System\Windows\Documents\TextElementCollection.cs (2)
251throw new InvalidOperationException(SR.Format(SR.TextElementCollection_PreviousSiblingDoesNotBelongToThisCollection, previousSibling.GetType().Name)); 290throw new InvalidOperationException(SR.Format(SR.TextElementCollection_NextSiblingDoesNotBelongToThisCollection, nextSibling.GetType().Name));
System\Windows\Documents\TextElementEnumerator.cs (4)
94throw new InvalidOperationException(SR.EnumeratorNotStarted); 100throw new InvalidOperationException(SR.EnumeratorReachedEnd); 116throw new InvalidOperationException(SR.EnumeratorVersionChanged); 170throw new InvalidOperationException(SR.EnumeratorVersionChanged);
System\Windows\Documents\TextPointer.cs (8)
1397throw new InvalidOperationException(SR.TextPointer_CannotInsertTextElementBecauseItBelongsToAnotherTree); 1428throw new InvalidOperationException(SR.Format(SR.TextSchema_IllegalElement, "Paragraph", containerType)); 1437throw new InvalidOperationException(SR.Format(SR.TextSchema_CannotSplitElement, ancestor.GetType().Name)); 2153throw new InvalidOperationException(SR.TextSchema_UIElementNotAllowedInThisPosition); 2538throw new InvalidOperationException(SR.Format(SR.NoScopingElement, "This TextPointer")); 2646throw new InvalidOperationException(SR.Format(SR.NoScopingElement, "This TextNavigator")); 3554throw new InvalidOperationException(SR.TextSchema_CannotInsertContentInThisPosition); 3957throw new InvalidOperationException(SR.TextPositionIsFrozen);
System\Windows\Documents\TextRangeEdit.cs (1)
2289throw new InvalidOperationException(SR.Format(SR.TextRangeEdit_InvalidStructuralPropertyApply, property, nonMergeableAncestor));
System\Windows\Documents\TextRangeEditTables.cs (1)
870throw new InvalidOperationException(SR.TextSchema_CannotInsertContentInThisPosition);
System\Windows\Documents\TextSchema.cs (5)
115throw new InvalidOperationException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, parent.GetType().Name, child.GetType().Name)); 136throw new InvalidOperationException(SR.Format(SR.TextSchema_IllegalHyperlinkChild, childType)); 146throw new InvalidOperationException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, parent.GetType().Name, childType.Name)); 178throw new InvalidOperationException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, parent.GetType().Name, childType.Name)); 904throw new InvalidOperationException(SR.Format(SR.TextSchema_IllegalHyperlinkChild, nextElement.GetType()));
System\Windows\Documents\WinRTSpellerInterop.cs (1)
749throw new InvalidOperationException();
System\Windows\DynamicResourceExtension.cs (1)
59throw new InvalidOperationException(SR.MarkupExtensionResourceKey);
System\Windows\EventTrigger.cs (7)
100throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "EventTrigger")); 109throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "EventTrigger")); 132throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "EventTrigger")); 216throw new InvalidOperationException(SR.EventTriggerDoNotSetProperties); 222throw new InvalidOperationException(SR.EventTriggerDoesNotEnterExit); 324throw new InvalidOperationException(SR.TriggersSupportsEventTriggersOnly); 366throw new InvalidOperationException(SR.TriggersSupportsEventTriggersOnly);
System\Windows\FrameworkCompatibilityPreferences.cs (5)
85throw new InvalidOperationException(SR.Format(SR.CompatibilityPreferencesSealed, "AreInactiveSelectionHighlightBrushKeysSupported", "FrameworkCompatibilityPreferences")); 159throw new InvalidOperationException(SR.Format(SR.CompatibilityPreferencesSealed, "AextBoxDisplaysText", "FrameworkCompatibilityPreferences")); 198throw new InvalidOperationException(SR.Format(SR.CompatibilityPreferencesSealed, "UseSetWindowPosForTopmostWindows", "FrameworkCompatibilityPreferences")); 248throw new InvalidOperationException(SR.Format(SR.CompatibilityPreferencesSealed, "IsVirtualizingStackPanel_45Compatible", "FrameworkCompatibilityPreferences")); 380throw new InvalidOperationException(
System\Windows\FrameworkContentElement.cs (3)
1533throw new InvalidOperationException(SR.Illegal_InheritanceBehaviorSettor); 1550throw new InvalidOperationException(SR.NestedBeginInitNotSupported); 1565throw new InvalidOperationException(SR.EndInitWithoutBeginInitNotSupported);
System\Windows\FrameworkElement.cs (5)
506throw new InvalidOperationException(SR.Format(SR.NamedObjectMustBeFrameworkElement, targetName)); 1188throw new InvalidOperationException(SR.LogicalTreeLoop); 2663throw new InvalidOperationException(SR.Illegal_InheritanceBehaviorSettor); 5407throw new InvalidOperationException(SR.NestedBeginInitNotSupported); 5422throw new InvalidOperationException(SR.EndInitWithoutBeginInitNotSupported);
System\Windows\FrameworkElementFactory.cs (21)
83throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "FrameworkElementFactory")); 88throw new InvalidOperationException(SR.FrameworkElementFactoryCannotAddText); 128throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "FrameworkElementFactory")); 133throw new InvalidOperationException(SR.FrameworkElementFactoryCannotAddText); 152throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "FrameworkElementFactory")); 172throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "FrameworkElementFactory")); 184throw new InvalidOperationException(SR.FrameworkElementFactoryCannotAddText); 211throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "FrameworkElementFactory")); 290throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "FrameworkElementFactory")); 315throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "FrameworkElementFactory")); 351throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "FrameworkElementFactory")); 555throw new InvalidOperationException(SR.NullTypeIllegal); 564throw new InvalidOperationException(SR.Format(SR.TypeMustImplementIAddChild, _type.Name)); 575throw new InvalidOperationException(SR.Format(SR.ChildNameNamePatternReserved, _childName)); 661throw new InvalidOperationException(SR.Format(SR.TypeMustImplementIAddChild, 916throw new InvalidOperationException(SR.Format(SR.TypeMustImplementIAddChild, 934throw new InvalidOperationException(SR.FrameworkElementFactoryMustBeSealed); 962throw new InvalidOperationException(SR.Format(SR.TypeMustImplementIAddChild, 1122throw new InvalidOperationException(SR.Format(SR.AlreadyHasLogicalChildren, 1130throw new InvalidOperationException(SR.Format(SR.CannotHookupFCERoot, 1194throw new InvalidOperationException(SR.Format(SR.MissingContentSource, prefix, targetType));
System\Windows\FrameworkPropertyMetadata.cs (13)
322throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse); 339throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse); 356throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse); 373throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse); 390throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse); 407throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse); 426throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse); 445throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse); 462throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse); 481throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse); 506throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse); 527throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse); 546throw new InvalidOperationException(SR.TypeMetadataCannotChangeAfterUse);
System\Windows\FrameworkTemplate.cs (4)
249throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "Template")); 316throw new InvalidOperationException(SR.TemplateFindNameInInvalidElement); 441throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "Template")); 1140throw new InvalidOperationException(SR.Format(SR.TemplateMustBeFE, new object[] { rootObject.GetType().FullName }));
System\Windows\Generated\FrameworkContentElement.cs (8)
77throw new InvalidOperationException(SR.Format(SR.NameScopeNotFound, name, "register")); 95throw new InvalidOperationException(SR.Format(SR.NameScopeNotFound, name, "unregister")); 198throw new InvalidOperationException(SR.CannotModifyLogicalChildrenDuringTreeWalk); 246throw new InvalidOperationException(SR.CannotModifyLogicalChildrenDuringTreeWalk); 309throw new System.InvalidOperationException(SR.HasLogicalParent); 315throw new System.InvalidOperationException(SR.CannotBeSelfParent); 612throw new InvalidOperationException(SR.Format(SR.CyclicStyleReferenceDetected, this)); 666throw new InvalidOperationException(SR.Format(SR.CyclicThemeStyleReferenceDetected, this));
System\Windows\Generated\FrameworkElement.cs (8)
77throw new InvalidOperationException(SR.Format(SR.NameScopeNotFound, name, "register")); 95throw new InvalidOperationException(SR.Format(SR.NameScopeNotFound, name, "unregister")); 198throw new InvalidOperationException(SR.CannotModifyLogicalChildrenDuringTreeWalk); 246throw new InvalidOperationException(SR.CannotModifyLogicalChildrenDuringTreeWalk); 309throw new System.InvalidOperationException(SR.HasLogicalParent); 315throw new System.InvalidOperationException(SR.CannotBeSelfParent); 634throw new InvalidOperationException(SR.Format(SR.CyclicStyleReferenceDetected, this)); 688throw new InvalidOperationException(SR.Format(SR.CyclicThemeStyleReferenceDetected, this));
System\Windows\Input\Command\CommandValueSerializer.cs (4)
80throw new InvalidOperationException(SR.Format(SR.ValueSerializerContextUnavailable, this.GetType().Name )); 87throw new InvalidOperationException(SR.Format(SR.TypeValueSerializerUnavailable, this.GetType().Name )); 137throw new InvalidOperationException(SR.Format(SR.ValueSerializerContextUnavailable, this.GetType().Name )); 144throw new InvalidOperationException(SR.Format(SR.TypeValueSerializerUnavailable, this.GetType().Name ));
System\Windows\Interop\HwndHost.cs (4)
215throw new InvalidOperationException(SR.HwndHostDoesNotSupportChildKeyboardSinks); 1024throw new InvalidOperationException(SR.ChildWindowNotCreated); 1031throw new InvalidOperationException(SR.HostedWindowMustBeAChildWindow); 1037throw new InvalidOperationException(SR.ChildWindowMustHaveCorrectParent);
System\Windows\Markup\Baml2006\Baml2006Reader.cs (3)
1475throw new InvalidOperationException(SR.UnableToConvertInt32); 2056throw new InvalidOperationException($"Could not find prefix for type: {type.Name}"); 2666throw new InvalidOperationException(SR.BamlBadExtensionValue);
System\Windows\Markup\Baml2006\WpfGeneratedKnownProperties.cs (1)
290throw new InvalidOperationException("Invalid BAML number");
System\Windows\Markup\Baml2006\WpfGeneratedKnownTypes.cs (1)
781throw new InvalidOperationException("Invalid BAML number");
System\Windows\Markup\Baml2006\WpfKnownMember.cs (1)
106throw new InvalidOperationException("Can't Assign to Known Member attributes");
System\Windows\Markup\Baml2006\WpfKnownType.cs (1)
97throw new InvalidOperationException("Can't Assign to Known Type attributes");
System\Windows\Markup\Baml2006\WpfKnownTypeInvoker.cs (1)
33throw new InvalidOperationException(SR.PositionalArgumentsWrongLength);
System\Windows\Markup\BamlReader.cs (14)
325throw new InvalidOperationException(SR.BamlReaderClosed); 666throw new InvalidOperationException(SR.Format(SR.ParserUnknownBaml, 997throw new InvalidOperationException(SR.Format(SR.BamlReaderNoOwnerType, attrInfo.Name, AssemblyName)); 1033throw new InvalidOperationException(SR.Format(SR.ParserCantGetDPOrPi, info.Name)); 1676throw new InvalidOperationException(SR.Format(SR.ParserUnknownBaml, 1792throw new InvalidOperationException(SR.Format(SR.ParserBamlEvent, string.Empty)); 1806throw new InvalidOperationException(SR.Format(SR.ParserBamlEvent, string.Empty)); 1848throw new InvalidOperationException(SR.Format(SR.BamlScopeError, 1886throw new InvalidOperationException(SR.ParserMapPIMissingAssembly); 2031throw new InvalidOperationException(SR.Format(SR.BamlScopeError, 2138throw new InvalidOperationException(SR.Format(SR.BamlScopeError, 2246throw new InvalidOperationException(SR.Format(SR.BamlScopeError, 2385throw new InvalidOperationException(SR.BamlBadExtensionValue); 2465throw new InvalidOperationException(SR.BamlBadExtensionValue);
System\Windows\Markup\BamlRecords.cs (1)
782throw new InvalidOperationException(SR.ParserMultiBamls);
System\Windows\Markup\BamlVersionHeader.cs (1)
82throw new InvalidOperationException(SR.Format(SR.ParserBamlVersion,
System\Windows\Markup\BamlWriter.cs (10)
160throw new InvalidOperationException(SR.BamlWriterClosed); 164throw new InvalidOperationException(SR.BamlWriterStartDoc); 316throw new InvalidOperationException(SR.Format(SR.BamlWriterNoInElement, 483throw new InvalidOperationException(SR.Format(SR.BamlWriterBadXmlns, 517throw new InvalidOperationException(SR.Format(SR.BamlWriterNoInElement, 807throw new InvalidOperationException( 1010throw new InvalidOperationException(SR.BamlWriterUnknownMarkupExtension); 1029throw new InvalidOperationException(SR.BamlWriterClosed); 1033throw new InvalidOperationException(SR.BamlWriterStartDoc); 1056throw new InvalidOperationException(SR.Format(SR.BamlWriterBadScope,
System\Windows\Markup\FilteredXmlReader.cs (3)
127throw new InvalidOperationException( 159throw new InvalidOperationException( 346throw new InvalidOperationException(
System\Windows\Markup\Primitives\MarkupWriter.cs (6)
148throw new InvalidOperationException( SR.Format( SR.MarkupWriter_CannotSerializeNestedPublictype, type.ToString() )); 152throw new InvalidOperationException( SR.Format( SR.MarkupWriter_CannotSerializeNonPublictype, type.ToString() )); 156throw new InvalidOperationException( SR.Format( SR.MarkupWriter_CannotSerializeGenerictype, type.ToString() )); 506throw new InvalidOperationException(SR.UnserializableKeyValue); 698throw new InvalidOperationException(SR.Format(SR.UnserializableKeyValue, property.Value.GetType().FullName)); 1531throw new InvalidOperationException();
System\Windows\Markup\XamlReader.cs (2)
220throw new InvalidOperationException(SR.ParserCannotReuseXamlReader); 299throw new InvalidOperationException(SR.ParserCannotReuseXamlReader);
System\Windows\Markup\XamlSerializer.cs (5)
66throw new InvalidOperationException(SR.InvalidDeSerialize); 82throw new InvalidOperationException(SR.InvalidDeSerialize); 95throw new InvalidOperationException(SR.InvalidDeSerialize); 108throw new InvalidOperationException(SR.InvalidCustomSerialize); 119throw new InvalidOperationException(SR.InvalidCustomSerialize);
System\Windows\Markup\XmlnsCache.cs (1)
403throw new InvalidOperationException(SR.Format(SR.ParserCompatDuplicate, oldXmlns,
System\Windows\Markup\XmlnsDictionary.cs (1)
599throw new InvalidOperationException(SR.ParserDictionarySealed);
System\Windows\Media\Animation\BeginStoryboard.cs (4)
121throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "BeginStoryboard")); 143throw new InvalidOperationException(SR.Storyboard_StoryboardReferenceRequired); 150throw new InvalidOperationException(SR.Storyboard_UnableToFreeze); 208throw new InvalidOperationException(SR.Storyboard_StoryboardReferenceRequired);
System\Windows\Media\Animation\ControllableStoryboardAction.cs (3)
52throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "ControllableStoryboardAction")); 99throw new InvalidOperationException(SR.Storyboard_BeginStoryboardNameRequired); 108throw new InvalidOperationException(SR.Format(SR.Storyboard_BeginStoryboardNoStoryboard, BeginStoryboardName));
System\Windows\Media\Animation\Generated\ThicknessAnimation.cs (2)
323throw new InvalidOperationException( 334throw new InvalidOperationException(
System\Windows\Media\Animation\Generated\ThicknessAnimationUsingKeyFrames.cs (1)
287throw new InvalidOperationException(SR.Animation_NoTextChildren);
System\Windows\Media\Animation\SeekStoryboard.cs (2)
39throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "SeekStoryboard")); 74throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "SeekStoryboard"));
System\Windows\Media\Animation\SetStoryboardSpeedRatio.cs (1)
39throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "SetStoryboardSpeedRatio"));
System\Windows\Media\Animation\Storyboard.cs (28)
272throw new InvalidOperationException( 278throw new InvalidOperationException( 285throw new InvalidOperationException(SR.Format(SR.Storyboard_TargetNameNotDependencyObject, targetName )); 320throw new InvalidOperationException( 329throw new InvalidOperationException( 338throw new InvalidOperationException( 344throw new InvalidOperationException( 352throw new InvalidOperationException(SR.Format(SR.Storyboard_BeginStoryboardNameNotFound, targetName)); 399throw new InvalidOperationException(SR.Format(SR.Storyboard_TargetNameNotAllowedInStyle, nameString)); 447throw new InvalidOperationException(SR.Format(SR.Storyboard_NoTarget, currentTimeline.GetType().ToString() )); 455throw new InvalidOperationException(SR.Format(SR.Storyboard_TargetPropertyRequired, currentTimeline.GetType().ToString() )); 465throw new InvalidOperationException(SR.Storyboard_PropertyPathEmpty); 478throw new InvalidOperationException(SR.Format(SR.Storyboard_PropertyPathMustPointToDependencyProperty, currentPropertyPath.Path )); 544throw new InvalidOperationException(SR.Format(SR.Storyboard_MediaElementNotFound, currentObjectName )); 558throw new InvalidOperationException(SR.Storyboard_MediaElementRequired); 692throw new InvalidOperationException(SR.Format(SR.Storyboard_PropertyPathObjectNotFound, AccessorName(path, i-1), path.Path )); 699throw new InvalidOperationException(SR.Format(SR.Storyboard_PropertyPathPropertyNotFound, path.Path )); 726throw new InvalidOperationException(SR.Format(SR.Storyboard_PropertyPathFrozenCheckFailed, AccessorName(path, i-1), path.Path, intermediateFreezable.GetType().ToString() )); 732throw new InvalidOperationException(SR.Format(SR.Storyboard_ImmutableTargetNotSupported, path.Path)); 747throw new InvalidOperationException(SR.Format(SR.Storyboard_PropertyPathMustPointToDependencyObject, AccessorName(path, i-1), path.Path)); 752throw new InvalidOperationException(SR.Format(SR.Storyboard_PropertyPathMustPointToDependencyProperty, path.Path )); 757throw new InvalidOperationException(SR.Format(SR.Storyboard_PropertyPathSealedCheckFailed, intermediateDP.Name, path.Path, intermediateDO)); 762throw new InvalidOperationException(SR.Format(SR.Storyboard_PropertyPathIncludesNonAnimatableProperty, path.Path, intermediateDP.Name)); 798throw new InvalidOperationException(SR.Format(SR.Storyboard_AnimationMismatch, animationClock.Timeline.GetType(), targetProperty.Name, targetProperty.PropertyType)); 845throw new InvalidOperationException(SR.Format(SR.Storyboard_PropertyPathUnresolved, path.Path)); 876throw new InvalidOperationException(SR.Format(SR.Storyboard_ImmutableTargetNotSupported, path.Path)); 947throw new InvalidOperationException(SR.Format(SR.Storyboard_ComplexPathNotSupported, targetObject.GetType().ToString())); 1973throw new InvalidOperationException(SR.Storyboard_NeverApplied);
System\Windows\MultiDataTrigger.cs (2)
115throw new InvalidOperationException(SR.SourceNameNotSupportedForDataTriggers); 138throw new InvalidOperationException(SR.Format(SR.UnexpectedValueTypeForDataTrigger, propertyValue.ValueType));
System\Windows\Navigation\Journal.cs (3)
339throw new InvalidOperationException(SR.InvalidOperation_CannotClearFwdStack); 368throw new InvalidOperationException(SR.NoBackEntry); 384throw new InvalidOperationException(SR.NoForwardEntry);
System\Windows\Navigation\NavigationService.cs (10)
572throw new InvalidOperationException(SR.InvalidOperation_CantChangeJournalOwnership); 1133throw new InvalidOperationException(SR.Format(SR.WrongNavigateRootElement, bp.ToString())); 1442throw new InvalidOperationException(SR.InvalidOperation_AddBackEntryNoContent); 1458throw new InvalidOperationException( 1670throw new InvalidOperationException(SR.InvalidOperation_CannotReenterPageFunction); 1751throw new InvalidOperationException(SR.NoForwardEntry); 1765throw new InvalidOperationException(SR.NoBackEntry); 2977throw new InvalidOperationException(SR.FailedToConvertResource); 3740throw new InvalidOperationException(SR.WindowAlreadyClosed); 3942throw new InvalidOperationException(SR.UiLessPageFunctionNotCallingOnReturn);
System\Windows\Navigation\NavigationWindow.cs (1)
858throw new InvalidOperationException(SR.NoAddChild);
System\Windows\Navigation\RequestNavigateEventArgs.cs (1)
75throw new InvalidOperationException(SR.RequestNavigateEventMustHaveRoutedEvent);
System\Windows\PropertyPath.cs (9)
83throw new InvalidOperationException(); // This is actually never called since CurrentDispatcher will throw if null. 379throw new InvalidOperationException(SR.Format(SR.PropertyPathSyntaxError, detail)); 564throw new InvalidOperationException(SR.Format(SR.PropertyPathInvalidAccessor, 570throw new InvalidOperationException(SR.Format(SR.PathParametersIndexOutOfRange, index, PathParameters.Count)); 587throw new InvalidOperationException(SR.Format(SR.PropertyPathNoOwnerType, ownerName)); 647throw new InvalidOperationException(SR.Format(SR.PropertyPathNoProperty, ownerType.Name, propertyName)); 736throw new InvalidOperationException(SR.Format(SR.PathParameterIsNull, index)); 740throw new InvalidOperationException(SR.Format(SR.PathParametersIndexOutOfRange, index, PathParameters.Count)); 764throw new InvalidOperationException(SR.Format(SR.PropertyPathIndexWrongType, paramList[i].parenString, paramList[i].valueString));
System\Windows\ResourceDictionary.cs (12)
234throw new InvalidOperationException(SR.Format(SR.ResourceDictionaryLoadFromFailure, _source.ToString())); 442throw new InvalidOperationException(SR.ResourceDictionaryIsReadOnly); 637throw new InvalidOperationException(SR.ResourceDictionaryIsReadOnly); 697throw new InvalidOperationException(SR.ResourceDictionaryIsReadOnly); 828throw new InvalidOperationException(SR.ResourceDictionaryIsReadOnly); 942throw new InvalidOperationException(SR.NestedBeginInitNotSupported); 961throw new InvalidOperationException(SR.EndInitWithoutBeginInitNotSupported); 1126throw new InvalidOperationException(SR.ResourceDictionaryDuplicateDeferredContent); 1131throw new InvalidOperationException(SR.ResourceDictionaryDeferredContentFailure); 1454throw new InvalidOperationException(SR.ResourceDictionaryInvalidMergedDictionary); 1476throw new InvalidOperationException(SR.ResourceDictionaryInvalidMergedDictionary); 1498throw new InvalidOperationException(SR.ResourceDictionaryInvalidMergedDictionary);
System\Windows\Setter.cs (1)
84throw new InvalidOperationException(SR.Format(SR.CannotHavePropertyInStyle, FrameworkElement.NameProperty.Name));
System\Windows\SetterBase.cs (1)
51throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "SetterBase"));
System\Windows\SetterBaseCollection.cs (1)
106throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "SetterBaseCollection"));
System\Windows\Shell\JumpList.cs (2)
368throw new InvalidOperationException(SR.JumpList_CantNestBeginInitCalls); 432throw new InvalidOperationException(SR.JumpList_CantApplyUntilEndInit);
System\Windows\Shell\WindowChromeWorker.cs (1)
1153throw new InvalidOperationException("Unable to combine two HRGNs.");
System\Windows\Standard\NativeMethods.cs (1)
1593throw new InvalidOperationException("IConnectionPoint::Advise returned an invalid cookie.");
System\Windows\Standard\Verify.cs (3)
46throw new InvalidOperationException(message); 148throw new InvalidOperationException($"The property {name} cannot be null at this time."); 158throw new InvalidOperationException($"The property {name} must be null at this time.");
System\Windows\StaticResourceExtension.cs (2)
207throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, "IXamlSchemaContextProvider")); 213throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, "IAmbientProvider"));
System\Windows\Style.cs (12)
178throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "Style")); 218throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "Style")); 324throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "Style")); 490throw new InvalidOperationException(SR.Format(SR.StyleTargetTypeMismatchWithElement, 514throw new InvalidOperationException(SR.Format(SR.NullPropertyIllegal, "TargetType")); 522throw new InvalidOperationException(SR.Format(SR.MustBaseOnStyleOfABaseType, _targetType.Name)); 610throw new InvalidOperationException(SR.Format( 663throw new InvalidOperationException(SR.Format(SR.SetterOnStyleNotAllowedToHaveTarget, setter.TargetName)); 767throw new InvalidOperationException(SR.StyleTriggersCannotTargetTheTemplate); 775throw new InvalidOperationException(SR.Format(SR.TriggerOnStyleNotAllowedToHaveSource, conditions[k].SourceName)); 821throw new InvalidOperationException(SR.Format(SR.UnsupportedTriggerInStyle, trigger.GetType().Name)); 831throw new InvalidOperationException(SR.Format(SR.EventTriggerOnStyleNotAllowedToHaveTarget, eventTrigger.SourceName));
System\Windows\StyleHelper.cs (18)
123throw new InvalidOperationException(SR.CannotHaveOverridesDefaultStyleInThemeStyle); 129throw new InvalidOperationException(SR.CannotHaveEventHandlersInThemeStyle); 243throw new InvalidOperationException(SR.Format( 453throw new InvalidOperationException(SR.Format(SR.CannotHavePropertyInTemplate, Control.TemplateProperty.Name)); 460throw new InvalidOperationException(SR.Format(SR.CannotHavePropertyInTemplate, FrameworkElement.StyleProperty.Name)); 467throw new InvalidOperationException(SR.Format(SR.CannotHavePropertyInTemplate, FrameworkElement.DefaultStyleKeyProperty.Name)); 474throw new InvalidOperationException(SR.Format(SR.CannotHavePropertyInTemplate, FrameworkElement.OverridesDefaultStyleProperty.Name)); 481throw new InvalidOperationException(SR.Format(SR.CannotHavePropertyInTemplate, FrameworkElement.NameProperty.Name)); 518throw new InvalidOperationException(SR.Format(SR.NameNotFound, propertyValue.ChildName)); 571throw new InvalidOperationException(SR.MissingTriggerProperty); 993throw new InvalidOperationException(SR.Format(SR.UnsupportedTriggerInTemplate, triggerBase.GetType().Name)); 1010throw new InvalidOperationException(SR.Format(SR.UnsupportedTriggerInTemplate, triggerBase.GetType().Name)); 1098throw new InvalidOperationException(SR.Format(SR.EventTriggerTargetNameUnresolvable, eventTrigger.SourceName)); 1607throw new InvalidOperationException(SR.Format(SR.CrossThreadAccessOfUnshareableFreezable, freezable.GetType().FullName)); 2090throw new InvalidOperationException( 2348throw new InvalidOperationException(SR.Format(SR.MustBeFrameworkDerived, d.GetType())); 4099throw new InvalidOperationException(SR.ChildTemplateInstanceDoesNotExist); 5336throw new InvalidOperationException(SR.StyleHasTooManyElements);
System\Windows\TemplateBindingExtension.cs (1)
60throw new InvalidOperationException(SR.MarkupExtensionProperty);
System\Windows\TemplateContent.cs (1)
1244throw new InvalidOperationException(SR.Format(SR.MissingContentSource, contentSource, targetType));
System\Windows\TemplateContentLoader.cs (1)
27throw new InvalidOperationException(SR.Format(SR.DeferringLoaderNoContext,typeof(TemplateContentLoader).Name, typeof(T).Name));
System\Windows\TemplateKey.cs (3)
53throw new InvalidOperationException(SR.Format(SR.PropertyMustHaveValue, "DataType", this.GetType().Name)); 72throw new InvalidOperationException(SR.Format(SR.PropertyIsInitializeOnly, "DataType", this.GetType().Name)); 74throw new InvalidOperationException(SR.Format(SR.PropertyIsImmutable, "DataType", this.GetType().Name));
System\Windows\ThemeDictionaryExtension.cs (3)
75throw new InvalidOperationException(SR.ThemeDictionaryExtension_Name); 81throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, "IProvideValueTarget" )); 93throw new InvalidOperationException(SR.ThemeDictionaryExtension_Source);
System\Windows\Trigger.cs (4)
46throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "Trigger")); 76throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "Trigger")); 123throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "Trigger")); 206throw new InvalidOperationException(SR.Format(SR.InvalidPropertyValue, _value, _property.Name ));
System\Windows\TriggerAction.cs (3)
89throw new InvalidOperationException(SR.TriggerActionMustBelongToASingleTrigger); 104throw new InvalidOperationException(SR.TriggerActionAlreadySealed); 116throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "TriggerAction"));
System\Windows\TriggerActionCollection.cs (1)
295throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "TriggerActionCollection"));
System\Windows\TriggerBase.cs (3)
251throw new InvalidOperationException(SR.Format(SR.PropertyTriggerCycleDetected, source.Name)); 310throw new InvalidOperationException(SR.Format(SR.VisualTriggerSettersIncludeUnsupportedSetterType, setters[i].GetType().Name)); 368throw new InvalidOperationException(SR.PropertyTriggerLayerLimitExceeded);
System\Windows\TriggerCollection.cs (1)
134throw new InvalidOperationException(SR.Format(SR.CannotChangeAfterSealed, "TriggerCollection"));
System\Windows\VisualStateManager.cs (1)
198throw new InvalidOperationException();
System\Windows\Window.cs (20)
274throw new InvalidOperationException(SR.DragMoveFail); 297throw new InvalidOperationException(SR.ShowDialogOnVisible); 301throw new InvalidOperationException(SR.ShowDialogOnModal); 750throw new InvalidOperationException(SR.ChangeNotAllowedAfterShow); 1189throw new InvalidOperationException(SR.CantSetOwnerAfterDialogIsShown); 1197throw new InvalidOperationException(SR.CantSetOwnerToClosedWindow); 1199throw new InvalidOperationException(SR.CantSetOwnerWhosHwndIsNotCreated); 1344throw new InvalidOperationException(SR.DialogResultMustBeSetAfterShowDialog); 1739throw new InvalidOperationException(SR.WindowMustBeRoot); 2336throw new InvalidOperationException(SR.WindowMustBeRoot); 3133throw new InvalidOperationException(SR.CantSetOwnerAfterDialogIsShown); 3616throw new InvalidOperationException(SR.ReshowNotAllowed); 3624throw new InvalidOperationException(SR.InvalidOperationDuringClosing); 3629throw new InvalidOperationException(SR.InvalidCompositionTarget); 3637throw new InvalidOperationException(SR.NotAllowedBeforeShow); 6233throw new InvalidOperationException(SR.TransformNotSupported); 6247throw new InvalidOperationException(SR.ClipToBoundsNotSupported); 6748throw new InvalidOperationException(SR.IncorrectFlowDirection); 6864throw new InvalidOperationException(SR.MustUseWindowStyleNone); 6875throw new InvalidOperationException(SR.ShowNonActivatedAndMaximized);
PresentationUI (23)
MS\Internal\Documents\Application\DocumentStream.cs (4)
516throw new InvalidOperationException( 521throw new InvalidOperationException( 526throw new InvalidOperationException( 990throw new InvalidOperationException(
MS\Internal\Documents\Application\PackageController.cs (2)
127throw new InvalidOperationException( 135throw new InvalidOperationException(
MS\Internal\Documents\Application\RightsManagementSuppressedStream.cs (1)
165throw new InvalidOperationException(
MS\Internal\Documents\Application\StreamProxy.cs (1)
262throw new InvalidOperationException(
MS\Internal\Documents\Application\TransactionalPackage.cs (2)
107throw new InvalidOperationException(); 507throw new InvalidOperationException(
MS\Internal\Documents\DocumentApplicationDocumentViewer.cs (1)
305throw new InvalidOperationException(
MS\Internal\Documents\PeoplePickerWrapper.cs (2)
210throw new InvalidOperationException( 272throw new InvalidOperationException(SR.PeoplePickerInvalidParentWindow);
MS\Internal\Documents\RightsManagementManager.cs (1)
436throw new InvalidOperationException(
MS\Internal\Documents\RightsManagementProvider.cs (9)
198throw new InvalidOperationException( 225throw new InvalidOperationException( 266throw new InvalidOperationException( 272throw new InvalidOperationException( 302throw new InvalidOperationException( 308throw new InvalidOperationException( 576throw new InvalidOperationException( 651throw new InvalidOperationException( 815throw new InvalidOperationException(
ReachFramework (24)
AlphaFlattener\Flattener.cs (9)
1336throw new InvalidOperationException(); 1341throw new InvalidOperationException(); 1346throw new InvalidOperationException(); 1351throw new InvalidOperationException(); 1356throw new InvalidOperationException(); 1361throw new InvalidOperationException(); 1366throw new InvalidOperationException(); 1371throw new InvalidOperationException(); 1421throw new InvalidOperationException();
AlphaFlattener\MetroDevice.cs (2)
79throw new InvalidOperationException(); 140throw new InvalidOperationException();
Packaging\XpsDocument.cs (7)
491throw new InvalidOperationException(SR.ReachPackaging_DocumentWasClosed); 519throw new InvalidOperationException(SR.ReachPackaging_DocumentWasClosed); 550throw new InvalidOperationException(SR.ReachPackaging_DocumentWasClosed); 595throw new InvalidOperationException(SR.ReachPackaging_DocumentWasClosed); 642throw new InvalidOperationException(SR.ReachPackaging_DocumentWasClosed); 847throw new InvalidOperationException(SR.ReachPackaging_DocumentWasClosed); 851throw new InvalidOperationException(SR.ReachPackaging_SigningDoesNotMeetPolicy);
PrintConfig\PTProvider.cs (1)
571throw new InvalidOperationException(SR.PTProvider_VerifyAccess);
Serialization\Manager\XpsOMPackagingPolicy.cs (2)
344throw new InvalidOperationException("CurrentFixedPageWriter uninitialized"); 356throw new InvalidOperationException("CurrentFixedPageWriter uninitialized");
Serialization\Manager\XpsPackagingPolicy.cs (3)
1297throw new InvalidOperationException("CurrentFixedPageWriter uninitialized"); 1313throw new InvalidOperationException("CurrentFixedPageWriter uninitialized"); 1329throw new InvalidOperationException("CurrentFixedPageWriter uninitialized");
RoutingSandbox (1)
Program.cs (1)
51throw new InvalidOperationException();
RoutingWebSite (1)
Program.cs (1)
53throw new InvalidOperationException();
ServerComparison.TestSites (1)
OneTransformPerRequest.cs (1)
26throw new InvalidOperationException("Transformation ran multiple times.");
SignalR.Client.FunctionalTestApp (2)
TestHub.cs (2)
47throw new InvalidOperationException(message); 107throw new InvalidOperationException(message);
SimpleWebSiteWithWebApplicationBuilderException (1)
Program.cs (1)
8throw new InvalidOperationException("This application failed to start");
SocialSample (1)
Startup.cs (1)
38throw new InvalidOperationException("User secrets must be configured for each authentication provider.");
Sockets.BindTests (3)
src\Servers\Kestrel\shared\test\TestApplicationErrorLogger.cs (1)
43throw new InvalidOperationException($"{nameof(WaitForMessage)} cannot be called concurrently.");
src\Shared\TestResources.cs (2)
26throw new InvalidOperationException("Cannot acquire the global certificate mutex."); 63throw new InvalidOperationException("Cannot acquire the global certificate mutex.");
Sockets.FunctionalTests (3)
src\Servers\Kestrel\shared\test\TestApplicationErrorLogger.cs (1)
43throw new InvalidOperationException($"{nameof(WaitForMessage)} cannot be called concurrently.");
src\Shared\TestResources.cs (2)
26throw new InvalidOperationException("Cannot acquire the global certificate mutex."); 63throw new InvalidOperationException("Cannot acquire the global certificate mutex.");
StaticFilesAuth (2)
Startup.cs (2)
58throw new InvalidOperationException($"Missing file system metadata."); 61throw new InvalidOperationException($"Unknown resource type '{context.Resource.GetType()}'");
Swaggatherer (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
System.Collections (41)
System\Collections\BitArray.cs (4)
1130throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 1164throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 1174return new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1179return new InvalidOperationException(SR.InvalidOperation_EnumEnded);
System\Collections\Generic\LinkedList.cs (7)
314if (head == null) { throw new InvalidOperationException(SR.LinkedListEmpty); } 320if (head == null) { throw new InvalidOperationException(SR.LinkedListEmpty); } 426throw new InvalidOperationException(SR.LinkedListNodeIsAttached); 436throw new InvalidOperationException(SR.ExternalLinkedListNode); 528throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 539throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 562throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
System\Collections\Generic\PriorityQueue.cs (5)
228throw new InvalidOperationException(SR.InvalidOperation_EmptyQueue); 243throw new InvalidOperationException(SR.InvalidOperation_EmptyQueue); 267throw new InvalidOperationException(SR.InvalidOperation_EmptyQueue); 1015throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 1033throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
System\Collections\Generic\SortedDictionary.cs (6)
467throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 487throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 500throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 513throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 668throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 829throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen);
System\Collections\Generic\SortedList.cs (12)
784throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 793if (_version != _sortedList.version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 815throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 830throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 850throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 861throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 893throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 916throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 927throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 957throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 980throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 991throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
System\Collections\Generic\SortedSet.cs (3)
1903throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 1956throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 1969throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
System\Collections\Generic\Stack.cs (4)
349throw new InvalidOperationException(SR.InvalidOperation_EmptyStack); 375if (_version != _stack._version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 410throw new InvalidOperationException(_index == -2 ? SR.InvalidOperation_EnumNotStarted : SR.InvalidOperation_EnumEnded); 420if (_version != _stack._version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
System.Collections.Concurrent (14)
System\Collections\Concurrent\BlockingCollection.cs (7)
402throw new InvalidOperationException(SR.BlockingCollection_Completed); 430throw new InvalidOperationException 453throw new InvalidOperationException(SR.BlockingCollection_Completed); 478throw new InvalidOperationException(SR.BlockingCollection_Add_Failed); 515throw new InvalidOperationException(SR.BlockingCollection_CantTakeWhenDone); 539throw new InvalidOperationException(SR.BlockingCollection_CantTakeWhenDone); 700throw new InvalidOperationException
System\Collections\Concurrent\ConcurrentBag.cs (1)
1119throw new InvalidOperationException(SR.ConcurrentBag_Enumerator_EnumerationNotStartedOrAlreadyFinished);
System\Collections\Concurrent\OrderablePartitioner.cs (1)
171throw new InvalidOperationException("OrderablePartitioner_GetPartitions_WrongNumberOfPartitions");
System\Collections\Concurrent\PartitionerStatic.cs (5)
948throw new InvalidOperationException(SR.PartitionerStatic_CurrentCalledBeforeMoveNext); 1218throw new InvalidOperationException(SR.PartitionerStatic_CurrentCalledBeforeMoveNext); 1302throw new InvalidOperationException(SR.PartitionerStatic_CurrentCalledBeforeMoveNext); 1525throw new InvalidOperationException(SR.PartitionerStatic_CurrentCalledBeforeMoveNext); 1582throw new InvalidOperationException(SR.PartitionerStatic_CurrentCalledBeforeMoveNext);
System.Collections.Immutable (35)
System\Collections\Immutable\ImmutableArray.cs (1)
153throw new InvalidOperationException(SR.InvalidOperationOnDefaultArray);
System\Collections\Immutable\ImmutableArray_1.Builder.cs (1)
207throw new InvalidOperationException(SR.CapacityMustEqualCountOnMove);
System\Collections\Immutable\ImmutableArray_1.Enumerator.cs (1)
117throw new InvalidOperationException();
System\Collections\Immutable\ImmutableArray_1.Minimal.cs (1)
434throw new InvalidOperationException(SR.InvalidOperationOnDefaultArray);
System\Collections\Immutable\ImmutableDictionary_2.Enumerator.cs (1)
127throw new InvalidOperationException(SR.CollectionModifiedDuringEnumeration);
System\Collections\Immutable\ImmutableDictionary_2.HashBucket.cs (5)
67throw new InvalidOperationException(); 170throw new InvalidOperationException(); // unreachable 202throw new InvalidOperationException(); // unreachable 409_ => throw new InvalidOperationException(), 449throw new InvalidOperationException();
System\Collections\Immutable\ImmutableHashSet_1.Enumerator.cs (1)
127throw new InvalidOperationException(SR.CollectionModifiedDuringEnumeration);
System\Collections\Immutable\ImmutableHashSet_1.HashBucket.cs (2)
331_ => throw new InvalidOperationException(), 372throw new InvalidOperationException();
System\Collections\Immutable\ImmutableList_1.Enumerator.cs (2)
132throw new InvalidOperationException(); 262throw new InvalidOperationException(SR.CollectionModifiedDuringEnumeration);
System\Collections\Immutable\ImmutableQueue_1.cs (3)
129throw new InvalidOperationException(SR.InvalidEmptyOperation); 143throw new InvalidOperationException(SR.InvalidEmptyOperation); 189throw new InvalidOperationException(SR.InvalidEmptyOperation);
System\Collections\Immutable\ImmutableQueue_1.Enumerator.cs (4)
56throw new InvalidOperationException(); 70throw new InvalidOperationException(); 147throw new InvalidOperationException(); 161throw new InvalidOperationException();
System\Collections\Immutable\ImmutableSortedDictionary_2.Enumerator.cs (2)
98throw new InvalidOperationException(); 199throw new InvalidOperationException(SR.CollectionModifiedDuringEnumeration);
System\Collections\Immutable\ImmutableSortedSet_1.Enumerator.cs (2)
115throw new InvalidOperationException(); 205throw new InvalidOperationException(SR.CollectionModifiedDuringEnumeration);
System\Collections\Immutable\ImmutableStack_1.cs (3)
111throw new InvalidOperationException(SR.InvalidEmptyOperation); 128throw new InvalidOperationException(SR.InvalidEmptyOperation); 163throw new InvalidOperationException(SR.InvalidEmptyOperation);
System\Collections\Immutable\ImmutableStack_1.Enumerator.cs (2)
47throw new InvalidOperationException(); 116throw new InvalidOperationException();
System\Collections\Immutable\SortedInt32KeyNode.Enumerator.cs (1)
84throw new InvalidOperationException();
System\Collections\ThrowHelper.cs (1)
34throw new InvalidOperationException();
System\Linq\ImmutableArrayExtensions.cs (2)
643throw new InvalidOperationException(); 669throw new InvalidOperationException();
System.Collections.NonGeneric (21)
System\Collections\Queue.cs (6)
183throw new InvalidOperationException(SR.InvalidOperation_EmptyQueue); 199throw new InvalidOperationException(SR.InvalidOperation_EmptyQueue); 441if (_version != _q._version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 464throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 466throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 474if (_version != _q._version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
System\Collections\SortedList.cs (9)
818if (_version != _sortedList.version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 819if (_current == false) throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 826if (_version != _sortedList.version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 845if (_version != _sortedList.version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 846if (_current == false) throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 855if (_current == false) throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 870if (_version != _sortedList.version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 871if (_current == false) throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 878if (_version != _sortedList.version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
System\Collections\Stack.cs (6)
155throw new InvalidOperationException(SR.InvalidOperation_EmptyStack); 165throw new InvalidOperationException(SR.InvalidOperation_EmptyStack); 341if (_version != _stack._version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 367if (_index == -2) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 368if (_index == -1) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 375if (_version != _stack._version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
System.Collections.Specialized (13)
System\Collections\Specialized\BitVector32.cs (2)
115throw new InvalidOperationException(SR.BitVectorFull); 144throw new InvalidOperationException(SR.BitVectorFull);
System\Collections\Specialized\ListDictionary.cs (8)
292throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 304throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 316throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 326throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 344throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 433throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 443throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 461throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
System\Collections\Specialized\NameObjectCollectionBase.cs (3)
499throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 516throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 530throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen);
System.ComponentModel.Annotations (30)
System\ComponentModel\DataAnnotations\AssociatedMetadataTypeTypeDescriptor.cs (1)
162throw new InvalidOperationException(SR.Format(SR.AssociatedMetadataTypeTypeDescriptor_MetadataTypeContainsUnknownProperties,
System\ComponentModel\DataAnnotations\CustomValidationAttribute.cs (1)
291throw new InvalidOperationException(errorMessage);
System\ComponentModel\DataAnnotations\DataTypeAttribute.cs (1)
119throw new InvalidOperationException(SR.DataTypeAttribute_EmptyDataTypeString);
System\ComponentModel\DataAnnotations\DisplayAttribute.cs (3)
210throw new InvalidOperationException(SR.Format(SR.DisplayAttribute_PropertyNotSet, 239throw new InvalidOperationException(SR.Format(SR.DisplayAttribute_PropertyNotSet, 267throw new InvalidOperationException(SR.Format(SR.DisplayAttribute_PropertyNotSet,
System\ComponentModel\DataAnnotations\EnumDataTypeAttribute.cs (2)
26throw new InvalidOperationException(SR.EnumDataTypeAttribute_TypeCannotBeNull); 30throw new InvalidOperationException(SR.Format(SR.EnumDataTypeAttribute_TypeNeedsToBeAnEnum, EnumType.FullName));
System\ComponentModel\DataAnnotations\LengthAttribute.cs (2)
90throw new InvalidOperationException(SR.LengthAttribute_InvalidMinLength); 95throw new InvalidOperationException(SR.LengthAttribute_InvalidMaxLength);
System\ComponentModel\DataAnnotations\LocalizableString.cs (1)
153_cachedResult = () => { throw new InvalidOperationException(exceptionMessage); };
System\ComponentModel\DataAnnotations\MaxLengthAttribute.cs (1)
107throw new InvalidOperationException(SR.MaxLengthAttribute_InvalidMaxLength);
System\ComponentModel\DataAnnotations\MetadataTypeAttribute.cs (1)
39throw new InvalidOperationException(SR.MetadataTypeAttribute_TypeCannotBeNull);
System\ComponentModel\DataAnnotations\MinLengthAttribute.cs (1)
90throw new InvalidOperationException(SR.MinLengthAttribute_InvalidMinLength);
System\ComponentModel\DataAnnotations\RangeAttribute.cs (5)
113throw new InvalidOperationException(SR.Format(SR.RangeAttribute_MinGreaterThanMax, maximum, minimum)); 117throw new InvalidOperationException(SR.RangeAttribute_CannotUseExclusiveBoundsWhenTheyAreEqual); 196throw new InvalidOperationException(SR.RangeAttribute_Must_Set_Min_And_Max); 218throw new InvalidOperationException(SR.RangeAttribute_Must_Set_Operand_Type); 223throw new InvalidOperationException(SR.Format(SR.RangeAttribute_ArbitraryTypeNotIComparable,
System\ComponentModel\DataAnnotations\RegularExpressionAttribute.cs (1)
108throw new InvalidOperationException(
System\ComponentModel\DataAnnotations\StringLengthAttribute.cs (2)
88throw new InvalidOperationException(SR.StringLengthAttribute_InvalidMaxLength); 93throw new InvalidOperationException(SR.Format(SR.RangeAttribute_MinGreaterThanMax, MaximumLength, MinimumLength));
System\ComponentModel\DataAnnotations\UIHintAttribute.cs (4)
174throw new InvalidOperationException(SR.UIHintImplementation_NeedEvenNumberOfControlParameters); 183throw new InvalidOperationException(SR.Format(SR.UIHintImplementation_ControlParameterKeyIsNull, i)); 188throw new InvalidOperationException(SR.Format(SR.UIHintImplementation_ControlParameterKeyIsNotAString, 195throw new InvalidOperationException(SR.Format(SR.UIHintImplementation_ControlParameterKeyOccursMoreThanOnce,
System\ComponentModel\DataAnnotations\ValidationAttribute.cs (4)
236throw new InvalidOperationException( 243throw new InvalidOperationException( 283throw new InvalidOperationException(SR.Format(SR.ValidationAttribute_ResourceTypeDoesNotHaveProperty, 290throw new InvalidOperationException(SR.Format(SR.ValidationAttribute_ResourcePropertyNotStringType,
System.ComponentModel.Composition (21)
Microsoft\Internal\GenerationServices.cs (1)
155throw new InvalidOperationException(
Microsoft\Internal\LazyServices.cs (1)
18throw new InvalidOperationException(SR.Format(SR.LazyServices_LazyResolvesToNull, typeof(T), argument));
System\ComponentModel\Composition\CatalogReflectionContextAttribute.cs (1)
39throw new InvalidOperationException(SR.ReflectionContext_Type_Required, invalidCastException);
System\ComponentModel\Composition\ExceptionBuilder.cs (1)
16return new InvalidOperationException(Format(messageFormat, arguments));
System\ComponentModel\Composition\Hosting\AtomicComposition.cs (5)
179throw new InvalidOperationException(SR.InvalidOperation_RevertAndCompleteActionsMustNotThrow, new AggregateException(exceptions)); 214throw new InvalidOperationException(SR.InvalidOperation_RevertAndCompleteActionsMustNotThrow, new AggregateException(exceptions)); 262throw new InvalidOperationException(SR.AtomicComposition_AlreadyNested); 324throw new InvalidOperationException(SR.AtomicComposition_PartOfAnotherAtomicComposition); 333throw new InvalidOperationException(SR.AtomicComposition_AlreadyCompleted);
System\ComponentModel\Composition\Hosting\CatalogExportProvider.cs (2)
874throw new InvalidOperationException(SR.Format(SR.ObjectMustBeInitialized, "SourceProvider")); // NOLOC 905throw new InvalidOperationException(SR.ObjectAlreadyInitialized);
System\ComponentModel\Composition\Hosting\ComposablePartExportProvider.cs (3)
258throw new InvalidOperationException(SR.ReentrantCompose); 407throw new InvalidOperationException(SR.Format(SR.ObjectMustBeInitialized, "SourceProvider")); // NOLOC 433throw new InvalidOperationException(SR.ObjectAlreadyInitialized);
System\ComponentModel\Composition\Hosting\ExportProvider.GetExportOverrides.cs (1)
787throw new InvalidOperationException(SR.Format(SR.InvalidMetadataView, metadataViewType.Name));
System\ComponentModel\Composition\Primitives\ContractBasedImportDefinition.cs (1)
228throw new InvalidOperationException(
System\ComponentModel\Composition\ReflectionModel\LazyMemberInfo.cs (1)
85throw new InvalidOperationException(errorMessage);
System\ComponentModel\Composition\ReflectionModel\ReflectionComposablePart.cs (2)
373throw new InvalidOperationException(SR.Format( 386throw new InvalidOperationException(SR.InvalidOperation_DefinitionCannotBeRecomposed);
System\ComponentModel\Composition\ReflectionModel\ReflectionModelServices.cs (2)
419throw new InvalidOperationException( 445throw new InvalidOperationException(
System.ComponentModel.EventBasedAsync (5)
System\ComponentModel\AsyncCompletedEvent.cs (1)
27throw new InvalidOperationException(SR.Async_OperationCancelled);
System\ComponentModel\AsyncOperation.cs (1)
95throw new InvalidOperationException(SR.Async_OperationAlreadyCompleted);
System\ComponentModel\BackgroundWorker.cs (3)
47throw new InvalidOperationException(SR.BackgroundWorker_WorkerDoesntSupportCancellation); 97throw new InvalidOperationException(SR.BackgroundWorker_WorkerDoesntReportProgress); 121throw new InvalidOperationException(SR.BackgroundWorker_WorkerAlreadyRunning);
System.ComponentModel.TypeConverter (62)
System\ComponentModel\EventDescriptorCollection.cs (1)
450throw new InvalidOperationException();
System\ComponentModel\LicenseManager.cs (2)
56throw new InvalidOperationException(SR.LicMgrContextCannotBeChanged); 237throw new InvalidOperationException(SR.LicMgrAlreadyLocked);
System\ComponentModel\ListSortDescriptionCollection.cs (7)
31set => throw new InvalidOperationException(SR.CantModifyListSortDescriptionCollection); 43set => throw new InvalidOperationException(SR.CantModifyListSortDescriptionCollection); 46int IList.Add(object? value) => throw new InvalidOperationException(SR.CantModifyListSortDescriptionCollection); 48void IList.Clear() => throw new InvalidOperationException(SR.CantModifyListSortDescriptionCollection); 54void IList.Insert(int index, object? value) => throw new InvalidOperationException(SR.CantModifyListSortDescriptionCollection); 56void IList.Remove(object? value) => throw new InvalidOperationException(SR.CantModifyListSortDescriptionCollection); 58void IList.RemoveAt(int index) => throw new InvalidOperationException(SR.CantModifyListSortDescriptionCollection);
System\ComponentModel\MaskedTextProvider.cs (2)
668throw new InvalidOperationException(SR.MaskedTextProviderPasswordAndPromptCharError); 699throw new InvalidOperationException(SR.MaskedTextProviderPasswordAndPromptCharError);
System\ComponentModel\ReflectPropertyDescriptor.cs (1)
343throw new InvalidOperationException(SR.Format(SR.ErrorMissingPropertyAccessors, _componentClass.FullName + "." + Name));
System\ComponentModel\TypeDescriptor.cs (49)
3441if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3443if (attrs == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetAttributes")); 3464if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3486if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3507if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3509if (converter == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverter")); 3529if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3531if (converter == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverter")); 3552if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3572if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3594if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3614if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3616if (events == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 3635if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptorFromRegisteredType")); 3637if (events == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEventsFromRegisteredType")); 3662if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3664if (evts == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 3684if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3686if (properties == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 3705if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3707if (properties == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 3732if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3734if (properties == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 3756if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3804throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3807throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetAttributes")); 3831throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3856throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3882throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3885throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverter")); 3909throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3912throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverterFromRegisteredType")); 3937throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3963throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3991throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4016throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4019throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 4043throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptorFromRegisteredType")); 4046throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEventsFromRegisteredType")); 4071throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4074throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 4099throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4103throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 4127throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4132throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetPropertiesFromRegisteredType")); 4157throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4160throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 4184throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4208throw new InvalidOperationException(SR.Format(SR.TypeIsNotRegistered, type.FullName));
System.Composition.Hosting (1)
System\Composition\Hosting\Core\ExportDescriptorRegistryUpdate.cs (1)
34if (_updateFinished) throw new InvalidOperationException(SR.Update_already_executed);
System.Composition.TypedParts (1)
System\Composition\Hosting\ContainerConfiguration.cs (1)
76throw new InvalidOperationException(SR.ContainerConfiguration_DefaultConventionSet);
System.Console (13)
src\libraries\System.Private.CoreLib\src\System\IO\PersistedFiles.Unix.cs (1)
38throw new InvalidOperationException(SR.PersistedFiles_NoHomeDirectory);
System\Console.cs (1)
162throw new InvalidOperationException(SR.InvalidOperation_ConsoleKeyAvailableOnFile);
System\ConsolePal.Unix.cs (1)
128throw new InvalidOperationException(SR.InvalidOperation_ConsoleReadKeyOnFile);
System\TermInfo.cs (6)
175throw new InvalidOperationException(SR.IO_TermInfoInvalid); 315throw new InvalidOperationException(SR.IO_TermInfoInvalid); 337throw new InvalidOperationException(SR.IO_TermInfoInvalid); 374throw new InvalidOperationException(SR.InvalidOperation_PrintF); 386throw new InvalidOperationException(SR.InvalidOperation_PrintF); 411else throw new InvalidOperationException(SR.IO_TermInfoInvalid);
System\TermInfo.Database.cs (2)
53throw new InvalidOperationException(SR.Format(SR.IO_TermInfoInvalidMagicNumber, "O" + Convert.ToString(magic, 8))); // magic number was not recognized. Printing the magic number in octal. 67throw new InvalidOperationException(SR.IO_TermInfoInvalid);
System\TermInfo.DatabaseFactory.cs (2)
125throw new InvalidOperationException(SR.IO_TermInfoInvalid); 135throw new InvalidOperationException(SR.IO_TermInfoInvalid);
System.Data.Common (23)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
114InvalidOperationException e = new InvalidOperationException(error);
System\Data\Common\DefaultDataSource.cs (1)
24throw new InvalidOperationException("DbProviderFactory returned a null connection");
System\Data\DataException.cs (1)
343private static Exception _InvalidOperation(string error) => TraceExceptionAsReturnValue(new InvalidOperationException(error));
System\Data\DataSetUtil.cs (1)
40return new InvalidOperationException(message);
System\Data\SQLTypes\SqlXml.cs (1)
188throw new InvalidOperationException(SQLResource.ClosedXmlReaderMessage);
System\Xml\DataPointer.cs (1)
682throw new InvalidOperationException(SR.DataDom_Foliation);
System\Xml\XmlDataDocument.cs (16)
1102_ => throw new InvalidOperationException(SR.Format(SR.DataDom_CloneNode, dp.NodeType.ToString())), 1181throw new InvalidOperationException(SR.DataDom_MultipleLoad); 1838throw new InvalidOperationException(SR.DataDom_EnforceConstraintsShouldBeOff); 1893throw new InvalidOperationException(SR.DataDom_EnforceConstraintsShouldBeOff); 1945throw new InvalidOperationException(SR.DataDom_EnforceConstraintsShouldBeOff); 2191throw new InvalidOperationException(SR.DataDom_DataSetNameChange); 2196throw new InvalidOperationException(SR.DataDom_ColumnNameChange); 2198throw new InvalidOperationException(SR.DataDom_ColumnNamespaceChange); 2200throw new InvalidOperationException(SR.DataDom_ColumnMappingChange); 2205throw new InvalidOperationException(SR.DataDom_TableNameChange); 2207throw new InvalidOperationException(SR.DataDom_TableNamespaceChange); 2215throw new InvalidOperationException(SR.DataDom_TableColumnsChange); 2224throw new InvalidOperationException(SR.DataDom_DataSetTablesChange); 2235throw new InvalidOperationException(SR.DataDom_DataSetNestedRelationsChange); 2245throw new InvalidOperationException(SR.DataDom_DataSetNestedRelationsChange); 2254throw new InvalidOperationException(SR.DataDom_DataSetNestedRelationsChange);
System\Xml\XPathNodePointer.cs (1)
1304throw new InvalidOperationException(SR.DataDom_Foliation);
System.Diagnostics.DiagnosticSource (17)
System\Diagnostics\Activity.cs (12)
598NotifyError(new InvalidOperationException(SR.ActivitySetParentAlreadyStarted)); 602NotifyError(new InvalidOperationException(SR.SetParentIdOnActivityWithParent)); 606NotifyError(new InvalidOperationException(SR.ParentIdAlreadySet)); 628NotifyError(new InvalidOperationException(SR.ActivitySetParentAlreadyStarted)); 632NotifyError(new InvalidOperationException(SR.SetParentIdOnActivityWithParent)); 636NotifyError(new InvalidOperationException(SR.ParentIdAlreadySet)); 657NotifyError(new InvalidOperationException(SR.StartTimeNotUtc)); 677NotifyError(new InvalidOperationException(SR.EndTimeNotUtc)); 711NotifyError(new InvalidOperationException(SR.ActivityStartAlreadyStarted)); 766NotifyError(new InvalidOperationException(SR.ActivityNotStarted)); 967NotifyError(new InvalidOperationException(SR.SetFormatOnStartedActivity)); 1314NotifyError(new InvalidOperationException(SR.ActivityNotRunning));
System\Diagnostics\ActivityTagsCollection.cs (2)
155throw new InvalidOperationException(SR.Format(SR.KeyAlreadyExist, key)); 175throw new InvalidOperationException(SR.Format(SR.KeyAlreadyExist, item.Key));
System\Diagnostics\Metrics\Instrument.cs (2)
147throw new InvalidOperationException(SR.Format(SR.UnsupportedType, type)); 173throw new InvalidOperationException();
System\Diagnostics\Metrics\MeterListener.cs (1)
164throw new InvalidOperationException(SR.Format(SR.UnsupportedType, typeof(T)));
System.Diagnostics.Process (36)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
30throw new InvalidOperationException($"{nameof(GetHostName)}: {err}");
src\libraries\Common\src\System\IO\StringParser.cs (3)
50throw new InvalidOperationException(); 131throw new InvalidOperationException(); 318throw new InvalidOperationException();
System\Diagnostics\Process.cs (26)
562throw new InvalidOperationException(SR.CantGetProcessStartInfo); 575throw new InvalidOperationException(SR.CantSetProcessStartInfo); 684throw new InvalidOperationException(SR.CantGetStandardIn); 702throw new InvalidOperationException(SR.CantGetStandardOut); 711throw new InvalidOperationException(SR.CantMixSyncAsyncOperation); 728throw new InvalidOperationException(SR.CantGetStandardError); 737throw new InvalidOperationException(SR.CantMixSyncAsyncOperation); 949throw new InvalidOperationException(SR.NoAssociatedProcess); 962throw new InvalidOperationException(SR.ProcessIdRequired); 987throw new InvalidOperationException(SR.NoProcessInfo); 996throw new InvalidOperationException(SR.WaitTillExit); 1001throw new InvalidOperationException(SR.NoProcessHandle); 1247throw new InvalidOperationException(SR.FileNameMissing); 1251throw new InvalidOperationException(SR.StandardInputEncodingNotAllowed); 1255throw new InvalidOperationException(SR.StandardOutputEncodingNotAllowed); 1259throw new InvalidOperationException(SR.StandardErrorEncodingNotAllowed); 1263throw new InvalidOperationException(SR.ArgumentAndArgumentListInitialized); 1506throw new InvalidOperationException(SR.NoAssociatedProcess); 1593throw new InvalidOperationException(SR.CantMixSyncAsyncOperation); 1597throw new InvalidOperationException(SR.PendingAsyncOperation); 1605throw new InvalidOperationException(SR.CantGetStandardOut); 1631throw new InvalidOperationException(SR.CantMixSyncAsyncOperation); 1636throw new InvalidOperationException(SR.PendingAsyncOperation); 1645throw new InvalidOperationException(SR.CantGetStandardError); 1669throw new InvalidOperationException(SR.NoAsyncOperation); 1690throw new InvalidOperationException(SR.NoAsyncOperation);
System\Diagnostics\Process.NonUap.cs (1)
26throw new InvalidOperationException(SR.KillEntireProcessTree_DisallowedBecauseTreeContainsCallingProcess);
System\Diagnostics\Process.Unix.cs (3)
341throw new InvalidOperationException(SR.Format(SR.ProcessHasExited, _processId.ToString())); 383throw new InvalidOperationException(SR.CantRedirectStreams); 1063private static bool WaitForInputIdleCore(int _ /*milliseconds*/) => throw new InvalidOperationException(SR.InputIdleUnknownError);
System\Diagnostics\ProcessThread.cs (1)
136throw new InvalidOperationException(SR.WaitReasonUnavailable);
System\Diagnostics\ProcessThread.Linux.cs (1)
88throw new InvalidOperationException(SR.Format(SR.ThreadExited, Id));
System.Formats.Asn1 (22)
System\Formats\Asn1\AsnCharacterStringEncodings.cs (5)
270throw new InvalidOperationException(); 300throw new InvalidOperationException(); 339throw new InvalidOperationException(); 370throw new InvalidOperationException(); 386throw new InvalidOperationException();
System\Formats\Asn1\AsnDecoder.NamedBitList.cs (1)
348throw new InvalidOperationException();
System\Formats\Asn1\AsnWriter.cs (11)
106throw new InvalidOperationException(SR.AsnWriter_EncodeUnbalancedStack); 130throw new InvalidOperationException(SR.AsnWriter_EncodeUnbalancedStack); 189throw new InvalidOperationException(SR.AsnWriter_EncodeUnbalancedStack); 206throw new InvalidOperationException(SR.AsnWriter_EncodeUnbalancedStack); 310throw new InvalidOperationException(); 421throw new InvalidOperationException(new InvalidOperationException().Message, e); 489throw new InvalidOperationException(SR.AsnWriter_PopWrongTag); 497throw new InvalidOperationException(SR.AsnWriter_PopWrongTag); 772throw new InvalidOperationException(); 780throw new InvalidOperationException(SR.AsnWriter_PopWrongTag);
System\Formats\Asn1\AsnWriter.GeneralizedTime.cs (2)
89throw new InvalidOperationException(); 133throw new InvalidOperationException();
System\Formats\Asn1\AsnWriter.Text.cs (2)
110throw new InvalidOperationException(); 127throw new InvalidOperationException();
System\Formats\Asn1\AsnWriter.UtcTime.cs (1)
109throw new InvalidOperationException();
System.Formats.Cbor (40)
System\Formats\Cbor\Reader\CborReader.cs (7)
116throw new InvalidOperationException(SR.Cbor_Reader_NoMoreDataItemsToRead); 124throw new InvalidOperationException(SR.Cbor_Reader_NoMoreDataItemsToRead); 158throw new InvalidOperationException(SR.Format(SR.Cbor_Reader_MajorTypeMismatch, (int)result.MajorType)); 170throw new InvalidOperationException(SR.Cbor_NotAtEndOfIndefiniteLengthDataItem); 204throw new InvalidOperationException(SR.Cbor_Reader_IsAtRootContext); 211throw new InvalidOperationException(SR.Format(SR.Cbor_PopMajorTypeMismatch, (int)_currentMajorType.Value)); 216throw new InvalidOperationException(SR.Cbor_NotAtEndOfDefiniteLengthDataItem);
System\Formats\Cbor\Reader\CborReader.Integer.cs (2)
119throw new InvalidOperationException(SR.Format(SR.Cbor_Reader_MajorTypeMismatch, (int)header.MajorType)); 139throw new InvalidOperationException(SR.Format(SR.Cbor_Reader_MajorTypeMismatch, (int)header.MajorType));
System\Formats\Cbor\Reader\CborReader.Simple.cs (6)
45throw new InvalidOperationException(SR.Cbor_Reader_ReadingAsLowerPrecision); 48throw new InvalidOperationException(SR.Cbor_Reader_NotAFloatEncoding); 93throw new InvalidOperationException(SR.Cbor_Reader_NotAFloatEncoding); 115_ => throw new InvalidOperationException(SR.Cbor_Reader_NotABooleanEncoding), 143throw new InvalidOperationException(SR.Cbor_Reader_NotANullEncoding); 182throw new InvalidOperationException(SR.Cbor_Reader_NotASimpleValueEncoding);
System\Formats\Cbor\Reader\CborReader.Simple.netcoreapp.cs (2)
38throw new InvalidOperationException(SR.Cbor_Reader_ReadingAsLowerPrecision); 41throw new InvalidOperationException(SR.Cbor_Reader_NotAFloatEncoding);
System\Formats\Cbor\Reader\CborReader.SkipValue.cs (3)
35throw new InvalidOperationException(SR.Cbor_Reader_IsAtRootContext); 150throw new InvalidOperationException(SR.Format(SR.Cbor_Reader_Skip_InvalidState, state)); 158throw new InvalidOperationException(SR.Format(SR.Cbor_Reader_Skip_InvalidState, state));
System\Formats\Cbor\Reader\CborReader.String.cs (4)
110throw new InvalidOperationException(); 138throw new InvalidOperationException(SR.Cbor_Reader_NotIndefiniteLengthString); 270throw new InvalidOperationException(); 305throw new InvalidOperationException(SR.Cbor_Reader_NotIndefiniteLengthString);
System\Formats\Cbor\Reader\CborReader.Tag.cs (2)
165_ => throw new InvalidOperationException(SR.Cbor_Reader_InvalidBigNumEncoding), 275throw new InvalidOperationException(SR.Cbor_Reader_TagMismatch);
System\Formats\Cbor\Writer\CborWriter.Array.cs (1)
61throw new InvalidOperationException(SR.Format(SR.Cbor_ConformanceMode_IndefiniteLengthItemsNotSupported, ConformanceMode));
System\Formats\Cbor\Writer\CborWriter.cs (7)
225throw new InvalidOperationException(SR.Cbor_Writer_IncompleteCborDocument); 295throw new InvalidOperationException(SR.Format(SR.Cbor_PopMajorTypeMismatch, (int)_currentMajorType)); 299throw new InvalidOperationException(SR.Cbor_Reader_IsAtRootContext); 308throw new InvalidOperationException(SR.Format(SR.Cbor_PopMajorTypeMismatch, (int)CborMajorType.Tag)); 313throw new InvalidOperationException(SR.Cbor_NotAtEndOfDefiniteLengthDataItem); 365throw new InvalidOperationException(SR.Cbor_Writer_DefiniteLengthExceeded); 379throw new InvalidOperationException(SR.Cbor_Writer_CannotNestDataItemsInIndefiniteLengthStrings);
System\Formats\Cbor\Writer\CborWriter.Map.cs (3)
57throw new InvalidOperationException(SR.Cbor_Writer_MapIncompleteKeyValuePair); 80throw new InvalidOperationException(SR.Format(SR.Cbor_ConformanceMode_IndefiniteLengthItemsNotSupported, ConformanceMode)); 109throw new InvalidOperationException(SR.Format(SR.Cbor_ConformanceMode_ContainsDuplicateKeys, ConformanceMode));
System\Formats\Cbor\Writer\CborWriter.String.cs (2)
76throw new InvalidOperationException(SR.Format(SR.Cbor_ConformanceMode_IndefiniteLengthItemsNotSupported, ConformanceMode)); 173throw new InvalidOperationException(SR.Format(SR.Cbor_ConformanceMode_IndefiniteLengthItemsNotSupported, ConformanceMode));
System\Formats\Cbor\Writer\CborWriter.Tag.cs (1)
24throw new InvalidOperationException(SR.Format(SR.Cbor_ConformanceMode_TagsNotSupported, ConformanceMode));
System.Formats.Tar (9)
System\Formats\Tar\PosixTarEntry.cs (2)
61throw new InvalidOperationException(SR.TarEntryBlockOrCharacterExpected); 84throw new InvalidOperationException(SR.TarEntryBlockOrCharacterExpected);
System\Formats\Tar\SubReadStream.cs (1)
57throw new InvalidOperationException(SR.IO_NotSupported_UnseekableStream);
System\Formats\Tar\TarEntry.cs (5)
125throw new InvalidOperationException(SR.TarEntryHardLinkOrSymLinkExpected); 199throw new InvalidOperationException(SR.Format(SR.TarEntryTypeNotSupportedForExtracting, EntryType)); 233return Task.FromException(new InvalidOperationException(SR.Format(SR.TarEntryTypeNotSupportedForExtracting, EntryType))); 254throw new InvalidOperationException(SR.Format(SR.TarEntryDoesNotSupportDataStream, Name, EntryType)); 483throw new InvalidOperationException(SR.Format(SR.TarEntryTypeNotSupportedForExtracting, EntryType));
System\Formats\Tar\TarHeader.Read.cs (1)
616throw new InvalidOperationException(SR.Format(SR.TarSizeFieldTooLargeForEntryType, _typeFlag.ToString()));
System.IO.Compression (10)
src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (1)
264throw new InvalidOperationException("InitializationState != " + requiredState.ToString());
System\IO\Compression\DeflateManaged\DeflateManagedStream.cs (3)
252throw new InvalidOperationException(SR.InvalidBeginCall); 264throw new InvalidOperationException(SR.InvalidBeginCall); 273throw new InvalidOperationException(SR.CannotWriteToDeflateStream);
System\IO\Compression\DeflateZLib\DeflateStream.cs (3)
338throw new InvalidOperationException(SR.CannotReadFromDeflateStream); 347throw new InvalidOperationException(SR.CannotWriteToDeflateStream); 1082throw new InvalidOperationException(SR.InvalidBeginCall);
System\IO\Compression\ZipArchiveEntry.cs (3)
175throw new InvalidOperationException(SR.LengthAfterWrite); 288throw new InvalidOperationException(SR.LengthAfterWrite); 1131throw new InvalidOperationException(SR.DeletedEntry);
System.IO.Compression.Brotli (10)
System\IO\Compression\BrotliStream.cs (1)
197throw new InvalidOperationException(SR.InvalidBeginCall);
System\IO\Compression\dec\BrotliStream.Decompress.cs (3)
60throw new InvalidOperationException(SR.BrotliStream_Compress_UnsupportedOperation); 135throw new InvalidOperationException(SR.BrotliStream_Compress_UnsupportedOperation); 190throw new InvalidOperationException(SR.BrotliStream_Decompress_InvalidData);
System\IO\Compression\enc\BrotliEncoder.cs (2)
83throw new InvalidOperationException(SR.Format(SR.BrotliEncoder_InvalidSetParameter, "Quality")); 101throw new InvalidOperationException(SR.Format(SR.BrotliEncoder_InvalidSetParameter, "Window"));
System\IO\Compression\enc\BrotliStream.Compress.cs (4)
65throw new InvalidOperationException(SR.BrotliStream_Decompress_UnsupportedOperation); 76throw new InvalidOperationException(SR.BrotliStream_Compress_InvalidData); 130throw new InvalidOperationException(SR.BrotliStream_Decompress_UnsupportedOperation); 152throw new InvalidOperationException(SR.BrotliStream_Compress_InvalidData);
System.IO.IsolatedStorage (10)
System\IO\IsolatedStorage\IsolatedStorage.cs (8)
26throw new InvalidOperationException(SR.IsolatedStorage_ApplicationUndefined); 37throw new InvalidOperationException(SR.IsolatedStorage_AssemblyUndefined); 48throw new InvalidOperationException(SR.IsolatedStorage_AssemblyUndefined); 58throw new InvalidOperationException(SR.IsolatedStorage_CurrentSizeUndefined); 66throw new InvalidOperationException(SR.Format(SR.IsolatedStorage_QuotaIsUndefined, nameof(UsedSize))); 74throw new InvalidOperationException(SR.Format(SR.IsolatedStorage_QuotaIsUndefined, nameof(AvailableFreeSpace))); 87throw new InvalidOperationException(SR.Format(SR.IsolatedStorage_QuotaIsUndefined, nameof(MaximumSize))); 98throw new InvalidOperationException(SR.Format(SR.IsolatedStorage_QuotaIsUndefined, nameof(Quota)));
System\IO\IsolatedStorage\IsolatedStorageFile.cs (2)
396throw new InvalidOperationException(); 566throw new InvalidOperationException(SR.IsolatedStorage_StoreNotOpen);
System.IO.Pipelines (11)
System\IO\Pipelines\ThrowHelper.cs (11)
24public static InvalidOperationException CreateInvalidOperationException_AlreadyReading() => new InvalidOperationException(SR.ReadingIsInProgress); 29public static InvalidOperationException CreateInvalidOperationException_NoReadToComplete() => new InvalidOperationException(SR.NoReadingOperationToComplete); 34public static InvalidOperationException CreateInvalidOperationException_NoConcurrentOperation() => new InvalidOperationException(SR.ConcurrentOperationsNotSupported); 39public static InvalidOperationException CreateInvalidOperationException_GetResultNotCompleted() => new InvalidOperationException(SR.GetResultBeforeCompleted); 45public static InvalidOperationException CreateInvalidOperationException_NoWritingAllowed() => new InvalidOperationException(SR.WritingAfterCompleted); 50public static InvalidOperationException CreateInvalidOperationException_NoReadingAllowed() => new InvalidOperationException(SR.ReadingAfterCompleted); 55public static InvalidOperationException CreateInvalidOperationException_InvalidExaminedPosition() => new InvalidOperationException(SR.InvalidExaminedPosition); 60public static InvalidOperationException CreateInvalidOperationException_InvalidExaminedOrConsumedPosition() => new InvalidOperationException(SR.InvalidExaminedOrConsumedPosition); 65public static InvalidOperationException CreateInvalidOperationException_AdvanceToInvalidCursor() => new InvalidOperationException(SR.AdvanceToInvalidCursor); 70public static InvalidOperationException CreateInvalidOperationException_ResetIncompleteReaderWriter() => new InvalidOperationException(SR.ReaderAndWriterHasToBeCompleted); 85public static InvalidOperationException CreateInvalidOperationException_InvalidZeroByteRead() => new InvalidOperationException(SR.InvalidZeroByteRead);
System.IO.Pipes (22)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
30throw new InvalidOperationException($"{nameof(GetHostName)}: {err}");
System\IO\Pipes\NamedPipeClientStream.cs (2)
220throw new InvalidOperationException(SR.InvalidOperation_PipeNotYetConnected); 233throw new InvalidOperationException(SR.InvalidOperation_PipeAlreadyConnected);
System\IO\Pipes\NamedPipeServerStream.cs (3)
194throw new InvalidOperationException(SR.InvalidOperation_PipeNotYetConnected); 198throw new InvalidOperationException(SR.InvalidOperation_PipeAlreadyDisconnected); 202throw new InvalidOperationException(SR.InvalidOperation_PipeHandleNotSet);
System\IO\Pipes\NamedPipeServerStream.Unix.cs (4)
59throw new InvalidOperationException(SR.InvalidOperation_PipeAlreadyConnected); 73throw new InvalidOperationException(SR.InvalidOperation_PipeAlreadyConnected); 167throw new InvalidOperationException(SR.InvalidOperation_PipeHandleNotSet); 206throw new InvalidOperationException(SR.InvalidOperation_PipeHandleNotSet);
System\IO\Pipes\PipeStream.cs (12)
197throw new InvalidOperationException(SR.InvalidOperation_PipeNotYetConnected); 201throw new InvalidOperationException(SR.InvalidOperation_PipeDisconnected); 205throw new InvalidOperationException(SR.InvalidOperation_PipeHandleNotSet); 216throw new InvalidOperationException(SR.InvalidOperation_PipeReadModeNotMessage); 236throw new InvalidOperationException(SR.InvalidOperation_PipeHandleNotSet); 324throw new InvalidOperationException(SR.InvalidOperation_PipeHandleNotSet); 341throw new InvalidOperationException(SR.InvalidOperation_PipeNotYetConnected); 345throw new InvalidOperationException(SR.InvalidOperation_PipeDisconnected); 349throw new InvalidOperationException(SR.InvalidOperation_PipeHandleNotSet); 365throw new InvalidOperationException(SR.InvalidOperation_PipeNotYetConnected); 369throw new InvalidOperationException(SR.InvalidOperation_PipeDisconnected); 373throw new InvalidOperationException(SR.InvalidOperation_PipeHandleNotSet);
System.Linq (4)
System\Linq\ThrowHelper.cs (4)
18internal static void ThrowMoreThanOneElementException() => throw new InvalidOperationException(SR.MoreThanOneElement); 21internal static void ThrowMoreThanOneMatchException() => throw new InvalidOperationException(SR.MoreThanOneMatch); 24internal static void ThrowNoElementsException() => throw new InvalidOperationException(SR.NoElements); 27internal static void ThrowNoMatchException() => throw new InvalidOperationException(SR.NoMatch);
System.Linq.Expressions (52)
System\Linq\Expressions\DebugViewWriter.cs (1)
350throw new InvalidOperationException();
System\Linq\Expressions\Error.cs (43)
33return new InvalidOperationException(Strings.InvalidMetaObjectCreated(p0)); 61return new InvalidOperationException(Strings.CollectionModifiedWhileEnumerating); 82return new InvalidOperationException(Strings.BinderNotCompatibleWithCallSite(p0, p1, p2)); 89return new InvalidOperationException(Strings.DynamicBindingNeedsRestrictions(p0, p1)); 110return new InvalidOperationException(Strings.BindingCannotBeNull); 145return new InvalidOperationException(Strings.TypeParameterIsNotDelegate(p0)); 187return new InvalidOperationException(Strings.NoOrInvalidRuleProduced); 401return new InvalidOperationException(Strings.ExtensionNodeMustOverrideProperty(p0)); 422return new InvalidOperationException(Strings.CoercionOperatorNotDefined(p0, p1)); 429return new InvalidOperationException(Strings.UnaryOperatorNotDefined(p0, p1)); 436return new InvalidOperationException(Strings.BinaryOperatorNotDefined(p0, p1, p2)); 443return new InvalidOperationException(Strings.ReferenceEqualityNotDefined(p0, p1)); 450return new InvalidOperationException(Strings.OperandTypesDoNotMatchParameters(p0, p1)); 457return new InvalidOperationException(Strings.OverloadOperatorTypeDoesNotMatchConversionType(p0, p1)); 464return new InvalidOperationException(Strings.ConversionIsNotSupportedForArithmeticTypes); 584return new InvalidOperationException(Strings.CannotAutoInitializeValueTypeElementThroughProperty(p0)); 591return new InvalidOperationException(Strings.CannotAutoInitializeValueTypeMemberThroughProperty(p0)); 605return new InvalidOperationException(Strings.CoalesceUsedOnNonNullType); 612return new InvalidOperationException(Strings.ExpressionTypeCannotInitializeArrayType(p0, p1)); 964return new InvalidOperationException(Strings.MethodWithArgsDoesNotExistOnType(p0, p1)); 971return new InvalidOperationException(Strings.GenericMethodWithArgsDoesNotExistOnType(p0, p1)); 978return new InvalidOperationException(Strings.MethodWithMoreThanOneMatch(p0, p1)); 985return new InvalidOperationException(Strings.PropertyWithMoreThanOneMatch(p0, p1)); 1013return new InvalidOperationException(Strings.LabelTargetAlreadyDefined(p0)); 1020return new InvalidOperationException(Strings.LabelTargetUndefined(p0)); 1027return new InvalidOperationException(Strings.ControlCannotLeaveFinally); 1034return new InvalidOperationException(Strings.ControlCannotLeaveFilterTest); 1041return new InvalidOperationException(Strings.AmbiguousJump(p0)); 1048return new InvalidOperationException(Strings.ControlCannotEnterTry); 1055return new InvalidOperationException(Strings.ControlCannotEnterExpression); 1062return new InvalidOperationException(Strings.NonLocalJumpWithValue(p0)); 1093return new InvalidOperationException(Strings.InvalidLvalue(p0)); 1101return new InvalidOperationException(Strings.UndefinedVariable(p0, p1, p2)); 1108return new InvalidOperationException(Strings.CannotCloseOverByRef(p0, p1)); 1115return new InvalidOperationException(Strings.UnexpectedVarArgsCall(p0)); 1122return new InvalidOperationException(Strings.RethrowRequiresCatch); 1129return new InvalidOperationException(Strings.TryNotAllowedInFilter); 1136return new InvalidOperationException(Strings.MustRewriteToSameNode(p0, p1, p2)); 1143return new InvalidOperationException(Strings.MustRewriteChildToSameType(p0, p1, p2)); 1150return new InvalidOperationException(Strings.MustRewriteWithoutMethod(p0, p1)); 1221return new InvalidOperationException(Strings.NonAbstractConstructorRequired); 1237return new InvalidOperationException(Strings.EnumerationIsDone); 1317return new InvalidOperationException(Strings.IncorrectNumberOfLambdaArguments);
System\Linq\Expressions\ExpressionStringBuilder.cs (3)
263throw new InvalidOperationException(); 626throw new InvalidOperationException(); 693_ => throw new InvalidOperationException(),
System\Linq\Expressions\Interpreter\CallInstruction.Generated.cs (2)
187throw new InvalidOperationException(); 210throw new InvalidOperationException();
System\Linq\Expressions\Interpreter\LabelInfo.cs (1)
197throw new InvalidOperationException();
System\Linq\Expressions\Interpreter\LightCompiler.cs (2)
395throw new InvalidOperationException("unbound variable: " + expr); 2765throw new InvalidOperationException("MemberNotFieldOrProperty");
System.Linq.Parallel (38)
System\Linq\Parallel\Merging\AsynchronousChannelMergeEnumerator.cs (1)
73throw new InvalidOperationException(SR.PLINQ_CommonEnumerator_Current_NotStarted);
System\Linq\Parallel\Merging\OrderPreservingPipeliningMergeHelper.cs (1)
176throw new InvalidOperationException();
System\Linq\Parallel\Merging\SynchronousChannelMergeEnumerator.cs (1)
61throw new InvalidOperationException(SR.PLINQ_CommonEnumerator_Current_NotStarted);
System\Linq\Parallel\QueryOperators\AssociativeAggregationOperator.cs (1)
148throw new InvalidOperationException(SR.NoElements);
System\Linq\Parallel\QueryOperators\Inlined\DecimalAverageAggregationOperator.cs (1)
48singularExceptionToThrow = new InvalidOperationException(SR.NoElements);
System\Linq\Parallel\QueryOperators\Inlined\DecimalMinMaxAggregationOperator.cs (1)
52singularExceptionToThrow = new InvalidOperationException(SR.NoElements);
System\Linq\Parallel\QueryOperators\Inlined\DoubleAverageAggregationOperator.cs (1)
48singularExceptionToThrow = new InvalidOperationException(SR.NoElements);
System\Linq\Parallel\QueryOperators\Inlined\DoubleMinMaxAggregationOperator.cs (1)
58singularExceptionToThrow = new InvalidOperationException(SR.NoElements);
System\Linq\Parallel\QueryOperators\Inlined\FloatAverageAggregationOperator.cs (1)
48singularExceptionToThrow = new InvalidOperationException(SR.NoElements);
System\Linq\Parallel\QueryOperators\Inlined\FloatMinMaxAggregationOperator.cs (1)
57singularExceptionToThrow = new InvalidOperationException(SR.NoElements);
System\Linq\Parallel\QueryOperators\Inlined\IntAverageAggregationOperator.cs (1)
48singularExceptionToThrow = new InvalidOperationException(SR.NoElements);
System\Linq\Parallel\QueryOperators\Inlined\IntMinMaxAggregationOperator.cs (1)
52singularExceptionToThrow = new InvalidOperationException(SR.NoElements);
System\Linq\Parallel\QueryOperators\Inlined\LongAverageAggregationOperator.cs (1)
48singularExceptionToThrow = new InvalidOperationException(SR.NoElements);
System\Linq\Parallel\QueryOperators\Inlined\LongMinMaxAggregationOperator.cs (1)
52singularExceptionToThrow = new InvalidOperationException(SR.NoElements);
System\Linq\Parallel\QueryOperators\PartitionerQueryOperator.cs (6)
153throw new InvalidOperationException(SR.PartitionerQueryOperator_NullPartitionList); 158throw new InvalidOperationException(SR.PartitionerQueryOperator_WrongNumberOfPartitions); 166throw new InvalidOperationException(SR.PartitionerQueryOperator_NullPartition); 179throw new InvalidOperationException(SR.PartitionerQueryOperator_NullPartitionList); 184throw new InvalidOperationException(SR.PartitionerQueryOperator_WrongNumberOfPartitions); 192throw new InvalidOperationException(SR.PartitionerQueryOperator_NullPartition);
System\Linq\Parallel\QueryOperators\QueryOpeningEnumerator.cs (2)
63throw new InvalidOperationException(SR.PLINQ_CommonEnumerator_Current_NotStarted); 141throw new InvalidOperationException(SR.PLINQ_EnumerationPreviouslyFailed);
System\Linq\Parallel\QueryOperators\QuerySettings.cs (5)
103throw new InvalidOperationException(SR.ParallelQuery_DuplicateTaskScheduler); 108throw new InvalidOperationException(SR.ParallelQuery_DuplicateDOP); 113throw new InvalidOperationException(SR.ParallelQuery_DuplicateWithCancellation); 118throw new InvalidOperationException(SR.ParallelQuery_DuplicateExecutionMode); 123throw new InvalidOperationException(SR.ParallelQuery_DuplicateMergeOptions);
System\Linq\Parallel\QueryOperators\Unary\ForAllOperator.cs (1)
106throw new InvalidOperationException();
System\Linq\Parallel\Utils\ExchangeUtilities.cs (3)
44throw new InvalidOperationException(SR.ParallelPartitionable_NullReturn); 48throw new InvalidOperationException(SR.ParallelPartitionable_IncorretElementCount); 59throw new InvalidOperationException(SR.ParallelPartitionable_NullElement);
System\Linq\Parallel\Utils\FixedMaxHeap.cs (1)
74throw new InvalidOperationException(SR.NoElements);
System\Linq\ParallelEnumerable.cs (6)
159throw new InvalidOperationException(SR.ParallelQuery_PartitionerNotOrderable); 164throw new InvalidOperationException(SR.ParallelQuery_InvalidAsOrderedCall); 196throw new InvalidOperationException(SR.ParallelQuery_InvalidNonGenericAsOrderedCall); 1563throw new InvalidOperationException(SR.NoElements); 5348throw new InvalidOperationException(SR.MoreThanOneMatch); 5366throw new InvalidOperationException(SR.NoElements);
System.Linq.Queryable (3)
System\Linq\Error.cs (3)
18new InvalidOperationException(Strings.NoMethodOnType(name, type)); 21new InvalidOperationException(Strings.NoMethodOnTypeMatchingArguments(name, type)); 24new InvalidOperationException(Strings.EnumeratingNullEnumerableExpression());
System.Memory (3)
src\libraries\Common\src\System\Buffers\ArrayBufferWriter.cs (1)
245throw new InvalidOperationException(SR.Format(SR.BufferWriterAdvancedTooFar, capacity));
System\ThrowHelper.cs (2)
40private static InvalidOperationException CreateInvalidOperationException() { return new InvalidOperationException(); } 45private static InvalidOperationException CreateInvalidOperationException_EndPositionNotReached() { return new InvalidOperationException(SR.EndPositionNotReached); }
System.Net.Http (24)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Initialization.cs (1)
42throw new InvalidOperationException();
System\Net\Http\DelegatingHandler.cs (2)
78throw new InvalidOperationException(SR.net_http_operation_started); 88throw new InvalidOperationException(SR.net_http_handler_not_assigned);
System\Net\Http\Headers\HeaderDescriptor.cs (1)
56public override bool Equals(object? obj) => throw new InvalidOperationException(); // Ensure this is never called, to avoid boxing
System\Net\Http\Headers\HttpHeaders.cs (3)
208throw new InvalidOperationException(SR.net_http_headers_not_found); 954throw new InvalidOperationException(SR.Format(SR.net_http_headers_not_allowed_header_name, descriptor.Name)); 1045throw new InvalidOperationException(SR.Format(SR.net_http_headers_not_allowed_header_name, name));
System\Net\Http\HttpClient.cs (5)
576throw new InvalidOperationException(SR.net_http_handler_noresponse); 736throw new InvalidOperationException(SR.net_http_operation_started); 744throw new InvalidOperationException(SR.net_http_client_request_already_sent); 753throw new InvalidOperationException(SR.net_http_client_invalid_requesturi); 766throw new InvalidOperationException(SR.net_http_client_invalid_requesturi);
System\Net\Http\HttpClientHandler.cs (1)
288throw new InvalidOperationException(SR.Format(SR.net_http_invalid_enable_first, nameof(ClientCertificateOptions), nameof(ClientCertificateOption.Manual)));
System\Net\Http\HttpContent.cs (2)
201throw new InvalidOperationException(SR.net_http_content_invalid_charset, e); 696var e = new InvalidOperationException(SR.net_http_content_no_task_returned);
System\Net\Http\MessageProcessingHandler.cs (1)
80sendState.TrySetException(ExceptionDispatchInfo.SetCurrentStackTrace(new InvalidOperationException(SR.net_http_handler_noresponse)));
System\Net\Http\SocketsHttpHandler\DecompressionHandler.cs (1)
168throw new InvalidOperationException(SR.net_http_content_stream_already_read);
System\Net\Http\SocketsHttpHandler\HttpConnectionResponseContent.cs (1)
29throw new InvalidOperationException(SR.net_http_content_stream_already_read);
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (3)
31throw new InvalidOperationException(SR.net_http_operation_started); 624new InvalidOperationException(SR.net_http_chunked_not_allowed_with_empty_content)); 655return new InvalidOperationException(SR.net_http_client_invalid_requesturi);
System\Net\Http\StreamContent.cs (3)
132throw new InvalidOperationException(SR.net_http_content_stream_already_read); 185get => throw new InvalidOperationException(SR.net_http_content_readonly_stream); 186set => throw new InvalidOperationException(SR.net_http_content_readonly_stream);
System.Net.Http.Json (1)
System\Net\Http\Json\JsonHelpers.cs (1)
50throw new InvalidOperationException(SR.CharSetInvalid, e);
System.Net.HttpListener (21)
src\libraries\Common\src\System\Net\LazyAsyncResult.cs (3)
112throw new InvalidOperationException("get_AsyncWaitHandle called in protected state"); 196throw new InvalidOperationException("get_CompletedSynchronously called in protected state"); 220throw new InvalidOperationException("get_IsCompleted called in protected state");
System\Net\HttpListenerRequest.cs (4)
233throw new InvalidOperationException(SR.Format(SR.net_listener_callinprogress, $"{nameof(GetClientCertificate)}()/{nameof(BeginGetClientCertificate)}()")); 248throw new InvalidOperationException(SR.Format(SR.net_listener_callinprogress, $"{nameof(GetClientCertificate)}()/{nameof(BeginGetClientCertificate)}()")); 270throw new InvalidOperationException(SR.Format(SR.net_listener_mustcall, "GetClientCertificate()/BeginGetClientCertificate()")); 272throw new InvalidOperationException(SR.Format(SR.net_listener_mustcompletecall, "GetClientCertificate()/BeginGetClientCertificate()"));
System\Net\HttpListenerResponse.cs (1)
277throw new InvalidOperationException(SR.net_rspsubmitted);
System\Net\HttpRequestStream.cs (3)
54public override void Write(byte[] buffer, int offset, int count) => throw new InvalidOperationException(SR.net_readonlystream); 58throw new InvalidOperationException(SR.net_readonlystream); 61public override void EndWrite(IAsyncResult asyncResult) => throw new InvalidOperationException(SR.net_readonlystream);
System\Net\HttpResponseStream.cs (3)
34public override int Read(byte[] buffer, int offset, int size) => throw new InvalidOperationException(SR.net_writeonlystream); 38throw new InvalidOperationException(SR.net_writeonlystream); 41public override int EndRead(IAsyncResult asyncResult) => throw new InvalidOperationException(SR.net_writeonlystream);
System\Net\Managed\ChunkedInputStream.cs (1)
163throw new InvalidOperationException(SR.Format(SR.net_io_invalidendcall, nameof(EndRead)));
System\Net\Managed\HttpListener.Managed.cs (4)
278throw new InvalidOperationException(SR.Format(SR.net_listener_mustcall, "Start()")); 314throw new InvalidOperationException(SR.Format(SR.net_io_invalidendcall, nameof(EndGetContext))); 344throw new InvalidOperationException(SR.Format(SR.net_listener_mustcall, "Start()")); 348throw new InvalidOperationException(SR.Format(SR.net_listener_mustcall, "AddPrefix()"));
System\Net\Managed\HttpListenerRequest.Managed.cs (1)
367throw new InvalidOperationException(SR.Format(SR.net_io_invalidendcall, nameof(EndGetClientCertificate)));
System\Net\Managed\HttpRequestStream.Managed.cs (1)
176throw new InvalidOperationException(SR.Format(SR.net_io_invalidendcall, nameof(EndRead)));
System.Net.Mail (38)
src\libraries\Common\src\System\Net\ContextAwareResult.cs (2)
134throw new InvalidOperationException(SR.net_completed_result); 157throw new InvalidOperationException(SR.net_completed_result);
src\libraries\Common\src\System\Net\LazyAsyncResult.cs (3)
112throw new InvalidOperationException("get_AsyncWaitHandle called in protected state"); 196throw new InvalidOperationException("get_CompletedSynchronously called in protected state"); 220throw new InvalidOperationException("get_IsCompleted called in protected state");
System\Net\Mail\MailPriority.cs (1)
318throw new InvalidOperationException(SR.Format(SR.net_io_invalidendcall, nameof(EndSend)));
System\Net\Mail\SmtpClient.cs (13)
164throw new InvalidOperationException(SR.SmtpInvalidOperationDuringSend); 189throw new InvalidOperationException(SR.SmtpInvalidOperationDuringSend); 212throw new InvalidOperationException(SR.SmtpInvalidOperationDuringSend); 230throw new InvalidOperationException(SR.SmtpInvalidOperationDuringSend); 253throw new InvalidOperationException(SR.SmtpInvalidOperationDuringSend); 422throw new InvalidOperationException(SR.net_inasync); 432throw new InvalidOperationException(SR.SmtpFromRequired); 459throw new InvalidOperationException(SR.SmtpRecipientRequired); 554throw new InvalidOperationException(SR.net_inasync); 566throw new InvalidOperationException(SR.SmtpFromRequired); 593throw new InvalidOperationException(SR.SmtpRecipientRequired); 816throw new InvalidOperationException(SR.UnspecifiedHost); 820throw new InvalidOperationException(SR.InvalidPort);
System\Net\Mail\SmtpCommands.cs (8)
288throw new InvalidOperationException(SR.SmtpDataStreamOpen); 333throw new InvalidOperationException(SR.SmtpDataStreamOpen); 386throw new InvalidOperationException(SR.SmtpDataStreamOpen); 440throw new InvalidOperationException(SR.SmtpDataStreamOpen); 498throw new InvalidOperationException(SR.SmtpDataStreamOpen); 557throw new InvalidOperationException(SR.SmtpDataStreamOpen); 626throw new InvalidOperationException(SR.SmtpDataStreamOpen); 649throw new InvalidOperationException(SR.SmtpDataStreamOpen);
System\Net\Mail\SmtpConnection.cs (2)
189throw new InvalidOperationException(SR.SmtpAlreadyConnected); 417throw new InvalidOperationException(SR.SmtpAlreadyConnected);
System\Net\Mime\Base64Encoder.cs (1)
37throw new InvalidOperationException();
System\Net\Mime\BaseWriter.cs (2)
50throw new InvalidOperationException(SR.MailWriterIsInContent); 106throw new InvalidOperationException(SR.MailWriterIsInContent);
System\Net\Mime\MimeBasePart.cs (1)
213throw new InvalidOperationException(SR.Format(SR.net_io_invalidendcall, nameof(EndSend)));
System\Net\Mime\MimePart.cs (1)
360throw new InvalidOperationException(SR.MimePartCantResetStream);
System\Net\TrackingStringDictionary.cs (4)
28throw new InvalidOperationException(SR.MailCollectionIsReadOnly); 39throw new InvalidOperationException(SR.MailCollectionIsReadOnly); 50throw new InvalidOperationException(SR.MailCollectionIsReadOnly); 64throw new InvalidOperationException(SR.MailCollectionIsReadOnly);
System.Net.NameResolution (1)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
30throw new InvalidOperationException($"{nameof(GetHostName)}: {err}");
System.Net.NetworkInformation (8)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetDomainName.cs (1)
31throw new InvalidOperationException($"{nameof(GetDomainName)}: {err}");
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
30throw new InvalidOperationException($"{nameof(GetHostName)}: {err}");
src\libraries\Common\src\System\IO\RowConfigReader.cs (3)
52throw new InvalidOperationException("Couldn't get next value with key " + key); 174throw new InvalidOperationException("Unable to parse value " + value + " of key " + key + " as an Int32."); 198throw new InvalidOperationException("Unable to parse value " + value + " of key " + key + " as an Int64.");
src\libraries\Common\src\System\IO\StringParser.cs (3)
50throw new InvalidOperationException(); 131throw new InvalidOperationException(); 318throw new InvalidOperationException();
System.Net.Ping (1)
System\Net\NetworkInformation\Ping.cs (1)
97throw new InvalidOperationException(SR.net_inasync);
System.Net.Primitives (5)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetDomainName.cs (1)
31throw new InvalidOperationException($"{nameof(GetDomainName)}: {err}");
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
30throw new InvalidOperationException($"{nameof(GetHostName)}: {err}");
System\Net\CredentialCache.cs (3)
212throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 216throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 227throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
System.Net.Quic (9)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Initialization.cs (1)
42throw new InvalidOperationException();
src\libraries\Common\src\System\Net\StreamBuffer.cs (3)
85throw new InvalidOperationException(); 102throw new InvalidOperationException(); 335throw new InvalidOperationException("Concurrent use is not supported");
System\Net\Quic\QuicConnection.cs (1)
468throw new InvalidOperationException(SR.net_quic_accept_not_allowed);
System\Net\Quic\QuicStream.cs (4)
271throw new InvalidOperationException(SR.net_quic_reading_notallowed); 294throw new InvalidOperationException(SR.Format(SR.net_io_invalidnestedcall, "read")); 358throw new InvalidOperationException(SR.net_quic_writing_notallowed); 376throw new InvalidOperationException(SR.Format(SR.net_io_invalidnestedcall, "write"));
System.Net.Requests (46)
src\libraries\Common\src\System\Net\ContextAwareResult.cs (2)
134throw new InvalidOperationException(SR.net_completed_result); 157throw new InvalidOperationException(SR.net_completed_result);
src\libraries\Common\src\System\Net\LazyAsyncResult.cs (3)
112throw new InvalidOperationException("get_AsyncWaitHandle called in protected state"); 196throw new InvalidOperationException("get_CompletedSynchronously called in protected state"); 220throw new InvalidOperationException("get_IsCompleted called in protected state");
System\Net\FileWebRequest.cs (3)
127throw new InvalidOperationException(SR.net_reqsubmitted); 134throw new InvalidOperationException(SR.net_repcall); 186throw new InvalidOperationException(SR.net_repcall);
System\Net\FtpWebRequest.cs (19)
268throw new InvalidOperationException(SR.net_reqsubmitted); 298throw new InvalidOperationException(SR.net_reqsubmitted); 321throw new InvalidOperationException(SR.net_reqsubmitted); 356throw new InvalidOperationException(SR.net_reqsubmitted); 394throw new InvalidOperationException(SR.net_reqsubmitted); 417throw new InvalidOperationException(SR.net_reqsubmitted); 449throw new InvalidOperationException(SR.net_reqsubmitted); 466throw new InvalidOperationException(SR.net_reqsubmitted); 534throw new InvalidOperationException(SR.net_repcall); 619throw new InvalidOperationException(SR.net_repcall); 690throw new InvalidOperationException(SR.Format(SR.net_io_invalidendcall, "EndGetResponse")); 717throw new InvalidOperationException(SR.net_repcall); 770throw new InvalidOperationException(SR.net_repcall); 814throw new InvalidOperationException(SR.Format(SR.net_io_invalidendcall, "EndGetResponse")); 1467throw new InvalidOperationException(SR.net_reqsubmitted); 1484throw new InvalidOperationException(SR.net_reqsubmitted); 1504throw new InvalidOperationException(SR.net_reqsubmitted); 1520throw new InvalidOperationException(SR.net_reqsubmitted); 1552throw new InvalidOperationException(SR.net_reqsubmitted);
System\Net\HttpWebRequest.cs (19)
253throw new InvalidOperationException(SR.net_reqsubmitted); 295throw new InvalidOperationException(SR.net_reqsubmitted); 334throw new InvalidOperationException(SR.net_writestarted); 374throw new InvalidOperationException(SR.net_writestarted); 479throw new InvalidOperationException(SR.net_needchunked); 520throw new InvalidOperationException(SR.net_writestarted); 761throw new InvalidOperationException(SR.net_writestarted); 849throw new InvalidOperationException(SR.net_reqsubmitted); 904throw new InvalidOperationException(SR.net_reqsubmitted); 967throw new InvalidOperationException(SR.net_writestarted); 987throw new InvalidOperationException(SR.net_reqsubmitted); 1084throw new InvalidOperationException(SR.net_reqsubmitted); 1128throw new InvalidOperationException(SR.net_repcall); 1150throw new InvalidOperationException(SR.Format(SR.net_io_invalidendcall, "EndGetRequestStream")); 1170throw new InvalidOperationException(SR.net_reqsubmitted); 1401throw new InvalidOperationException(SR.net_repcall); 1421throw new InvalidOperationException(SR.Format(SR.net_io_invalidendcall, "EndGetResponse")); 1508throw new InvalidOperationException(SR.net_rangetype); 1527throw new InvalidOperationException(SR.net_rangetype);
System.Net.Security (41)
src\libraries\Common\src\Interop\Unix\System.Net.Security.Native\Interop.NetSecurityNative.IsNtlmInstalled.cs (1)
29throw new InvalidOperationException();
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Initialization.cs (1)
42throw new InvalidOperationException();
System\Net\NegotiateAuthenticationPal.ManagedNtlm.cs (4)
218public override IIdentity RemoteIdentity => throw new InvalidOperationException(); 766throw new InvalidOperationException(SR.net_auth_noauth); 786throw new InvalidOperationException(SR.net_auth_noauth); 815throw new InvalidOperationException(SR.net_auth_noauth);
System\Net\NegotiateAuthenticationPal.ManagedSpnego.cs (6)
78public override IIdentity RemoteIdentity => _mechanism?.RemoteIdentity ?? throw new InvalidOperationException(); 408throw new InvalidOperationException(SR.net_auth_noauth); 418throw new InvalidOperationException(SR.net_auth_noauth); 428throw new InvalidOperationException(SR.net_auth_noauth); 438throw new InvalidOperationException(SR.net_auth_noauth); 448throw new InvalidOperationException(SR.net_auth_noauth);
System\Net\NegotiateAuthenticationPal.Unsupported.cs (6)
26public override IIdentity RemoteIdentity => throw new InvalidOperationException(); 52public override NegotiateAuthenticationStatusCode Wrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, bool requestEncryption, out bool isEncrypted) => throw new InvalidOperationException(); 53public override NegotiateAuthenticationStatusCode Unwrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, out bool wasEncrypted) => throw new InvalidOperationException(); 54public override NegotiateAuthenticationStatusCode UnwrapInPlace(Span<byte> input, out int unwrappedOffset, out int unwrappedLength, out bool wasEncrypted) => throw new InvalidOperationException(); 55public override void GetMIC(ReadOnlySpan<byte> message, IBufferWriter<byte> signature) => throw new InvalidOperationException(); 56public override bool VerifyMIC(ReadOnlySpan<byte> message, ReadOnlySpan<byte> signature) => throw new InvalidOperationException();
System\Net\Security\NegotiateAuthentication.cs (7)
168throw new InvalidOperationException(SR.net_auth_noauth); 212throw new InvalidOperationException(SR.net_auth_noauth); 294throw new InvalidOperationException(SR.net_auth_noauth); 321throw new InvalidOperationException(SR.net_auth_noauth); 349throw new InvalidOperationException(SR.net_auth_noauth); 373throw new InvalidOperationException(SR.net_auth_noauth); 398throw new InvalidOperationException(SR.net_auth_noauth);
System\Net\Security\NegotiateStream.cs (4)
637throw new InvalidOperationException(SR.net_auth_reauth); 652throw new InvalidOperationException(SR.net_auth_client_server); 717throw new InvalidOperationException(SR.net_auth_noauth); 729throw new InvalidOperationException(SR.Format(SR.net_io_invalidnestedcall, "authenticate"));
System\Net\Security\SslAuthenticationOptions.cs (4)
29throw new InvalidOperationException(SR.Format(SR.net_conflicting_options, nameof(RemoteCertificateValidationCallback))); 39throw new InvalidOperationException(SR.Format(SR.net_conflicting_options, nameof(LocalCertificateSelectionCallback))); 89throw new InvalidOperationException(SR.Format(SR.net_conflicting_options, nameof(ServerCertificateSelectionCallback))); 100throw new InvalidOperationException(SR.Format(SR.net_conflicting_options, nameof(RemoteCertificateValidationCallback)));
System\Net\Security\SslStream.cs (3)
690throw new InvalidOperationException(SR.net_ssl_certificate_exist); 946throw new InvalidOperationException(SR.net_ssl_io_already_shutdown); 953throw new InvalidOperationException(SR.net_auth_noauth);
System\Net\Security\SslStream.IO.cs (4)
171throw new InvalidOperationException(SR.Format(SR.net_io_invalidnestedcall, "authenticate")); 193throw new InvalidOperationException(SR.net_ssl_renegotiate_buffer); 267throw new InvalidOperationException(SR.Format(SR.net_io_invalidnestedcall, "authenticate")); 450throw new InvalidOperationException(SR.net_ssl_renegotiate_data);
System\Net\StreamFramer.cs (1)
50throw new InvalidOperationException(SR.Format(SR.net_frame_size,
System.Net.Sockets (44)
System\Net\Sockets\NetworkStream.cs (10)
225throw new InvalidOperationException(SR.net_writeonlystream); 249if (!CanRead) throw new InvalidOperationException(SR.net_writeonlystream); 289throw new InvalidOperationException(SR.net_readonlystream); 316if (!CanWrite) throw new InvalidOperationException(SR.net_readonlystream); 421throw new InvalidOperationException(SR.net_writeonlystream); 483throw new InvalidOperationException(SR.net_readonlystream); 543throw new InvalidOperationException(SR.net_writeonlystream); 566throw new InvalidOperationException(SR.net_writeonlystream); 604throw new InvalidOperationException(SR.net_readonlystream); 626throw new InvalidOperationException(SR.net_readonlystream);
System\Net\Sockets\Socket.cs (12)
498throw new InvalidOperationException(SR.net_sockets_mustnotbebound); 804throw new InvalidOperationException(SR.net_sockets_disconnectedConnect); 809throw new InvalidOperationException(SR.net_sockets_mustnotlisten); 994throw new InvalidOperationException(SR.net_sockets_mustbind); 999throw new InvalidOperationException(SR.net_sockets_mustlisten); 1004throw new InvalidOperationException(SR.net_sockets_disconnectedAccept); 1650throw new InvalidOperationException(SR.net_sockets_mustbind); 2687throw new InvalidOperationException(SR.net_sockets_mustbind); 2691throw new InvalidOperationException(SR.net_sockets_mustlisten); 2737throw new InvalidOperationException(SR.net_sockets_mustnotlisten); 3792throw new InvalidOperationException(SR.net_sockets_mustbind); 3803throw new InvalidOperationException(SR.net_invasync);
System\Net\Sockets\Socket.Tasks.cs (2)
179throw new InvalidOperationException(SR.net_sockets_mustnotlisten); 1374private static void ThrowIncorrectTokenException() => throw new InvalidOperationException(SR.InvalidOperation_IncorrectToken);
System\Net\Sockets\Socket.Unix.cs (1)
191throw new InvalidOperationException(SR.Format(SR.net_sockets_namedmustnotbebound, propertyName));
System\Net\Sockets\SocketAsyncContext.Unix.cs (1)
308throw new InvalidOperationException();
System\Net\Sockets\SocketAsyncEngine.Unix.cs (1)
116throw new InvalidOperationException(SR.net_sockets_handle_already_used);
System\Net\Sockets\SocketAsyncEventArgs.cs (2)
316throw new InvalidOperationException(SR.InvalidOperation_BufferNotExplicitArray); 510throw new InvalidOperationException(SR.net_socketopinprogress);
System\Net\Sockets\SocketPal.Unix.cs (1)
1362throw new InvalidOperationException(SR.net_sockets_useblocking);
System\Net\Sockets\TCPClient.cs (1)
244throw new InvalidOperationException(SR.net_notconnected);
System\Net\Sockets\TCPListener.cs (6)
100throw new InvalidOperationException(SR.net_tcplistener_mustbestopped); 116throw new InvalidOperationException(SR.net_tcplistener_mustbestopped); 180throw new InvalidOperationException(SR.net_stopped); 191throw new InvalidOperationException(SR.net_stopped); 201throw new InvalidOperationException(SR.net_stopped); 226throw new InvalidOperationException(SR.net_stopped);
System\Net\Sockets\UDPClient.cs (7)
321throw new InvalidOperationException(SR.net_udpconnected); 330throw new InvalidOperationException(SR.net_udpconnected); 601throw new InvalidOperationException(SR.net_udpconnected); 846throw new InvalidOperationException(SR.net_udpconnected); 879throw new InvalidOperationException(SR.net_udpconnected); 922throw new InvalidOperationException(SR.net_notconnected); 945throw new InvalidOperationException(SR.net_notconnected);
System.Net.WebHeaderCollection (10)
System\Net\WebHeaderCollection.cs (10)
73throw new InvalidOperationException(SR.net_headers_req); 81throw new InvalidOperationException(SR.net_headers_req); 93throw new InvalidOperationException(SR.net_headers_rsp); 101throw new InvalidOperationException(SR.net_headers_rsp); 126throw new InvalidOperationException(SR.net_headers_req); 135throw new InvalidOperationException(SR.net_headers_rsp); 156throw new InvalidOperationException(SR.net_headers_req); 165throw new InvalidOperationException(SR.net_headers_rsp); 293throw new InvalidOperationException(SR.net_headers_req); 302throw new InvalidOperationException(SR.net_headers_rsp);
System.Net.WebSockets (2)
src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (1)
264throw new InvalidOperationException("InitializationState != " + requiredState.ToString());
System\Net\WebSockets\ManagedWebSocket.cs (1)
1544private static void ThrowOperationInProgress(string? methodName) => throw new InvalidOperationException(SR.Format(SR.net_Websockets_AlreadyOneOutstandingOperation, methodName));
System.Net.WebSockets.Client (3)
System\Net\WebSockets\ClientWebSocket.cs (2)
117throw new InvalidOperationException(SR.net_WebSockets_AlreadyStarted); 174throw new InvalidOperationException(SR.net_WebSockets_NotConnected);
System\Net\WebSockets\ClientWebSocketOptions.cs (1)
261throw new InvalidOperationException(SR.net_WebSockets_AlreadyStarted);
System.ObjectModel (1)
System\Collections\ObjectModel\ObservableCollection.cs (1)
233throw new InvalidOperationException(SR.ObservableCollectionReentrancyNotAllowed);
System.Private.CoreLib (299)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
30throw new InvalidOperationException($"{nameof(GetHostName)}: {err}");
src\libraries\Common\src\System\IO\StringParser.cs (3)
50throw new InvalidOperationException(); 131throw new InvalidOperationException(); 318throw new InvalidOperationException();
src\libraries\System.Private.CoreLib\src\Internal\Runtime\InteropServices\ComponentActivator.cs (1)
339throw new InvalidOperationException(SR.InvalidOperation_FunctionMissingUnmanagedCallersOnly);
src\libraries\System.Private.CoreLib\src\System\Collections\ArrayList.cs (11)
1125throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1127throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 2126if (_version != _list._version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 2145throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 2148throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 2156if (_version != _list._version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 2183throw new InvalidOperationException(SR.InvalidOperation_UnderlyingArrayListChanged); 2574throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 2616throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 2620throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 2632throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Queue.cs (4)
350throw new InvalidOperationException(SR.InvalidOperation_EmptyQueue); 445if (_version != _q._version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 496throw new InvalidOperationException(_index == -1 ? SR.InvalidOperation_EnumNotStarted : SR.InvalidOperation_EnumEnded); 506if (_version != _q._version) throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
src\libraries\System.Private.CoreLib\src\System\Collections\Hashtable.cs (8)
935throw new InvalidOperationException(SR.InvalidOperation_HashInsertFailed); 1077throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 1424throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1432throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 1454throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 1464throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 1480throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 1488throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
src\libraries\System.Private.CoreLib\src\System\Collections\ListDictionaryInternal.cs (8)
230throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 242throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 254throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 264throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 285throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 364throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 374throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 395throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (3)
4438throw new InvalidOperationException(SR.EventSource_ListenerCreatedInsideCallback); 4555throw new InvalidOperationException(); 4567throw new InvalidOperationException();
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingMetadataCollector.cs (1)
261throw new InvalidOperationException(SR.EventSource_IncorrentlyAuthoredTypeInfo);
src\libraries\System.Private.CoreLib\src\System\Enum.cs (2)
1604throw new InvalidOperationException(SR.InvalidOperation_UnknownEnumType); 2160new InvalidOperationException(SR.InvalidOperation_UnknownEnumType);
src\libraries\System.Private.CoreLib\src\System\Globalization\Calendar.cs (1)
104throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureInfo.cs (1)
1003throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (22)
347throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 377throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 596throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 630throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 661throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 682throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 703throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 737throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 779throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 799throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 833throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 869throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 981throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1015throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1055throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1080throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1100throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1122throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1143throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1625throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1688throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 1709throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
src\libraries\System.Private.CoreLib\src\System\Globalization\HebrewCalendar.cs (1)
370_ => throw new InvalidOperationException(SR.InvalidOperation_DateTimeParsing),
src\libraries\System.Private.CoreLib\src\System\Globalization\HijriCalendar.cs (1)
264throw new InvalidOperationException(SR.InvalidOperation_DateTimeParsing);
src\libraries\System.Private.CoreLib\src\System\Globalization\Normalization.Nls.cs (2)
50throw new InvalidOperationException(SR.Format(SR.UnknownError_Num, lastError)); 130throw new InvalidOperationException(SR.Format(SR.UnknownError_Num, lastError));
src\libraries\System.Private.CoreLib\src\System\Globalization\NumberFormatInfo.cs (1)
198throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
src\libraries\System.Private.CoreLib\src\System\Globalization\PersianCalendar.cs (1)
188throw new InvalidOperationException(SR.InvalidOperation_DateTimeParsing);
src\libraries\System.Private.CoreLib\src\System\Globalization\TextElementEnumerator.cs (2)
59throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 75throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen);
src\libraries\System.Private.CoreLib\src\System\Globalization\TextInfo.cs (1)
113throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
src\libraries\System.Private.CoreLib\src\System\Globalization\TextInfo.Nls.cs (1)
39throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
src\libraries\System.Private.CoreLib\src\System\Globalization\UmAlQuraCalendar.cs (1)
407throw new InvalidOperationException(SR.InvalidOperation_DateTimeParsing);
src\libraries\System.Private.CoreLib\src\System\IO\FileStatus.SetTimes.OtherUnix.cs (1)
23throw new InvalidOperationException();
src\libraries\System.Private.CoreLib\src\System\IO\PersistedFiles.Unix.cs (1)
38throw new InvalidOperationException(SR.PersistedFiles_NoHomeDirectory);
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\DerivedFileStreamStrategy.cs (1)
133public override void Flush() => throw new InvalidOperationException("FileStream should never call this method.");
src\libraries\System.Private.CoreLib\src\System\IO\Stream.cs (4)
39get => throw new InvalidOperationException(SR.InvalidOperation_TimeoutsNotSupported); 40set => throw new InvalidOperationException(SR.InvalidOperation_TimeoutsNotSupported); 45get => throw new InvalidOperationException(SR.InvalidOperation_TimeoutsNotSupported); 46set => throw new InvalidOperationException(SR.InvalidOperation_TimeoutsNotSupported);
src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (1)
90throw new InvalidOperationException(SR.InvalidOperation_AsyncIOInProgress);
src\libraries\System.Private.CoreLib\src\System\IO\StreamWriter.cs (1)
62throw new InvalidOperationException(SR.InvalidOperation_AsyncIOInProgress);
src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryAccessor.cs (1)
57throw new InvalidOperationException(SR.InvalidOperation_CalledTwice);
src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryStream.cs (2)
97throw new InvalidOperationException(SR.InvalidOperation_CalledTwice); 165throw new InvalidOperationException(SR.InvalidOperation_CalledTwice);
src\libraries\System.Private.CoreLib\src\System\Lazy.cs (1)
320throw new InvalidOperationException(SR.Lazy_Value_RecursiveCallsToValue);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ConstructorOnTypeBuilderInstantiation.cs (1)
69throw new InvalidOperationException();
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\DynamicMethod.cs (1)
324public override RuntimeMethodHandle MethodHandle => throw new InvalidOperationException(SR.InvalidOperation_NotAllowedInDynamicMethod);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\FieldOnTypeBuilderInstantiation.cs (2)
69public override object GetValue(object? obj) { throw new InvalidOperationException(); } 70public override void SetValue(object? obj, object? value, BindingFlags invokeAttr, Binder? binder, CultureInfo? culture) { throw new InvalidOperationException(); }
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilderInstantiation.cs (2)
15throw new InvalidOperationException(); 91throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericMethodDefinition, this));
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodOnTypeBuilderInstantiation.cs (1)
110throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericMethodDefinition, this));
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ModuleBuilder.cs (1)
66throw new InvalidOperationException(SR.InvalidOperation_NotADebugModule);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilderInstantiation.cs (3)
37throw new InvalidOperationException(); 236public override int GenericParameterPosition => throw new InvalidOperationException(); 255public override Type MakeGenericType(params Type[] inst) { throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); }
src\libraries\System.Private.CoreLib\src\System\Reflection\EventInfo.cs (2)
67throw new InvalidOperationException(SR.InvalidOperation_NoPublicAddMethod); 79throw new InvalidOperationException(SR.InvalidOperation_NoPublicRemoveMethod);
src\libraries\System.Private.CoreLib\src\System\Reflection\ExceptionHandlingClause.cs (1)
16public virtual int FilterOffset => throw new InvalidOperationException(SR.Arg_EHClauseNotFilter);
src\libraries\System.Private.CoreLib\src\System\Reflection\FieldAccessor.cs (2)
192throw new InvalidOperationException(SR.Arg_UnboundGenField); 308throw new InvalidOperationException(SR.Arg_UnboundGenField);
src\libraries\System.Private.CoreLib\src\System\Reflection\MemberInfo.cs (1)
41public virtual int MetadataToken => throw new InvalidOperationException();
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBase.cs (1)
25public virtual MethodBody? GetMethodBody() { throw new InvalidOperationException(); }
src\libraries\System.Private.CoreLib\src\System\Reflection\NullabilityInfoContext.cs (1)
278throw new InvalidOperationException(SR.NullabilityInfoContext_NotSupported);
src\libraries\System.Private.CoreLib\src\System\Reflection\RuntimeMethodInfo.cs (1)
76throw new InvalidOperationException(SR.Arg_UnboundGenParam);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureConstructedGenericType.cs (1)
58public sealed override int GenericParameterPosition => throw new InvalidOperationException(SR.Arg_NotGenericParameter);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureGenericParameterType.cs (1)
32public sealed override Type GetGenericTypeDefinition() => throw new InvalidOperationException(SR.InvalidOperation_NotGenericType);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureHasElementType.cs (2)
33public sealed override Type GetGenericTypeDefinition() => throw new InvalidOperationException(SR.InvalidOperation_NotGenericType); 36public sealed override int GenericParameterPosition => throw new InvalidOperationException(SR.Arg_NotGenericParameter);
src\libraries\System.Private.CoreLib\src\System\Resources\FileBasedResourceGroveler.cs (1)
104throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResMgrBadResSet_Type, _mediator.UserResourceSet.AssemblyQualifiedName), e);
src\libraries\System.Private.CoreLib\src\System\Resources\ManifestBasedResourceGroveler.cs (1)
267throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResMgrBadResSet_Type, _mediator.UserResourceSet.AssemblyQualifiedName), e);
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceManager.cs (1)
733throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotStream_Name, name));
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.Core.cs (1)
141throw new InvalidOperationException(SR.ResourceReaderIsClosed);
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (13)
241throw new InvalidOperationException(SR.ResourceReaderIsClosed); 489throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, FindType(typeIndex).FullName)); 502throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, typeString)); 1091if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1092if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1093if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1108if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1109if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1110if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1145if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1146if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1147if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1159if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed);
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceSet.cs (3)
145throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Name, name)); 156throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Name, name)); 169throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Name, name));
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ConditionalWeakTable.cs (1)
779throw new InvalidOperationException(SR.InvalidOperation_CollectionCorrupted);
src\libraries\System.Private.CoreLib\src\System\Runtime\GCSettings.cs (1)
46throw new InvalidOperationException(SR.InvalidOperation_SetLatencyModeNoGC);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (1)
431throw new InvalidOperationException(SR.Format(SR.ComVariant_TypeIsNotSupportedType, VarType, string.Join(", ", requiredType)));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NativeLibrary.cs (1)
217throw new InvalidOperationException(SR.InvalidOperation_CannotRegisterSecondResolver);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\SafeBuffer.cs (1)
381return new InvalidOperationException(SR.InvalidOperation_MustCallInitialize);
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyDependencyResolver.cs (3)
75throw new InvalidOperationException(SR.AssemblyDependencyResolver_FailedToLoadHostpolicy, entryPointNotFoundException); 79throw new InvalidOperationException(SR.AssemblyDependencyResolver_FailedToLoadHostpolicy, dllNotFoundException); 85throw new InvalidOperationException(SR.Format(
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (3)
463throw new InvalidOperationException(SR.AssemblyLoadContext_Unload_CannotUnloadIfNotCollectible); 495throw new InvalidOperationException(SR.AssemblyLoadContext_Verify_NotUnloading); 666throw new InvalidOperationException(SR.Argument_CustomAssemblyLoadContextRequestedNameMismatch);
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfoEnumerator.cs (4)
79throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 97throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 108throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 119throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen);
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (3)
225throw new InvalidOperationException(SR.InvalidOperation_UnknownEnumType); 247throw new InvalidOperationException(SR.InvalidOperation_UnknownEnumType), 320throw new InvalidOperationException(SR.Arg_GenericParameter);
src\libraries\System.Private.CoreLib\src\System\Security\SecureString.cs (1)
297throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
src\libraries\System.Private.CoreLib\src\System\Text\Encoding.cs (2)
477throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 491throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs (4)
119throw new InvalidOperationException(SR.InvalidOperation_CannotRestoreUnsuppressedFlow); 445throw new InvalidOperationException(SR.InvalidOperation_NullContext); 569throw new InvalidOperationException(SR.InvalidOperation_CannotUseAFCOtherThread); 584throw new InvalidOperationException(SR.InvalidOperation_AsyncFlowCtrlCtxMismatch);
src\libraries\System.Private.CoreLib\src\System\Threading\LazyInitializer.cs (2)
117throw new InvalidOperationException(SR.Lazy_StaticInit_InvalidOperation); 272throw new InvalidOperationException(SR.Lazy_StaticInit_InvalidOperation);
src\libraries\System.Private.CoreLib\src\System\Threading\ManualResetEventSlim.cs (1)
131throw new InvalidOperationException(SR.Format(SR.ManualResetEventSlim_ctor_TooManyWaiters, NumWaitersState_MaxValue));
src\libraries\System.Private.CoreLib\src\System\Threading\Overlapped.cs (2)
78throw new InvalidOperationException(SR.InvalidOperation_Overlapped_Pack); 103throw new InvalidOperationException(SR.InvalidOperation_Overlapped_Pack);
src\libraries\System.Private.CoreLib\src\System\Threading\SpinLock.cs (1)
574throw new InvalidOperationException(SR.SpinLock_IsHeldByCurrentThread);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (1)
551if (m_pair.CompletionRequested) throw new InvalidOperationException(GetType().ToString());
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Sources\ManualResetValueTaskSourceCore.cs (1)
112throw new InvalidOperationException(); // not using ThrowHelper.ThrowInvalidOperationException so that the JIT sees ThrowForFailedGetResult as always throwing
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskScheduler.cs (3)
196throw new InvalidOperationException(SR.TaskScheduler_InconsistentStateAfterTryExecuteTaskInline); 408throw new InvalidOperationException(SR.TaskScheduler_ExecuteTask_WrongTaskScheduler); 554throw new InvalidOperationException(SR.TaskScheduler_FromCurrentSynchronizationContext_NoCurrent);
src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (5)
211throw new InvalidOperationException(SR.InvalidOperation_ThreadWrongThreadStart); 263throw new InvalidOperationException(SR.Thread_Operation_RequiresCurrentThread); 277throw new InvalidOperationException(SR.Thread_Operation_RequiresCurrentThread); 529throw new InvalidOperationException(SR.Thread_GetSetCompressedStack_NotSupported); 535throw new InvalidOperationException(SR.Thread_GetSetCompressedStack_NotSupported);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadLocal.cs (2)
322throw new InvalidOperationException(SR.ThreadLocal_Value_RecursiveCallsToValue); 427throw new InvalidOperationException(SR.ThreadLocal_ValuesNotAvailable);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolBoundHandleOverlapped.cs (2)
44throw new InvalidOperationException(SR.InvalidOperation_NativeOverlappedReused); 49throw new InvalidOperationException(SR.Argument_NativeOverlappedAlreadyFree);
src\libraries\System.Private.CoreLib\src\System\Threading\Timer.cs (1)
630var e = new InvalidOperationException(SR.InvalidOperation_TimerAlreadyClosed);
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (1)
502var ex = new InvalidOperationException(SR.InvalidOperation_InvalidHandle);
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (13)
404throw new InvalidOperationException(); 416throw new InvalidOperationException(GetResourceString(resource), e); 548throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 554throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 566throw new InvalidOperationException(SR.InvalidOperation_EnumFailedVersion); 572throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 578throw new InvalidOperationException(SR.InvalidOperation_NoValue); 584throw new InvalidOperationException(SR.InvalidOperation_ConcurrentOperationsNotSupported); 590throw new InvalidOperationException(SR.InvalidOperation_HandleIsNotInitialized); 596throw new InvalidOperationException(SR.InvalidOperation_HandleIsNotPinned); 608throw new InvalidOperationException(SR.InvalidOperation_InvalidUtf8); 731return new InvalidOperationException(GetResourceString(resource)); 766return new InvalidOperationException(
src\libraries\System.Private.CoreLib\src\System\Type.cs (3)
84public virtual int GenericParameterPosition => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 89throw new InvalidOperationException(SR.Arg_NotGenericParameter); 90throw new InvalidOperationException();
src\libraries\System.Private.CoreLib\src\System\Type.Enum.cs (1)
62throw new InvalidOperationException(SR.InvalidOperation_UnknownEnumType);
src\libraries\System.Private.CoreLib\src\System\WeakReference.cs (1)
191throw new InvalidOperationException(SR.InvalidOperation_HandleIsNotInitialized);
src\libraries\System.Private.CoreLib\src\System\WeakReference.T.cs (1)
105throw new InvalidOperationException(SR.InvalidOperation_HandleIsNotInitialized);
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeNameParserHelpers.cs (5)
344throw new InvalidOperationException(); 355throw new InvalidOperationException(); 366throw new InvalidOperationException(); 377throw new InvalidOperationException(); 388throw new InvalidOperationException();
src\System\Collections\EmptyReadOnlyDictionaryInternal.cs (8)
71throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 88throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 93throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 107throw new InvalidOperationException(SR.InvalidOperation_ReadOnly); 123public object? Current => throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 131public object Key => throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 133public object? Value => throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen); 135public DictionaryEntry Entry => throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen);
src\System\GC.CoreCLR.cs (11)
425throw new InvalidOperationException(SR.InvalidOperation_NotWithConcurrentGC); 433throw new InvalidOperationException(SR.InvalidOperation_NotWithConcurrentGC); 493throw new InvalidOperationException(SR.InvalidOperationException_AlreadyInNoGCRegion); 526throw new InvalidOperationException(SR.InvalidOperationException_NoGCRegionNotInProgress); 528throw new InvalidOperationException(SR.InvalidOperationException_NoGCRegionInduced); 530throw new InvalidOperationException(SR.InvalidOperationException_NoGCRegionAllocationExceeded); 683throw new InvalidOperationException(SR.Format(SR.InvalidOperationException_NoGCRegionNotInProgress)); 685throw new InvalidOperationException(SR.Format(SR.InvalidOperationException_NoGCRegionAllocationExceeded)); 687throw new InvalidOperationException(SR.InvalidOperationException_NoGCRegionCallbackAlreadyRegistered); 942throw new InvalidOperationException(SR.InvalidOperationException_HardLimitTooLow); 944throw new InvalidOperationException(SR.InvalidOperationException_HardLimitInvalid);
src\System\Reflection\Emit\DynamicILGenerator.cs (2)
194throw new InvalidOperationException(SR.InvalidOperation_NotAVarArgCallingConvention); 411throw new InvalidOperationException(SR.InvalidOperation_NotAVarArgCallingConvention);
src\System\Reflection\Emit\DynamicMethod.CoreCLR.cs (1)
78throw new InvalidOperationException(SR.Format(SR.InvalidOperation_BadEmptyMethodBody, Name));
src\System\Reflection\Emit\RuntimeAssemblyBuilder.cs (3)
52throw new InvalidOperationException(); 62throw new InvalidOperationException(); 198throw new InvalidOperationException(SR.InvalidOperation_NoMultiModuleAssembly);
src\System\Reflection\Emit\RuntimeConstructorBuilder.cs (1)
139throw new InvalidOperationException(SR.InvalidOperation_DefaultConstructorILGen);
src\System\Reflection\Emit\RuntimeGenericTypeParameterBuilder.cs (3)
178public override Type[] GetGenericArguments() { throw new InvalidOperationException(); } 196public override Type GetGenericTypeDefinition() { throw new InvalidOperationException(); } 200public override Type MakeGenericType(params Type[] typeArguments) { throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); }
src\System\Reflection\Emit\RuntimeILGenerator.cs (5)
523throw new InvalidOperationException(SR.InvalidOperation_NotAVarArgCallingConvention); 894throw new InvalidOperationException(SR.InvalidOperation_BadInstructionOrIndexOutOfBound); 962throw new InvalidOperationException(SR.Argument_BadExceptionCodeGen); 1175throw new InvalidOperationException(SR.InvalidOperation_TypeHasBeenCreated); 1182throw new InvalidOperationException(SR.InvalidOperation_MethodBaked);
src\System\Reflection\Emit\RuntimeMethodBuilder.cs (9)
155throw new InvalidOperationException(SR.InvalidOperation_MethodHasBody); 164throw new InvalidOperationException(SR.InvalidOperation_BadILGeneratorUsage); 172throw new InvalidOperationException(SR.InvalidOperation_OpenLocalVariableScope); 472throw new InvalidOperationException(SR.InvalidOperation_TypeNotCreated); 504public override MethodInfo GetGenericMethodDefinition() { if (!IsGenericMethod) throw new InvalidOperationException(); return this; } 520throw new InvalidOperationException(SR.InvalidOperation_GenericParametersAlreadySet); 523throw new InvalidOperationException(SR.InvalidOperation_MethodBuilderBaked); 537internal void ThrowIfGeneric() { if (IsGenericMethod && !IsGenericMethodDefinition) throw new InvalidOperationException(); } 683throw new InvalidOperationException(SR.InvalidOperation_ShouldNotHaveMethodBody);
src\System\Reflection\Emit\RuntimeModuleBuilder.cs (10)
317throw new InvalidOperationException(); 328throw new InvalidOperationException(SR.InvalidOperation_NotAVarArgCallingConvention); 812throw new InvalidOperationException(SR.InvalidOperation_GlobalsHaveBeenCreated); 832throw new InvalidOperationException(SR.InvalidOperation_GlobalsHaveBeenCreated); 852throw new InvalidOperationException(SR.InvalidOperation_GlobalsHaveBeenCreated); 869throw new InvalidOperationException(SR.InvalidOperation_GlobalsHaveBeenCreated); 977throw new InvalidOperationException(SR.InvalidOperation_CannotImportGlobalFromDifferentModule); 1003throw new InvalidOperationException(SR.InvalidOperation_CannotImportGlobalFromDifferentModule); 1205throw new InvalidOperationException(SR.InvalidOperation_CannotImportGlobalFromDifferentModule); 1217throw new InvalidOperationException(SR.InvalidOperation_CannotImportGlobalFromDifferentModule);
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (10)
558throw new InvalidOperationException(SR.InvalidOperation_TypeHasBeenCreated); 967throw new InvalidOperationException(SR.InvalidOperation_NoUnderlyingTypeOnEnum); 1037throw new InvalidOperationException(); 1062public override Type GetGenericTypeDefinition() { if (IsGenericTypeDefinition) return this; if (m_genTypeDef == null) throw new InvalidOperationException(); return m_genTypeDef; } 1223throw new InvalidOperationException(SR.InvalidOperation_ConstructorNotAllowedOnInterface); 1291throw new InvalidOperationException(SR.InvalidOperation_ConstructorNotAllowedOnInterface); 1602throw new InvalidOperationException(SR.InvalidOperation_BadTypeAttributesNotAbstract); 1617throw new InvalidOperationException(SR.Format(SR.InvalidOperation_BadMethodBody, meth.Name)); 1631throw new InvalidOperationException( 1705throw new InvalidOperationException(SR.InvalidOperation_BadInterfaceNotAbstract);
src\System\Reflection\RtFieldInfo.cs (1)
86public override object GetRawConstantValue() { throw new InvalidOperationException(); }
src\System\Reflection\RuntimeEventInfo.cs (1)
70throw new InvalidOperationException(SR.InvalidOperation_NoPublicAddMethod);
src\System\Reflection\RuntimeExceptionHandlingClause.cs (2)
34throw new InvalidOperationException(SR.Arg_EHClauseNotFilter); 50throw new InvalidOperationException(SR.Arg_EHClauseNotClause);
src\System\Reflection\RuntimeMethodInfo.CoreCLR.cs (2)
410throw new InvalidOperationException( 461throw new InvalidOperationException();
src\System\Reflection\RuntimePropertyInfo.cs (1)
219throw new InvalidOperationException(SR.Arg_EnumLitValueNotFound);
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (2)
230throw new InvalidOperationException(); 242throw new InvalidOperationException();
src\System\Runtime\ControlledExecution.CoreCLR.cs (1)
51throw new InvalidOperationException(SR.InvalidOperation_NestedControlledExecutionRun);
src\System\Runtime\InteropServices\ComWrappers.cs (3)
297throw new InvalidOperationException(SR.InvalidOperation_SuppliedInnerMustBeMarkedAggregation); 329throw new InvalidOperationException(SR.InvalidOperation_ResetGlobalComWrappersInstance); 360throw new InvalidOperationException(SR.InvalidOperation_ResetGlobalComWrappersInstance);
src\System\Runtime\InteropServices\DynamicInterfaceCastableHelpers.cs (3)
34throw new InvalidOperationException(SR.Format(SR.IDynamicInterfaceCastable_NotInterface, implType.ToString())); 37throw new InvalidOperationException(SR.Format(SR.IDynamicInterfaceCastable_MissingImplementationAttribute, implType, nameof(DynamicInterfaceCastableImplementationAttribute))); 40throw new InvalidOperationException(SR.Format(SR.IDynamicInterfaceCastable_DoesNotImplementRequested, implType, interfaceType));
src\System\RuntimeHandles.cs (2)
621throw new InvalidOperationException(SR.Arg_NotGenericParameter); 1289static void ThrowInvalidOperationException() => throw new InvalidOperationException(SR.InvalidOperation_NullModuleHandle);
src\System\RuntimeType.CoreCLR.cs (11)
1561throw new InvalidOperationException(); 2718throw new InvalidOperationException(SR.Arg_GenericParameter); 3259throw new InvalidOperationException(SR.Arg_NotGenericParameter); 3498throw new InvalidOperationException(SR.InvalidOperation_NotGenericType); 3508throw new InvalidOperationException(SR.Arg_NotGenericParameter); 3546throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); 3619throw new InvalidOperationException(SR.Arg_NotGenericParameter); 3631throw new InvalidOperationException(SR.Arg_NotGenericParameter); 3713throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 3724throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 3742throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer);
src\System\StubHelpers.cs (1)
506throw new InvalidOperationException(SR.Interop_Marshal_SafeHandle_InvalidOperation);
src\System\Threading\WaitHandle.CoreCLR.cs (1)
31throw new InvalidOperationException(SR.Threading_WaitHandleTooManyPosts);
System.Private.CoreLib.Generators (1)
ProductVersionInfoGenerator.cs (1)
23throw new InvalidOperationException($"Unable to obtain product version at build-time.");
System.Private.DataContractSerialization (76)
System\Runtime\Serialization\AccessorBuilder.cs (3)
91throw new InvalidOperationException(SR.Format(SR.InvalidMember, DataContract.GetClrTypeFullName(memberInfo.DeclaringType!), memberInfo.Name)); 143throw new InvalidOperationException(SR.Format(SR.NoSetMethodForProperty, propInfo.DeclaringType, propInfo.Name)); 155throw new InvalidOperationException(SR.Format(SR.InvalidMember, DataContract.GetClrTypeFullName(memberInfo.DeclaringType!), memberInfo.Name));
System\Runtime\Serialization\DataContract.cs (1)
2061throw new InvalidOperationException(SR.Format(SR.DupContractInKnownTypes, type, alreadyExistingContract.UnderlyingType, dataContract.XmlName.Namespace, dataContract.XmlName.Name));
System\Runtime\Serialization\DataContractSerializer.cs (1)
54throw new InvalidOperationException(SR.CannotSetTwice);
System\Runtime\Serialization\DataContractSet.cs (6)
112throw new InvalidOperationException(SR.Format(SR.DupContractInDataContractSet, dataContract.XmlName.Name, dataContract.XmlName.Namespace)); 116throw new InvalidOperationException(SR.Format(SR.DupTypeContractInDataContractSet, (typeNamesEqual ? dataContract.UnderlyingType.AssemblyQualifiedName : DataContract.GetClrTypeFullName(dataContract.UnderlyingType)), (typeNamesEqual ? dataContractInSet.UnderlyingType.AssemblyQualifiedName : DataContract.GetClrTypeFullName(dataContractInSet.UnderlyingType)), dataContract.XmlName.Name, dataContract.XmlName.Namespace)); 327throw new InvalidOperationException(SR.Format(SR.ReferencedTypesCannotContainNull)); 348throw new InvalidOperationException(SR.Format(SR.ReferencedCollectionTypesCannotContainNull)); 604throw new InvalidOperationException(SR.Format( 610throw new InvalidOperationException(SR.Format(
System\Runtime\Serialization\Json\ReflectionJsonFormatReader.cs (1)
180throw new InvalidOperationException(
System\Runtime\Serialization\Json\XmlJsonReader.cs (1)
353throw new InvalidOperationException(SR.GenericCallbackException, e);
System\Runtime\Serialization\Json\XmlJsonWriter.cs (3)
1102throw new InvalidOperationException(SR.JsonWriterClosed); 1113throw new InvalidOperationException(SR.XmlIllegalOutsideRoot); 1186throw new InvalidOperationException(SR.JsonMustUseWriteStringForWritingAttributeValues);
System\Runtime\Serialization\Json\XmlObjectSerializerReadContextComplexJson.cs (1)
136_ => throw new InvalidOperationException(SR.ParseJsonNumberReturnInvalidNumber),
System\Runtime\Serialization\MemoryStreamAdapter.cs (1)
79throw new InvalidOperationException();
System\Runtime\Serialization\SchemaExporter.cs (1)
71throw new InvalidOperationException(SR.Format(SR.CouldNotReadSerializationSchema, Globals.SerializationNamespace));
System\Runtime\Serialization\SchemaImporter.cs (1)
55throw new InvalidOperationException(SR.Format(SR.CouldNotReadSerializationSchema, Globals.SerializationNamespace));
System\Xml\ValueHandle.cs (3)
200throw new InvalidOperationException(); 526throw new InvalidOperationException(); 655throw new InvalidOperationException();
System\Xml\XmlBaseReader.cs (5)
1254throw new InvalidOperationException(SR.XmlEndElementNoOpenNodes); 1719throw new InvalidOperationException(SR.XmlInvalidOperation); 1976throw new InvalidOperationException(); 2007throw new InvalidOperationException(SR.XmlCanonicalizationStarted); 2019throw new InvalidOperationException(SR.XmlCanonicalizationNotStarted);
System\Xml\XmlBaseWriter.cs (35)
120throw new InvalidOperationException(SR.XmlWriterClosed); 155throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteXmlnsAttribute", WriteState.ToString())); 179throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteXmlnsAttribute", WriteState.ToString())); 207throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteStartAttribute", WriteState.ToString())); 311throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteEndAttribute", WriteState.ToString())); 370throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteEndAttribute", WriteState.ToString())); 434throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteComment", WriteState.ToString())); 460throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteFullEndElement", WriteState.ToString())); 472throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteCData", WriteState.ToString())); 496throw new InvalidOperationException(SR.XmlOnlyOneRoot); 501throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteStartElement", WriteState.ToString())); 539throw new InvalidOperationException(SR.XmlOnlyOneRoot); 542throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteStartElement", WriteState.ToString())); 609throw new InvalidOperationException(SR.Format(SR.XmlInvalidDepth, "WriteEndElement", _depth.ToString(CultureInfo.InvariantCulture))); 636throw new InvalidOperationException(SR.Format(SR.XmlInvalidDepth, "WriteEndElement", _depth.ToString(CultureInfo.InvariantCulture))); 720throw new InvalidOperationException(SR.XmlIllegalOutsideRoot); 727throw new InvalidOperationException(SR.XmlIllegalOutsideRoot); 754throw new InvalidOperationException(SR.XmlIllegalOutsideRoot); 760throw new InvalidOperationException(SR.XmlIllegalOutsideRoot); 766throw new InvalidOperationException(SR.XmlIllegalOutsideRoot); 869throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteStartDocument", WriteState.ToString())); 894throw new InvalidOperationException(SR.XmlInvalidDeclaration); 921throw new InvalidOperationException(SR.XmlNoRootElement); 1591throw new InvalidOperationException(SR.XmlCanonicalizationStarted); 1604throw new InvalidOperationException(SR.XmlCanonicalizationNotStarted); 1630throw new InvalidOperationException(); 1632throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "StartFragment", WriteState.ToString())); 1682throw new InvalidOperationException(); 1684throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "EndFragment", WriteState.ToString())); 1719throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteFragment", WriteState.ToString())); 1722throw new InvalidOperationException(); 1817throw new InvalidOperationException(SR.XmlOnlyOneRoot); 1819throw new InvalidOperationException(SR.XmlOnlyOneRoot); 1821throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteStartElement", WriteState.ToString())); 1828throw new InvalidOperationException(SR.Format(SR.XmlInvalidPrefixState, WriteState.ToString()));
System\Xml\XmlBinaryReaderSession.cs (1)
30throw new InvalidOperationException(SR.XmlIDDefined);
System\Xml\XmlBinaryWriter.cs (1)
63throw new InvalidOperationException(SR.XmlOnlySingleValue);
System\Xml\XmlBinaryWriterSession.cs (1)
41throw new InvalidOperationException(SR.XmlKeyAlreadyExists);
System\Xml\XmlConverter.cs (1)
1082throw new InvalidOperationException();
System\Xml\XmlDictionaryAsyncCheckWriter.cs (1)
39throw new InvalidOperationException(SR.XmlAsyncIsRunningException);
System\Xml\XmlDictionaryReader.cs (2)
464throw new InvalidOperationException(SR.XmlInvalidOperation); 485throw new InvalidOperationException(SR.XmlInvalidOperation);
System\Xml\XmlDictionaryReaderQuotas.cs (6)
70throw new InvalidOperationException(SR.QuotaCopyReadOnly); 95throw new InvalidOperationException(SR.Format(SR.QuotaIsReadOnly, "MaxStringContentLength")); 112throw new InvalidOperationException(SR.Format(SR.QuotaIsReadOnly, "MaxArrayLength")); 129throw new InvalidOperationException(SR.Format(SR.QuotaIsReadOnly, "MaxBytesPerRead")); 147throw new InvalidOperationException(SR.Format(SR.QuotaIsReadOnly, "MaxDepth")); 165throw new InvalidOperationException(SR.Format(SR.QuotaIsReadOnly, "MaxNameTableCharCount"));
System.Private.Uri (38)
System\Uri.cs (25)
693throw new InvalidOperationException(SR.net_uri_NotAbsolute); 726throw new InvalidOperationException(SR.net_uri_NotAbsolute); 749throw new InvalidOperationException(SR.net_uri_NotAbsolute); 764throw new InvalidOperationException(SR.net_uri_NotAbsolute); 779throw new InvalidOperationException(SR.net_uri_NotAbsolute); 811throw new InvalidOperationException(SR.net_uri_NotAbsolute); 831throw new InvalidOperationException(SR.net_uri_NotAbsolute); 844throw new InvalidOperationException(SR.net_uri_NotAbsolute); 862throw new InvalidOperationException(SR.net_uri_NotAbsolute); 893throw new InvalidOperationException(SR.net_uri_NotAbsolute); 930throw new InvalidOperationException(SR.net_uri_NotAbsolute); 944throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1061throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1088throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1104throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1121throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1146throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1170throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1244throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1335throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1594throw new InvalidOperationException(SR.net_uri_NotAbsolute); 1599throw new InvalidOperationException(SR.Format(SR.net_uri_UserDrivenParsing, GetType())); 1604throw new InvalidOperationException(SR.net_uri_GetComponentsCalledWhenCanonicalizationDisabled); 1839throw new InvalidOperationException(SR.net_uri_NotAbsolute); 4971throw new InvalidOperationException(SR.net_uri_NotAbsolute);
System\UriExt.cs (3)
337throw new InvalidOperationException(SR.net_uri_GetComponentsCalledWhenCanonicalizationDisabled); 356throw new InvalidOperationException(SR.net_uri_NotAbsolute); 427throw new InvalidOperationException(SR.Format(SR.net_uri_UserDrivenParsing, this.GetType()));
System\UriScheme.cs (8)
69throw new InvalidOperationException(SR.net_uri_NotAbsolute); 74throw new InvalidOperationException(SR.Format(SR.net_uri_UserDrivenParsing, uri._syntax.GetType())); 83throw new InvalidOperationException(SR.net_uri_InitializeCalledAlreadyOrTooLate); 101throw new InvalidOperationException(SR.Format(SR.net_uri_UserDrivenParsing, this.GetType())); 104throw new InvalidOperationException(SR.net_uri_NotAbsolute); 144throw new InvalidOperationException(SR.Format(SR.net_uri_UserDrivenParsing, this.GetType())); 147throw new InvalidOperationException(SR.net_uri_NotAbsolute); 150throw new InvalidOperationException(SR.net_uri_GetComponentsCalledWhenCanonicalizationDisabled);
System\UriSyntax.cs (2)
163throw new InvalidOperationException(SR.Format(SR.net_uri_NeedFreshParser, syntax.SchemeName)); 170throw new InvalidOperationException(SR.Format(SR.net_uri_AlreadyRegistered, oldSyntax.SchemeName));
System.Private.Xml (563)
System\Xml\Core\HtmlEncodedRawTextWriter.cs (3)
398throw new InvalidOperationException(SR.Xml_InvalidOperation); 403throw new InvalidOperationException(SR.Xml_InvalidOperation); 408throw new InvalidOperationException(SR.Xml_InvalidOperation);
System\Xml\Core\HtmlUtf8RawTextWriter.cs (3)
377throw new InvalidOperationException(SR.Xml_InvalidOperation); 382throw new InvalidOperationException(SR.Xml_InvalidOperation); 387throw new InvalidOperationException(SR.Xml_InvalidOperation);
System\Xml\Core\ReadContentAsBinaryHelper.cs (4)
91throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods); 134throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods); 169throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods); 212throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods);
System\Xml\Core\ReadContentAsBinaryHelperAsync.cs (4)
42throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods); 86throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods); 122throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods); 166throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods);
System\Xml\Core\XmlAsyncCheckReader.cs (1)
57throw new InvalidOperationException(SR.Xml_AsyncIsRunningException);
System\Xml\Core\XmlAsyncCheckWriter.cs (1)
31throw new InvalidOperationException(SR.Xml_AsyncIsRunningException);
System\Xml\Core\XmlEncodedRawTextWriterAsync.cs (1)
28throw new InvalidOperationException(SR.Xml_WriterAsyncNotSetException);
System\Xml\Core\XmlRawWriter.cs (15)
57throw new InvalidOperationException(SR.Xml_InvalidOperation); 62throw new InvalidOperationException(SR.Xml_InvalidOperation); 67throw new InvalidOperationException(SR.Xml_InvalidOperation); 77throw new InvalidOperationException(SR.Xml_InvalidOperation); 83throw new InvalidOperationException(SR.Xml_InvalidOperation); 98throw new InvalidOperationException(SR.Xml_InvalidOperation); 106throw new InvalidOperationException(SR.Xml_InvalidOperation); 113get { throw new InvalidOperationException(SR.Xml_InvalidOperation); } 119get { throw new InvalidOperationException(SR.Xml_InvalidOperation); } 125throw new InvalidOperationException(SR.Xml_InvalidOperation); 131throw new InvalidOperationException(SR.Xml_InvalidOperation); 137throw new InvalidOperationException(SR.Xml_InvalidOperation); 206throw new InvalidOperationException(SR.Xml_InvalidOperation); 211throw new InvalidOperationException(SR.Xml_InvalidOperation); 216throw new InvalidOperationException(SR.Xml_InvalidOperation);
System\Xml\Core\XmlRawWriterAsync.cs (11)
48throw new InvalidOperationException(SR.Xml_InvalidOperation); 53throw new InvalidOperationException(SR.Xml_InvalidOperation); 58throw new InvalidOperationException(SR.Xml_InvalidOperation); 69throw new InvalidOperationException(SR.Xml_InvalidOperation); 75throw new InvalidOperationException(SR.Xml_InvalidOperation); 90throw new InvalidOperationException(SR.Xml_InvalidOperation); 96throw new InvalidOperationException(SR.Xml_InvalidOperation); 102throw new InvalidOperationException(SR.Xml_InvalidOperation); 150throw new InvalidOperationException(SR.Xml_InvalidOperation); 155throw new InvalidOperationException(SR.Xml_InvalidOperation); 160throw new InvalidOperationException(SR.Xml_InvalidOperation);
System\Xml\Core\XmlReader.cs (4)
702throw new InvalidOperationException(SR.Xml_InvalidOperation); 1271throw new InvalidOperationException(SR.Xml_ReadSubtreeNotOnElement); 1443return new InvalidOperationException(AddLineInfo(SR.Format(SR.Xml_InvalidReadContentAs, methodName, nodeType), lineInfo)); 1448return new InvalidOperationException(AddLineInfo(SR.Format(SR.Xml_InvalidReadElementContentAs, methodName, nodeType), lineInfo));
System\Xml\Core\XmlReaderSettings.cs (2)
523throw new InvalidOperationException(SR.Format(SR.Xml_IncompatibleConformanceLevel, _conformanceLevel.ToString())); 582throw new InvalidOperationException(SR.Format(SR.Xml_IncompatibleConformanceLevel, _conformanceLevel.ToString()));
System\Xml\Core\XmlSubtreeReader.cs (7)
898throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods); 955throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods); 1036throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods); 1092throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods); 1151throw new InvalidOperationException(SR.Xml_MixingReadValueChunkWithBinary); 1531throw new InvalidOperationException(SR.Xml_ClosedOrErrorReader); 1549throw new InvalidOperationException(SR.Xml_MixingReadValueChunkWithBinary);
System\Xml\Core\XmlSubtreeReaderAsync.cs (5)
304throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods); 361throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods); 442throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods); 498throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods); 549throw new InvalidOperationException(SR.Xml_MixingReadValueChunkWithBinary);
System\Xml\Core\XmlTextReaderImpl.cs (13)
1495throw new InvalidOperationException(SR.Xml_InvalidOperation); 1571throw new InvalidOperationException(SR.Xml_InvalidOperation); 1618throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods); 1665throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods); 1711throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods); 1758throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods); 1792throw new InvalidOperationException(SR.Format(SR.Xml_InvalidReadValueChunk, _curNode.type)); 1970throw new InvalidOperationException(SR.Xml_InvalidOperation); 2016throw new InvalidOperationException(SR.Xml_InvalidOperation); 2049throw new InvalidOperationException(SR.Xml_InvalidOperation); 2127Throw(new InvalidOperationException(SR.Xml_InvalidResetStateCall)); 8894throw new InvalidOperationException(SR.Xml_MixingReadValueChunkWithBinary); 8899throw new InvalidOperationException(SR.Xml_MixingV1StreamingWithV2Binary);
System\Xml\Core\XmlTextReaderImplAsync.cs (8)
26throw new InvalidOperationException(SR.Xml_ReaderAsyncNotSetException); 414throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods); 470throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods); 535throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods); 591throw new InvalidOperationException(SR.Xml_MixingBinaryContentMethods); 617throw new InvalidOperationException(SR.Format(SR.Xml_InvalidReadValueChunk, _curNode.type)); 5274throw new InvalidOperationException(SR.Xml_MixingReadValueChunkWithBinary); 5278throw new InvalidOperationException(SR.Xml_MixingV1StreamingWithV2Binary);
System\Xml\Core\XmlTextWriter.cs (7)
334throw new InvalidOperationException(SR.Xml_NotInWriteState); 1173throw new InvalidOperationException(SR.Xml_NotTheFirst); 1207throw new InvalidOperationException(SR.Xml_Closed); 1211throw new InvalidOperationException(SR.Format(SR.Xml_WrongToken, s_tokenName[(int)token], s_stateName[(int)State.Error])); 1217throw new InvalidOperationException(SR.Format(SR.Xml_WrongToken, s_tokenName[(int)token], s_stateName[(int)_currentState])); 1320throw new InvalidOperationException(SR.Xml_InvalidOperation); 1346throw new InvalidOperationException(SR.Xml_NoStartTag);
System\Xml\Core\XmlUtf8RawTextWriterAsync.cs (1)
28throw new InvalidOperationException(SR.Xml_WriterAsyncNotSetException);
System\Xml\Core\XmlValidatingReaderImpl.cs (3)
758throw new InvalidOperationException(SR.Xml_InvalidOperation); 889throw new InvalidOperationException(SR.Xml_InvalidOperation); 971throw new InvalidOperationException(SR.Xml_InvalidOperation);
System\Xml\Core\XmlWellFormedWriter.cs (8)
368throw new InvalidOperationException(SR.Xml_DtdNotAllowedInFragment); 375throw new InvalidOperationException(SR.Xml_DtdAlreadyWritten); 1488throw new InvalidOperationException(SR.Xml_ClosedOrError); 1555throw new InvalidOperationException(SR.Xml_CannotStartDocumentOnFragment); 1847throw new InvalidOperationException(SR.Xml_ClosedOrError); 1851throw new InvalidOperationException(SR.Format(SR.Xml_WrongToken, tokenName[(int)token], GetStateName(_currentState))); 2080throw new InvalidOperationException($"{wrongTokenMessage} {SR.Xml_ConformanceLevelFragment}"); 2084throw new InvalidOperationException(wrongTokenMessage);
System\Xml\Core\XmlWellFormedWriterAsync.cs (6)
69throw new InvalidOperationException(SR.Xml_DtdNotAllowedInFragment); 76throw new InvalidOperationException(SR.Xml_DtdAlreadyWritten); 1178throw new InvalidOperationException(SR.Xml_ClosedOrError); 1205throw new InvalidOperationException(SR.Xml_CannotStartDocumentOnFragment); 1275throw new InvalidOperationException(SR.Xml_ClosedOrError); 1279throw new InvalidOperationException(SR.Format(SR.Xml_WrongToken, tokenName[(int)token], GetStateName(_currentState)));
System\Xml\Core\XsdCachingReader.cs (1)
585throw new InvalidOperationException();
System\Xml\Core\XsdValidatingReader.cs (2)
1562throw new InvalidOperationException(); 2028throw new InvalidOperationException();
System\Xml\Core\XsdValidatingReaderAsync.cs (1)
521throw new InvalidOperationException();
System\Xml\Dom\DocumentSchemaValidator.cs (4)
154throw new InvalidOperationException(SR.Format(SR.XmlDocument_ValidateInvalidNodeType, null)); 270throw new InvalidOperationException(SR.Format(SR.Xml_InvalidXmlDocument, SR.Xdom_NoRootEle)); 316throw new InvalidOperationException(SR.Format(SR.Xml_UnexpectedNodeType, _currentNode.NodeType)); 753throw new InvalidOperationException(SR.Format(SR.Xml_UnexpectedNodeType, _currentNode!.NodeType));
System\Xml\Dom\DocumentXmlWriter.cs (12)
170throw new InvalidOperationException(); 187throw new InvalidOperationException(); 218throw new InvalidOperationException(); 268throw new InvalidOperationException(); 375throw new InvalidOperationException(SR.Xpn_MissingParent); 388throw new InvalidOperationException(SR.Xpn_MissingParent); 417throw new InvalidOperationException(SR.Xpn_NoContent); 459throw new InvalidOperationException(SR.Xpn_MissingParent); 466throw new InvalidOperationException(SR.Xpn_BadPosition); 470throw new InvalidOperationException(SR.Xdom_Node_Modify_ReadOnly); 517throw new InvalidOperationException(); 625throw new InvalidOperationException(SR.Xml_ClosedOrError);
System\Xml\Dom\DocumentXPathNavigator.cs (17)
69throw new InvalidOperationException(SR.Xdom_Node_Modify_ReadOnly); 80throw new InvalidOperationException(SR.Xpn_BadPosition); 1267throw new InvalidOperationException(SR.XmlDocument_NoSchemaInfo); 1509throw new InvalidOperationException(SR.Xpn_BadPosition); 1526throw new InvalidOperationException(SR.Xpn_BadPosition); 1543throw new InvalidOperationException(SR.Xpn_BadPosition); 1566throw new InvalidOperationException(SR.Xpn_BadPosition); 1587throw new InvalidOperationException(SR.Xpn_BadPosition); 1616throw new InvalidOperationException(SR.Xpn_BadPosition); 1635throw new InvalidOperationException(SR.Xpn_BadPosition); 1694throw new InvalidOperationException(SR.Xpn_BadPosition); 1705throw new InvalidOperationException(SR.Xpn_BadPosition); 1756throw new InvalidOperationException(SR.Xpn_BadPosition); 1767throw new InvalidOperationException(SR.Xpn_MissingParent); 1771throw new InvalidOperationException(SR.Xdom_Node_Modify_ReadOnly); 1782throw new InvalidOperationException(SR.Xpn_MissingParent); 1787throw new InvalidOperationException(SR.Xdom_Node_Modify_ReadOnly);
System\Xml\Dom\XmlChildEnumerator.cs (1)
60throw new InvalidOperationException(SR.Xml_InvalidOperation);
System\Xml\Dom\XmlDocument.cs (9)
474throw new InvalidOperationException(SR.Xdom_DualDocumentTypeNode); 479throw new InvalidOperationException(SR.Xdom_DualDocumentElementNode); 484throw new InvalidOperationException(SR.Xdom_DualDeclarationNode); 961throw new InvalidOperationException(SR.Xdom_Import_NullNode); 1023throw new InvalidOperationException(SR.Format(CultureInfo.InvariantCulture, SR.Xdom_Import, node.NodeType)); 1371throw new InvalidOperationException(SR.Xdom_Document_Innertext); 1491throw new InvalidOperationException(SR.XmlDocument_NoSchemaInfo); 1775throw new InvalidOperationException(SR.Xdom_Node_Insert_TypeConflict); 1778throw new InvalidOperationException(SR.Xdom_Node_Insert_Location);
System\Xml\Dom\XmlElement.cs (1)
313throw new InvalidOperationException(SR.Xdom_Attr_InUse);
System\Xml\Dom\XmlElementList.cs (1)
318throw new InvalidOperationException(SR.Xdom_Enum_ElementList);
System\Xml\Dom\XmlEntity.cs (3)
29throw new InvalidOperationException(SR.Xdom_Node_Cloning); 65throw new InvalidOperationException(SR.Xdom_Ent_Innertext); 136set { throw new InvalidOperationException(SR.Xdom_Set_InnerXml); }
System\Xml\Dom\XmlEntityReference.cs (1)
71throw new InvalidOperationException(SR.Xdom_EntRef_SetVal);
System\Xml\Dom\XmlLoader.cs (1)
1002return new InvalidOperationException(SR.Format(CultureInfo.InvariantCulture, SR.Xml_UnexpectedNodeType, nodetype.ToString()));
System\Xml\Dom\XmlNamedNodeMap.SmallXmlNodeList.cs (1)
156throw new InvalidOperationException();
System\Xml\Dom\XmlNode.cs (13)
114set { throw new InvalidOperationException(SR.Format(CultureInfo.InvariantCulture, SR.Xdom_Node_SetVal, NodeType.ToString())); } 257throw new InvalidOperationException(SR.Xdom_Node_Insert_Contain); 271throw new InvalidOperationException(SR.Xdom_Node_Insert_Location); 292throw new InvalidOperationException(SR.Xdom_Node_Insert_TypeConflict); 371throw new InvalidOperationException(SR.Xdom_Node_Insert_Contain); 385throw new InvalidOperationException(SR.Xdom_Node_Insert_Location); 407throw new InvalidOperationException(SR.Xdom_Node_Insert_TypeConflict); 491throw new InvalidOperationException(SR.Xdom_Node_Remove_Contain); 584throw new InvalidOperationException(SR.Xdom_Node_Insert_Contain); 612throw new InvalidOperationException(SR.Xdom_Node_Insert_TypeConflict); 616throw new InvalidOperationException(SR.Xdom_Node_Insert_Location); 1003throw new InvalidOperationException(SR.Xdom_Set_InnerXml); 1321throw new InvalidOperationException(SR.Xdom_Node_Modify_ReadOnly);
System\Xml\Dom\XmlNodeReader.cs (2)
1728throw new InvalidOperationException(SR.Xml_InvalidOperation); 1775throw new InvalidOperationException(SR.Xnr_ResolveEntity);
System\Xml\Dom\XmlNotation.cs (2)
44throw new InvalidOperationException(SR.Xdom_Node_Cloning); 82set { throw new InvalidOperationException(SR.Xdom_Set_InnerXml); }
System\Xml\Dom\XmlText.cs (1)
111throw new InvalidOperationException(SR.Xdom_TextNode_SplitText);
System\Xml\EmptyEnumerator.cs (1)
24throw new InvalidOperationException(SR.Xml_InvalidOperation);
System\Xml\Schema\ContentValidator.cs (5)
399throw new InvalidOperationException(); 405get { throw new InvalidOperationException(); } 1062throw new InvalidOperationException(); 1068throw new InvalidOperationException(); 1074throw new InvalidOperationException();
System\Xml\Schema\NamespaceList.cs (1)
96throw new InvalidOperationException();
System\Xml\Schema\XdrBuilder.cs (1)
563throw new InvalidOperationException(SR.Xml_InvalidOperation); // should never be called
System\Xml\Schema\XmlSchemaObjectTable.cs (8)
287throw new InvalidOperationException(SR.Format(SR.Sch_EnumNotStarted, string.Empty)); 291throw new InvalidOperationException(SR.Format(SR.Sch_EnumFinished, string.Empty)); 346throw new InvalidOperationException(SR.Format(SR.Sch_EnumNotStarted, string.Empty)); 350throw new InvalidOperationException(SR.Format(SR.Sch_EnumFinished, string.Empty)); 362throw new InvalidOperationException(SR.Format(SR.Sch_EnumNotStarted, string.Empty)); 366throw new InvalidOperationException(SR.Format(SR.Sch_EnumFinished, string.Empty)); 378throw new InvalidOperationException(SR.Format(SR.Sch_EnumNotStarted, string.Empty)); 382throw new InvalidOperationException(SR.Format(SR.Sch_EnumFinished, string.Empty));
System\Xml\Schema\XmlSchemaValidator.cs (9)
367throw new InvalidOperationException(SR.Format(SR.Sch_InvalidStateTransition, new string[] { s_methodNames[(int)_currentState], s_methodNames[(int)ValidatorState.Start] })); 377throw new InvalidOperationException(SR.Format(SR.Sch_InvalidStateTransition, new string[] { s_methodNames[(int)_currentState], s_methodNames[(int)ValidatorState.Start] })); 879throw new InvalidOperationException(SR.Sch_InvalidEndElementCall); 889throw new InvalidOperationException(SR.Format(SR.Sch_InvalidEndElementMultiple, s_methodNames[(int)ValidatorState.SkipToEndElement])); 922throw new InvalidOperationException(SR.Sch_InvalidEndValidation); 1159throw new InvalidOperationException(SR.Format(SR.Sch_InvalidEndElementMultiple, s_methodNames[(int)ValidatorState.EndElement])); 1210throw new InvalidOperationException(SR.Sch_InvalidEndElementCallTyped); 2066throw new InvalidOperationException(SR.Format(SR.Sch_InvalidStartTransition, new string[] { methodName, s_methodNames[(int)ValidatorState.Start] })); 2068throw new InvalidOperationException(SR.Format(SR.Sch_InvalidStateTransition, new string[] { s_methodNames[(int)_currentState], methodName }));
System\Xml\Serialization\CodeGenerator.cs (2)
1040throw new InvalidOperationException(SR.Format(SR.ArrayTypeIsNotSupported, arrayElementType.AssemblyQualifiedName)); 1085throw new InvalidOperationException(SR.Format(SR.ArrayTypeIsNotSupported, arrayElementType.AssemblyQualifiedName));
System\Xml\Serialization\Compilation.cs (12)
75throw new InvalidOperationException(ex.Message, ex); 88throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Failed to generate XmlSerializer assembly, but did not throw")); 190throw new InvalidOperationException(SR.Format(SR.XmlPregenInvalidXmlSerializerAssemblyAttribute, "AssemblyName", "CodeBase")); 350throw new InvalidOperationException(SR.Format(SR.XmlPregenTypeDynamic, types[i]!.FullName)); 543throw new InvalidOperationException(SR.Format(SR.XmlMissingType, typeName, assembly.FullName)); 569throw new InvalidOperationException(SR.Format(SR.XmlInvalidEncoding3, encodingStyle, Soap.Encoding, Soap12.Encoding)); 574throw new InvalidOperationException(SR.Format(SR.XmlInvalidEncodingNotEncoded1, encodingStyle)); 601throw new InvalidOperationException(SR.Format(SR.XmlTypeInBadLoadContext, t.FullName)); 619throw new InvalidOperationException(SR.Format(SR.XmlNotSerializable, mapping.Accessor.Name)); 627throw new InvalidOperationException(SR.XmlNoPartialTrust, e); 646throw new InvalidOperationException(SR.Format(SR.XmlNotSerializable, mapping.Accessor.Name)); 654throw new InvalidOperationException(SR.XmlNoPartialTrust, e);
System\Xml\Serialization\Mappings.cs (15)
242throw new InvalidOperationException(SR.Format(SR.Xml_InvalidNameChars, Name)); 599throw new InvalidOperationException(SR.Format(SR.XmlHiddenMember, parent, member.Name, member.TypeDesc!.FullName, this.TypeName, _members[i].Name, _members[i].TypeDesc!.FullName)); 602throw new InvalidOperationException(SR.Format(SR.XmlInvalidXmlOverride, parent, member.Name, this.TypeName, _members[i].Name)); 626throw new InvalidOperationException(SR.Format(SR.XmlIllegalSimpleContentExtension, TypeDesc!.FullName, BaseMapping.TypeDesc.FullName)); 639throw new InvalidOperationException(SR.Format(SR.XmlIllegalTypedTextAttribute, TypeDesc!.FullName, text.Name, text.Mapping.TypeDesc.FullName)); 1083throw new InvalidOperationException(SR.Format(SR.XmlCircularDerivation, TypeDesc!.FullName)); 1208throw new InvalidOperationException(SR.Format(SR.XmlSerializableSchemaError, nameof(IXmlSerializable), args.Message)); 1241throw new InvalidOperationException(SR.Format(SR.XmlSerializableRootDupName, _getSchemaMethod!.DeclaringType!.FullName, e.Name, elementNs)); 1294throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaEmptyTypeName, _type!.FullName, _getSchemaMethod.Name)); 1299throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaMethodReturnType, _type!.Name, _getSchemaMethod.Name, nameof(XmlSchemaProviderAttribute), typeof(XmlQualifiedName).FullName)); 1323throw new InvalidOperationException(SR.Format(SR.XmlMissingSchema, _xsiType.Namespace)); 1327throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaInclude, _xsiType.Namespace, _getSchemaMethod.DeclaringType!.FullName, _getSchemaMethod.Name)); 1332throw new InvalidOperationException(SR.Format(SR.XmlMissingSchema, _xsiType.Namespace)); 1337throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaTypeMissing, _getSchemaMethod.DeclaringType!.FullName, _getSchemaMethod.Name, _xsiType.Name, _xsiType.Namespace)); 1350if (string.IsNullOrEmpty(_schema.Id)) throw new InvalidOperationException(SR.Format(SR.XmlSerializableNameMissing1, _type!.FullName));
System\Xml\Serialization\Models.cs (3)
210throw new InvalidOperationException(SR.Format(SR.XmlSerializerUnsupportedMember, $"{member.DeclaringType!.FullName}.{member.Name}", type.FullName), typeDesc.Exception); 308throw new InvalidOperationException(SR.Format(SR.XmlInvalidSpecifiedType, specifiedField.Name, specifiedField.FieldType.FullName, typeof(bool).FullName)); 325throw new InvalidOperationException(SR.Format(SR.XmlInvalidSpecifiedType, specifiedProperty.Name, specifiedProperty.PropertyType.FullName, typeof(bool).FullName));
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (15)
608throw new InvalidOperationException(SR.XmlInternalError); 649throw new InvalidOperationException(SR.XmlInternalError); 675throw new InvalidOperationException(SR.XmlInternalError); 697throw new InvalidOperationException(SR.XmlInternalError); 933throw new InvalidOperationException(SR.XmlInternalError); 1005throw new InvalidOperationException(SR.XmlInternalError); 1010throw new InvalidOperationException(SR.XmlInternalError); 1075throw new InvalidOperationException(SR.XmlInternalError); 1121throw new InvalidOperationException(SR.XmlInternalError); 1223_ => throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, $"unknown FormatterName: {mapping.TypeDesc.FormatterName}")), 1233throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, $"unknown FormatterName: {mapping.TypeDesc.FormatterName}")); 1521throw new InvalidOperationException(SR.XmlInternalError); 1658throw new InvalidOperationException(SR.Format(SR.XmlSequenceHierarchy, structMapping.TypeDesc.FullName, mapping.Name, declaringMapping!.TypeDesc!.FullName, "Order")); 1965throw new InvalidOperationException(SR.XmlInternalError); 2111throw new InvalidOperationException(SR.XmlInternalError);
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (9)
317throw new InvalidOperationException(SR.XmlInternalError); 352throw new InvalidOperationException(SR.XmlInternalError); 458throw new InvalidOperationException(SR.XmlInternalError); 483throw new InvalidOperationException(SR.XmlInternalError); 772throw new InvalidOperationException(SR.XmlInternalError); 896throw new InvalidOperationException(SR.XmlInternalError); 1117throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Invalid DateTime")); 1159throw new InvalidOperationException(SR.XmlInternalError); 1372throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, $"Could not find member named {memberName} of type {declaringType}"));
System\Xml\Serialization\SchemaImporter.cs (2)
96throw new InvalidOperationException(SR.Format(SR.XmlInvalidBaseType, structMapping.TypeDesc!.FullName, baseType.FullName, typeDescToChange.BaseTypeDesc.FullName)); 145throw new InvalidOperationException(string.Format(error, name.Name, name.Namespace));
System\Xml\Serialization\SoapAttributeOverrides.cs (1)
32throw new InvalidOperationException(SR.Format(SR.XmlMultipleAttributeOverrides, type.FullName, member));
System\Xml\Serialization\SoapReflectionImporter.cs (21)
139return new InvalidOperationException(SR.Format(SR.XmlReflectionError, context), e); 169throw new InvalidOperationException(SR.Format(SR.XmlInvalidDataTypeUsage, dataType, "SoapElementAttribute.DataType")); 174throw new InvalidOperationException(SR.Format(SR.XmlInvalidXsdDataType, dataType, "SoapElementAttribute.DataType", new XmlQualifiedName(dataType, XmlSchema.Namespace).ToString())); 178throw new InvalidOperationException(SR.Format(SR.XmlDataTypeMismatch, dataType, "SoapElementAttribute.DataType", model.TypeDesc.FullName)); 185throw new InvalidOperationException(SR.Format(SR.XmlInvalidTypeAttributes, model.Type.FullName)); 253throw new InvalidOperationException(SR.Format(SR.XmlTypesDuplicate, typeDesc.FullName, mapping.TypeDesc!.FullName, typeName, ns)); 276throw new InvalidOperationException(SR.Format(SR.XmlTypesDuplicate, typeDesc.FullName, existingMapping.TypeDesc!.FullName, typeDesc.Name, existingMapping.Namespace)); 281throw new InvalidOperationException(SR.Format(SR.XmlTypesDuplicate, typeDesc.FullName, existingMapping.TypeDesc!.FullName, typeDesc.Name, existingMapping.Namespace)); 340throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "DeferredWorkItems.Count have changed")); 342throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "DeferredWorkItems.Top have changed")); 502throw new InvalidOperationException(SR.Format(SR.XmlInvalidSoapArray, mapping.TypeDesc!.FullName)); 541throw new InvalidOperationException(SR.Format(SR.XmlUdeclaredXsdType, dataType)); 583throw new InvalidOperationException(SR.Format(SR.XmlNoSerializableMembers, model.TypeDesc.FullName)); 595throw new InvalidOperationException(SR.XmlInvalidEnumAttribute); 619if (i > 0) throw new InvalidOperationException(SR.XmlInvalidReturnPosition); 690throw new InvalidOperationException(SR.XmlInvalidVoid); 697throw new InvalidOperationException(SR.Format(SR.XmlIllegalSoapAttribute, accessorName, accessor.TypeDesc.FullName)); 700throw new InvalidOperationException(SR.XmlInvalidElementAttribute); 714throw new InvalidOperationException(SR.XmlInvalidElementAttribute); 751throw new InvalidOperationException(SR.Format(SR.XmlInvalidDefaultEnumValue, a.SoapDefaultValue.GetType().FullName, fieldTypeDesc.FullName)); 755throw new InvalidOperationException(SR.Format(SR.XmlInvalidDefaultValue, strValue, a.SoapDefaultValue.GetType().FullName));
System\Xml\Serialization\Types.cs (9)
396_exception = new InvalidOperationException(SR.Format(SR.XmlConstructorInaccessible, FullName)); 712throw new InvalidOperationException(SR.Format(SR.XmlUnsupportedOpenGenericType, type)); 776exception = new InvalidOperationException(SR.Format(SR.XmlTypeInaccessible, type.FullName)); 781exception = new InvalidOperationException(SR.Format(SR.XmlTypeStatic, type.FullName)); 1085throw new InvalidOperationException(SR.Format(SR.XmlReadOnlyPropertyError, propertyInfo.DeclaringType, propertyInfo.Name)); 1305throw new InvalidOperationException(SR.Format(SR.XmlNoAddMethod, type.FullName, currentType, "IEnumerable")); 1356throw new InvalidOperationException(SR.Format(SR.XmlNoDefaultAccessors, type.FullName)); 1361throw new InvalidOperationException(SR.Format(SR.XmlNoAddMethod, type.FullName, indexer.PropertyType, "ICollection")); 1391throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayTypeSyntax, type));
System\Xml\Serialization\XmlAttributeOverrides.cs (1)
42throw new InvalidOperationException(SR.Format(SR.XmlAttributeSetAgain, type.FullName, member));
System\Xml\Serialization\Xmlcustomformatter.cs (3)
186if (ids.Length != vals.Length) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Invalid enum")); 215throw new InvalidOperationException(SR.Format(SR.XmlUnknownConstant, originalValue, typeName ?? "enum")); 464throw new InvalidOperationException(SR.Format(SR.XmlUnknownConstant, parts[i], typeName));
System\Xml\Serialization\XmlMapping.cs (1)
126throw new InvalidOperationException(SR.XmlMelformMapping);
System\Xml\Serialization\XmlReflectionImporter.cs (97)
126throw new InvalidOperationException(SR.Format(SR.XmlAnonymousInclude, type.FullName)); 273throw new InvalidOperationException(SR.Format(SR.XmlInvalidNotNullable, model.TypeDesc.BaseTypeDesc!.FullName, "XmlRoot")); 328throw new InvalidOperationException(SR.Format(SR.XmlCannotReconcileAccessorDefault, accessor.Name, accessor.Namespace, value1, value2)); 333throw new InvalidOperationException(SR.Format(SR.XmlMethodTypeNameConflict, accessor.Name, accessor.Namespace)); 339throw new InvalidOperationException(SR.Format(SR.XmlCannotReconcileAccessor, accessor.Name, accessor.Namespace, GetMappingName(existing.Mapping!), GetMappingName(accessor.Mapping))); 356throw new InvalidOperationException(SR.Format(SR.XmlCannotReconcileAttributeAccessor, accessor.Name, accessor.Namespace, GetMappingName(existing.Mapping!), GetMappingName(accessor.Mapping!))); 358throw new InvalidOperationException(SR.Format(SR.XmlCannotReconcileAccessor, accessor.Name, accessor.Namespace, GetMappingName(existing.Mapping!), GetMappingName(accessor.Mapping!))); 363return new InvalidOperationException(SR.Format(SR.XmlReflectionError, context), e); 368return new InvalidOperationException(SR.Format(SR.XmlTypeReflectionError, context), e); 373return new InvalidOperationException(SR.Format(model.IsProperty ? SR.XmlPropertyReflectionError : SR.XmlFieldReflectionError, model.Name), e); 392throw new InvalidOperationException(SR.Format(SR.XmlInvalidDataTypeUsage, dataType, "XmlElementAttribute.DataType")); 397throw new InvalidOperationException(SR.Format(SR.XmlInvalidXsdDataType, dataType, "XmlElementAttribute.DataType", new XmlQualifiedName(dataType, XmlSchema.Namespace).ToString())); 401throw new InvalidOperationException(SR.Format(SR.XmlDataTypeMismatch, dataType, "XmlElementAttribute.DataType", modelTypeDesc.FullName)); 408throw new InvalidOperationException(SR.Format(SR.XmlInvalidTypeAttributes, model.Type.FullName)); 449throw new InvalidOperationException(SR.Format(SR.XmlSerializableAttributes, model.TypeDesc.FullName, nameof(XmlSchemaProviderAttribute))); 485throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaMethodMissing, provider.MethodName, nameof(XmlSchemaSet), type.FullName)); 488throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaMethodReturnType, type.Name, provider.MethodName, nameof(XmlSchemaProviderAttribute), typeof(XmlQualifiedName).FullName, typeof(XmlSchemaType).FullName)); 578throw new InvalidOperationException(SR.Format(SR.XmlMissingSchema, baseQname.Namespace)); 582throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaInclude, baseQname.Namespace, nameof(IXmlSerializable), "GetSchema")); 609return new InvalidOperationException(SR.Format(SR.XmlInvalidAttributeUse, type.FullName)); 614return new InvalidOperationException(SR.Format(SR.XmlIllegalTypeContext, typeDesc.FullName, GetContextName(context))); 658throw new InvalidOperationException(SR.Format(SR.XmlTypesDuplicate, typeDesc.FullName, existingMapping.TypeDesc!.FullName, typeDesc.Name, existingMapping.Namespace)); 663throw new InvalidOperationException(SR.Format(SR.XmlTypesDuplicate, typeDesc.FullName, existingMapping.TypeDesc!.FullName, typeDesc.Name, existingMapping.Namespace)); 706throw new InvalidOperationException(SR.Format(SR.XmlTypesDuplicate, typeDesc.FullName, mapping.TypeDesc!.FullName, typeName, ns)); 762throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "DeferredWorkItems.Count have changed")); 764throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "DeferredWorkItems.Top have changed")); 856throw new InvalidOperationException(SR.Format(SR.XmlIllegalTypedTextAttribute, typeName, member.Text.Name, member.Text.Mapping.TypeDesc.FullName)); 859throw new InvalidOperationException(SR.Format(SR.XmlIllegalMultipleText, model.Type.FullName)); 866throw new InvalidOperationException(SR.Format(SR.XmlMultipleXmlns, model.Type.FullName)); 897throw new InvalidOperationException(SR.Format(SR.XmlSequenceUnique, member.SequenceId.ToString(CultureInfo.InvariantCulture), "Order", member.Name)); 903throw new InvalidOperationException(SR.Format(SR.XmlSequenceInconsistent, "Order", member.Name)); 913throw new InvalidOperationException(SR.Format(SR.XmlMultipleXmlns, model.Type.FullName)); 1153throw new InvalidOperationException(SR.Format(SR.XmlUdeclaredXsdType, dataType)); 1188throw new InvalidOperationException(SR.Format(SR.XmlIllegalAttributeFlagsArray, model.TypeDesc.FullName)); 1203throw new InvalidOperationException(SR.Format(SR.XmlNoSerializableMembers, model.TypeDesc.FullName)); 1216throw new InvalidOperationException(SR.XmlInvalidConstantAttribute); 1248throw new InvalidOperationException(SR.XmlRpcLitAttributeAttributes); 1252throw new InvalidOperationException(SR.Format(SR.XmlInvalidAttributeType, "XmlAttribute")); 1258if (i > 0) throw new InvalidOperationException(SR.XmlInvalidReturnPosition); 1274throw new InvalidOperationException(SR.XmlIllegalMultipleTextMembers); 1282throw new InvalidOperationException(SR.XmlMultipleXmlnsMembers); 1297throw new InvalidOperationException(SR.Format(SR.XmlSequenceMembers, "Order")); 1412throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierType, identifierName, memberName, type.GetElementType()!.FullName)); 1419throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierArrayType, identifierName, memberName, type.FullName)); 1425throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierTypeEnum, identifierName)); 1440throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMemberMissing, choice.MemberName, accessorName)); 1457throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMemberMissing, choice.MemberName, accessorName)); 1464throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierAmbiguous, choice.MemberName)); 1471throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMemberMissing, choice.MemberName, accessorName)); 1552throw new InvalidOperationException(SR.XmlIllegalAttributesArrayAttribute); 1558throw new InvalidOperationException(SR.Format(SR.XmlIllegalAttrOrTextInterface, accessorName, accessor.TypeDesc.ArrayElementTypeDesc.FullName, nameof(IXmlSerializable))); 1562throw new InvalidOperationException(SR.Format(SR.XmlIllegalAttrOrText, accessorName, accessor.TypeDesc.ArrayElementTypeDesc.FullName)); 1599throw new InvalidOperationException(SR.XmlIllegalElementsArrayAttribute); 1609throw new InvalidOperationException(SR.Format(SR.XmlIllegalArrayTextAttribute, accessorName)); 1637throw new InvalidOperationException(SR.Format(SR.XmlInvalidNotNullable, typeModel.TypeDesc.BaseTypeDesc!.FullName, "XmlElement")); 1650throw new InvalidOperationException(SR.Format(SR.XmlSequenceMatch, "Order")); 1662throw new InvalidOperationException(SR.Format(SR.XmlIllegalAnyElement, arrayElementType.FullName)); 1673throw new InvalidOperationException(SR.Format(SR.XmlAnyElementDuplicate, accessorName, xmlAnyElement.Name, xmlAnyElement.Namespace ?? "null")); 1700throw new InvalidOperationException(SR.Format(SR.XmlSequenceMatch, "Order")); 1710throw new InvalidOperationException(SR.XmlIllegalArrayArrayAttribute); 1744throw new InvalidOperationException(SR.XmlIllegalAttribute); 1748if (a.XmlAnyElements.Count > 0) throw new InvalidOperationException(SR.Format(SR.XmlIllegalAnyElement, accessor.TypeDesc.FullName)); 1752if (a.XmlElements.Count > 0) throw new InvalidOperationException(SR.XmlIllegalAttribute); 1753if (a.XmlAttribute.Type != null) throw new InvalidOperationException(SR.Format(SR.XmlIllegalType, "XmlAttribute")); 1779throw new InvalidOperationException(SR.Format(SR.XmlIllegalType, "XmlText")); 1796throw new InvalidOperationException(SR.Format(SR.XmlIllegalType, "XmlElement")); 1810throw new InvalidOperationException(SR.Format(SR.XmlInvalidNotNullable, typeModel.TypeDesc.BaseTypeDesc!.FullName, "XmlElement")); 1823throw new InvalidOperationException(SR.Format(SR.XmlSequenceMatch, "Order")); 1834throw new InvalidOperationException(SR.XmlSoleXmlnsAttribute); 1838throw new InvalidOperationException(SR.Format(SR.XmlXmlnsInvalidType, accessorName, accessorType.FullName, typeof(System.Xml.Serialization.XmlSerializerNamespaces).FullName)); 1849throw new InvalidOperationException(SR.Format(SR.XmlIllegalAttrOrTextInterface, accessorName, accessor.TypeDesc.FullName, nameof(IXmlSerializable))); 1853throw new InvalidOperationException(SR.Format(SR.XmlIllegalAttrOrText, accessorName, accessor.TypeDesc)); 1878throw new InvalidOperationException(SR.Format(SR.XmlInvalidNotNullable, typeModel.TypeDesc.BaseTypeDesc!.FullName, "XmlElement")); 1891throw new InvalidOperationException(SR.Format(SR.XmlSequenceMatch, "Order")); 1903throw new InvalidOperationException(SR.Format(SR.XmlIllegalAnyElement, accessorType.FullName)); 1915throw new InvalidOperationException(SR.Format(SR.XmlAnyElementDuplicate, accessorName, xmlAnyElement.Name, xmlAnyElement.Namespace ?? "null")); 1940throw new InvalidOperationException(SR.Format(SR.XmlSequenceMatch, "Order")); 1954throw new InvalidOperationException(SR.Format(SR.XmlRpcLitArrayElement, accessor.Elements[0].Name)); 1957throw new InvalidOperationException(SR.Format(SR.XmlRpcLitXmlns, accessor.Name)); 2003throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingAnyValue, accessor.ChoiceIdentifier.Mapping!.TypeDesc!.FullName)); 2009throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingValue, accessor.ChoiceIdentifier.Mapping!.TypeDesc!.FullName, id, element.Name, element.Namespace)); 2025throw new InvalidOperationException(SR.XmlRpcLitAttributeAttributes); 2028throw new InvalidOperationException(SR.XmlRpcLitAttributes); 2034throw new InvalidOperationException(SR.XmlRpcLitElements); 2039throw new InvalidOperationException(SR.Format(SR.XmlRpcLitElementNamespace, "Namespace", xmlElement.Namespace)); 2043throw new InvalidOperationException(SR.Format(SR.XmlRpcLitElementNullable, "IsNullable", "true")); 2048throw new InvalidOperationException(SR.Format(SR.XmlRpcLitElementNamespace, "Namespace", a.XmlArray.Namespace)); 2065throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMissing, nameof(XmlChoiceIdentifierAttribute), accessorName)); 2076throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMissing, nameof(XmlChoiceIdentifierAttribute), accessorName)); 2091throw new InvalidOperationException(SR.Format(SR.XmlArrayItemAmbiguousTypes, accessorName, item.ElementName, items[i]!.ElementName, nameof(XmlElementAttribute), nameof(XmlChoiceIdentifierAttribute), accessorName)); 2114throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdDuplicate, choiceMapping.TypeName, choiceId)); 2135throw new InvalidOperationException(SR.Format(SR.XmlInvalidDefaultValue, strValue, a.XmlDefaultValue.GetType().FullName)); 2168throw new InvalidOperationException(SR.Format(SR.XmlDuplicateElementName, existing.Name, existing.Namespace)); 2174throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Bad accessor type " + accessor.GetType().FullName)); 2176throw new InvalidOperationException(SR.Format(SR.XmlDuplicateAttributeName, existing.Name, existing.Namespace)); 2202if (isQualified && form == XmlSchemaForm.Unqualified) throw new InvalidOperationException(SR.XmlInvalidFormUnqualified); 2209if (isNullable && !typeDesc.IsNullable) throw new InvalidOperationException(SR.Format(SR.XmlInvalidIsNullable, typeDesc.FullName));
System\Xml\Serialization\XmlSchemaExporter.cs (24)
79throw new InvalidOperationException(SR.Format(SR.XmlBareAttributeMember, member.Attribute.Name)); 81throw new InvalidOperationException(SR.Format(SR.XmlBareTextMember, member.Text.Name)); 86throw new InvalidOperationException(SR.Format(SR.XmlIllegalArrayElement, member.Elements[0].Name)); 225throw new InvalidOperationException(SR.XmlMappingsScopeMismatch); 236throw new InvalidOperationException(SR.XmlIllegalWildcard); 261throw new InvalidOperationException(SR.Format(SR.XmlDuplicateTypeName, newTypeName, newNamespace)); 287throw new InvalidOperationException(SR.Format(SR.XmlIllegalForm, e.Name)); 293throw new InvalidOperationException(SR.Format(SR.XmlIllegalForm, a.Name)); 511throw new InvalidOperationException(SR.Format(SR.XmlDuplicateNamespace, anyNs)); 562throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, $"Unsupported anonymous mapping type: {mapping}")); 619throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Type " + mapping.TypeName + " from namespace '" + ns + "' is an invalid array mapping")); 681throw new InvalidOperationException(SR.Format(SR.XmlInvalidContent, type.ContentModel.Content!.GetType().Name)); 792throw new InvalidOperationException(SR.XmlInternalError); 876if (value.GetType() != typeof(string)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, SR.Format(SR.XmlInvalidDefaultValue, value, value.GetType().FullName))); 916throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Mapping for " + pm.TypeDesc.Name + " missing type property")); 932throw new InvalidOperationException(SR.Format(SR.XmlInvalidDefaultValue, value, pm.TypeDesc.Name)); 935throw new InvalidOperationException(SR.Format(SR.XmlInvalidDefaultValue, value, pm.TypeDesc.Name)); 969throw new InvalidOperationException(SR.Format(SR.XmlCircularReference2, mapping.TypeDesc.Name, "AnonymousType", "false")); 975if (!mapping.IncludeInSchema) throw new InvalidOperationException(SR.Format(SR.XmlCannotIncludeInSchema, mapping.TypeDesc.Name)); 990throw new InvalidOperationException(SR.Format(SR.XmlAnonymousBaseType, mapping.TypeDesc.Name, mapping.BaseMapping.TypeDesc!.Name, "AnonymousType", "false")); 1051throw new InvalidOperationException(SR.Format(SR.XmlIllegalMultipleText, name)); 1074throw new InvalidOperationException(SR.Format(SR.XmlInvalidContent, type.ContentModel.Content!.GetType().Name)); 1096throw new InvalidOperationException(SR.Format(SR.XmlAnonymousBaseType, textMapping.TypeDesc!.Name, pm.TypeDesc!.Name, "AnonymousType", "false")); 1143if (!mapping.IncludeInSchema) throw new InvalidOperationException(SR.Format(SR.XmlCannotIncludeInSchema, mapping.TypeDesc!.Name));
System\Xml\Serialization\XmlSchemaImporter.cs (17)
67throw new InvalidOperationException(SR.Format(SR.XmlBadBaseElement, name.Name, name.Namespace, baseType.FullName)); 117throw new InvalidOperationException(SR.Format(SR.XmlBadBaseType, typeName.Name, typeName.Namespace, baseType.FullName)); 270throw new InvalidOperationException(SR.Format(SR.XmlElementHasNoName, parentType.Name, parentType.Namespace)); 349throw new InvalidOperationException(SR.Format(SR.XmlElementImportedTwice, element.Name, ns, mapping.GetType().Name, desiredMappingType.Name)); 416throw new InvalidOperationException(SR.XmlInternalError); 461if (!type.DerivedFrom.IsEmpty) throw new InvalidOperationException(SR.XmlMembersDeriveError); 523throw new InvalidOperationException(SR.Format(SR.XmlTypeUsedTwice, type.QualifiedName.Name, type.QualifiedName.Namespace)); 570throw new InvalidOperationException(SR.Format(SR.XmlIllegalOverride, type.Name, baseMember.Name, baseMember.TypeDesc!.FullName, structMapping.Members[i].TypeDesc!.FullName, declaringMapping!.TypeDesc!.FullName)); 966throw new InvalidOperationException(SR.Format(SR.XmlDuplicateElementInScope, element.Name, element.Namespace)); 970throw new InvalidOperationException(SR.Format(SR.XmlDuplicateElementInScope1, element.Name, element.Namespace)); 1577if (attribute.Name!.Length == 0) throw new InvalidOperationException(SR.XmlAttributeHasNoName); 1819throw new InvalidOperationException(SR.Format(SR.XmlMissingGroup, name.Name)); 1828throw new InvalidOperationException(SR.Format(SR.XmlMissingAttributeGroup, name.Name)); 1896throw new InvalidOperationException(SR.Format(SR.XmlInvalidEncoding, name)); 1900throw new InvalidOperationException(SR.Format(SR.XmlMissingDataType, name)); 1926throw new InvalidOperationException(SR.Format(SR.XmlMissingElement, name)); 1934throw new InvalidOperationException(SR.Format(SR.XmlMissingAttribute, name.Name));
System\Xml\Serialization\XmlSchemas.cs (7)
49throw new InvalidOperationException(SR.Format(SR.XmlSchemaDuplicateNamespace, ns)); 173if (_isCompiled) throw new InvalidOperationException(SR.XmlSchemaCompiled); 262throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "XmlSchemas.Find: Invalid object type " + type.FullName)); 393throw new InvalidOperationException(SR.Format(SR.XmlSchemaIncludeLocation, this.GetType().Name, external.SchemaLocation)); 415throw new InvalidOperationException(MergeFailedMessage(o, dest, schema.TargetNamespace)); 691throw new InvalidOperationException(GetSchemaItem(source, null, message), exception); 707throw new InvalidOperationException(SR.Format(SR.XmlSchemaSyntaxErrorDetails, ns, message, exception.LineNumber, exception.LinePosition), exception);
System\Xml\Serialization\XmlSerializationReader.cs (29)
948if (arrayInfo.dimensions != 1) throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayDimentions, CurrentTag())); 950if (qname.Name != name) throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayTypeName, qname.Name, name, CurrentTag())); 951if (qname.Namespace != ns) throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayTypeNamespace, qname.Namespace, ns, CurrentTag())); 1160throw new InvalidOperationException(SR.Format(SR.XmlUndefinedAlias, prefix)); 1285return new InvalidOperationException(SR.Format(SR.XmlUnknownType, type.Name, type.Namespace, CurrentTag())); 1290return new InvalidOperationException(SR.Format(SR.XmlReadOnlyCollection, name)); 1295return new InvalidOperationException(SR.Format(SR.XmlAbstractType, name, ns, CurrentTag())); 1300return new InvalidOperationException(SR.Format(SR.XmlConstructorInaccessible, typeName)); 1305return new InvalidOperationException(SR.Format(SR.XmlConstructorHasSecurityAttributes, typeName)); 1310return new InvalidOperationException(SR.Format(SR.XmlUnknownNode, CurrentTag())); 1315return new InvalidOperationException(SR.Format(SR.XmlUnknownConstant, value, enumType.Name)); 1335return new InvalidOperationException(SR.Format(SR.XmlSerializableBadDerivation, xsdDerived, nsDerived, xsdBase, nsBase, clrDerived, clrBase)); 1340return new InvalidOperationException(SR.Format(SR.XmlSerializableMissingClrType, name, ns, nameof(XmlIncludeAttribute), clrType)); 1425if (!href.StartsWith('#')) throw new InvalidOperationException(SR.Format(SR.XmlMissingHref, href)); 1476throw new InvalidOperationException(SR.Format(SR.XmlInvalidHref, id)); 1545throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayRef, id, o.GetType().FullName, i.ToString(CultureInfo.InvariantCulture))); 1577if (arrayInfo.dimensions != 1) throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayDimentions, CurrentTag())); 2448if (choiceSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Can not find " + member.ChoiceIdentifier.MemberName + " in the members mapping.")); 2815if (enumMethodName == null) throw new InvalidOperationException(SR.Format(SR.XmlMissingMethodEnum, mapping.TypeDesc!.Name)); 3059if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, derived.TypeDesc!.Name)); 3096if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, enumMapping.TypeDesc!.Name)); 3333throw new InvalidOperationException(SR.Format(SR.XmlSequenceHierarchy, structMapping.TypeDesc.FullName, mapping.Name, declaringMapping!.TypeDesc!.FullName, "Order")); 3811throw new InvalidOperationException(SR.XmlInternalError); 4074throw new InvalidOperationException(SR.XmlInternalError); 4624if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, element.Mapping.TypeDesc!.Name)); 4771if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc!.Name)); 4850throw new InvalidOperationException(SR.XmlInternalError); 4855throw new InvalidOperationException(SR.XmlInternalError); 4861if (choiceSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "need parent for the " + source));
System\Xml\Serialization\XmlSerializationReaderILGen.cs (12)
373if (choiceSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Can not find " + member.ChoiceIdentifier.MemberName + " in the members mapping.")); 693if (enumMethodName == null) throw new InvalidOperationException(SR.Format(SR.XmlMissingMethodEnum, mapping.TypeDesc!.Name)); 1153if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, derived.TypeDesc!.Name)); 1209if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, enumMapping.TypeDesc!.Name)); 1583throw new InvalidOperationException(SR.Format(SR.XmlSequenceHierarchy, structMapping.TypeDesc.FullName, mapping.Name, declaringMapping!.TypeDesc!.FullName, "Order")); 2083throw new InvalidOperationException(SR.XmlInternalError); 2375throw new InvalidOperationException(SR.XmlInternalError); 3011if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, element.Mapping.TypeDesc!.Name)); 3160if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc!.Name)); 3278throw new InvalidOperationException(SR.XmlInternalError); 3283throw new InvalidOperationException(SR.XmlInternalError); 3289if (choiceSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "need parent for the " + source));
System\Xml\Serialization\XmlSerializationWriter.cs (30)
498if (_objectsInUse.ContainsKey(o)) throw new InvalidOperationException(SR.Format(SR.XmlCircularReference, o.GetType().FullName)); 544throw new InvalidOperationException(SR.Format(SR.XmlInvalidXmlns, alias)); 656if (!_objectsInUse.ContainsKey(o)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "missing stack object of type " + o.GetType().FullName)); 781throw new InvalidOperationException(SR.XmlNoAttributeHere); 797throw new InvalidOperationException(SR.Format(SR.XmlElementNameMismatch, node.LocalName, node.NamespaceURI, name, ns)); 818if (typeof(IXmlSerializable).IsAssignableFrom(type)) return new InvalidOperationException(SR.Format(SR.XmlInvalidSerializable, type.FullName)); 820if (!typeDesc.IsStructLike) return new InvalidOperationException(SR.Format(SR.XmlInvalidUseOfType, type.FullName)); 821return new InvalidOperationException(SR.Format(SR.XmlUnxpectedType, type.FullName)); 827return new InvalidOperationException(SR.Format(SR.XmlChoiceMismatchChoiceException, elementName, value, enumValue)); 832return new InvalidOperationException(SR.Format(SR.XmlUnknownAnyElement, name, ns)); 837return new InvalidOperationException(SR.Format(SR.XmlInvalidChoiceIdentifierValue, type, identifier)); 843return new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMismatch, value, identifier, name, ns)); 848return new InvalidOperationException(SR.Format(SR.XmlUnknownConstant, value, typeName)); 858return new InvalidOperationException(SR.Format(SR.XmlIllegalAnyElement, type.FullName)); 927if (attr == null) throw new InvalidOperationException(SR.XmlNeedAttributeHere); 1282if (!typeof(IEnumerable).IsAssignableFrom(type)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "not array like type " + type.FullName)); 1446throw new InvalidOperationException(SR.Format(SR.XmlDuplicateNs, prefix, ns)); 1795throw new InvalidOperationException(SR.Format(SR.XmlSerializerUnsupportedType, memberInfos[0])); 2406if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc!.Name) + Environment.StackTrace); 2454if (defaultValue!.GetType() != typeof(string)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, name + " has invalid default type " + defaultValue.GetType().Name)); 2757if (enumSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Can not find " + member.ChoiceIdentifier.MemberName + " in the members mapping.")); 2985if (methodName == null) throw new InvalidOperationException("derived from " + mapping.TypeDesc!.FullName + ", " + SR.Format(SR.XmlInternalErrorMethod, derived.TypeDesc.Name) + Environment.StackTrace); 3024if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc.Name) + Environment.StackTrace); 3471throw new InvalidOperationException(SR.XmlInternalError); 3902throw new InvalidOperationException(SR.XmlInternalError); 4111if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, structMapping.TypeDesc!.Name) + Environment.StackTrace); 4170throw new InvalidOperationException(SR.XmlInternalError); 4375throw new InvalidOperationException(SR.Format(SR.XmlUnsupportedDefaultType, type.FullName)); 4484throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingAnyValue, choiceMapping.TypeDesc!.FullName)); 4487throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingValue, choiceMapping.TypeDesc!.FullName, $"{element.Namespace}:{element.Name}", element.Name, element.Namespace));
System\Xml\Serialization\XmlSerializationWriterILGen.cs (11)
132if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc!.Name)); 208if (defaultValue!.GetType() != typeof(string)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, name + " has invalid default type " + defaultValue.GetType().Name)); 532if (enumSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Can not find " + member.ChoiceIdentifier.MemberName + " in the members mapping.")); 762if (methodName == null) throw new InvalidOperationException("derived from " + mapping.TypeDesc!.FullName + ", " + SR.Format(SR.XmlInternalErrorMethod, derived.TypeDesc.Name)); 814if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc.Name)); 1393throw new InvalidOperationException(SR.XmlInternalError); 1914throw new InvalidOperationException(SR.XmlInternalError); 2018if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, structMapping.TypeDesc!.Name)); 2084throw new InvalidOperationException(SR.XmlInternalError); 2309throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingAnyValue, choiceMapping.TypeDesc!.FullName)); 2312throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingValue, choiceMapping.TypeDesc!.FullName, $"{element.Namespace}:{element.Name}", element.Name, element.Namespace));
System\Xml\Serialization\XmlSerializer.cs (9)
372throw new InvalidOperationException(SR.Format(SR.XmlInvalidEncodingNotEncoded1, encodingStyle)); 396throw new InvalidOperationException(SR.XmlGenError, e); 465throw new InvalidOperationException(SR.Format(SR.XmlInvalidEncodingNotEncoded1, encodingStyle)); 491throw new InvalidOperationException(SR.Format(SR.XmlSerializeErrorDetails, lineInfo.LineNumber.ToString(CultureInfo.InvariantCulture), lineInfo.LinePosition.ToString(CultureInfo.InvariantCulture)), e); 495throw new InvalidOperationException(SR.XmlSerializeError, e); 644throw new InvalidOperationException(SR.XmlMelformMapping); 653throw new InvalidOperationException(SR.Format(SR.XmlPregenTypeDynamic, type.FullName)); 898throw new InvalidOperationException(SR.Format(SR.XmlUnxpectedType, _primitiveType!.FullName)); 980throw new InvalidOperationException(SR.Format(SR.XmlUnxpectedType, _primitiveType!.FullName));
System\Xml\XPath\Internal\CompiledXPathExpr.cs (1)
223throw new InvalidOperationException(SR.Xml_InvalidOperation);
System\Xml\XPath\Internal\NumberFunctions.cs (1)
51_ => throw new InvalidOperationException(),
System\Xml\XPath\Internal\UnionExpr.cs (1)
161public override int CurrentPosition { get { throw new InvalidOperationException(); } }
System\Xml\XPath\Internal\XPathArrayIterator.cs (1)
58throw new InvalidOperationException(SR.Format(SR.Sch_EnumNotStarted, string.Empty));
System\Xml\XPath\XPathNavigator.cs (14)
118throw new InvalidOperationException(SR.Xpn_BadPosition); 559throw new InvalidOperationException(SR.Xpn_BadPosition); 997throw new InvalidOperationException(SR.XPathDocument_MissingSchemas); 1004throw new InvalidOperationException(SR.XPathDocument_MissingSchemas); 1015throw new InvalidOperationException(SR.Format(SR.XPathDocument_NotEnoughSchemaInfo, null)); 1021throw new InvalidOperationException(SR.XPathDocument_MissingSchemas); 1032throw new InvalidOperationException(SR.Format(SR.XPathDocument_NotEnoughSchemaInfo, null)); 1036throw new InvalidOperationException(SR.Format(SR.XPathDocument_ValidateInvalidNodeType, null)); 1307throw new InvalidOperationException(SR.Xpn_BadPosition); 1440throw new InvalidOperationException(SR.Xpn_BadPosition); 1466throw new InvalidOperationException(SR.Xpn_BadPosition); 1493throw new InvalidOperationException(SR.Xpn_BadPosition); 1520throw new InvalidOperationException(SR.Xpn_BadPosition); 1547throw new InvalidOperationException(SR.Xpn_BadPosition);
System\Xml\XPath\XPathNavigatorReader.cs (1)
820throw new InvalidOperationException(SR.Xml_InvalidOperation);
System\Xml\XPath\XPathNodeIterator.cs (2)
64throw new InvalidOperationException(SR.Format(SR.Sch_EnumFinished, string.Empty)); 71throw new InvalidOperationException(SR.Format(SR.Sch_EnumNotStarted, string.Empty));
System\Xml\Xsl\ListBase.cs (2)
245throw new InvalidOperationException(SR.Format(SR.Sch_EnumNotStarted, string.Empty)); 248throw new InvalidOperationException(SR.Format(SR.Sch_EnumFinished, string.Empty));
System\Xml\Xsl\XsltOld\ReaderOutput.cs (3)
399throw new InvalidOperationException(SR.Xml_InvalidOperation); 425throw new InvalidOperationException(SR.Xml_InvalidOperation); 540throw new InvalidOperationException(SR.Xml_InvalidOperation);
System\Xml\Xslt\XslCompiledTransform.cs (1)
401throw new InvalidOperationException(SR.Xslt_NoStylesheetLoaded);
System\Xml\Xslt\XslTransform.cs (1)
109throw new InvalidOperationException(SR.Xslt_NoStylesheetLoaded);
System.Private.Xml.Linq (56)
System\Xml\Linq\XAttribute.cs (1)
182if (parent == null) throw new InvalidOperationException(SR.InvalidOperation_MissingParent);
System\Xml\Linq\XContainer.cs (17)
390if ((object)s != (object)content) throw new InvalidOperationException(SR.InvalidOperation_ExternalCode); 405if (last != content || n != last.next) throw new InvalidOperationException(SR.InvalidOperation_ExternalCode); 559if (content != null) throw new InvalidOperationException(SR.InvalidOperation_ExternalCode); 616if (n.parent != null) throw new InvalidOperationException(SR.InvalidOperation_ExternalCode); 833if (r.ReadState != ReadState.Interactive) throw new InvalidOperationException(SR.InvalidOperation_ExpectedInteractive); 846if (r.ReadState != ReadState.Interactive) throw new InvalidOperationException(SR.InvalidOperation_ExpectedInteractive); 854if (r.ReadState != ReadState.Interactive) throw new InvalidOperationException(SR.InvalidOperation_ExpectedInteractive); 871if (r.ReadState != ReadState.Interactive) throw new InvalidOperationException(SR.InvalidOperation_ExpectedInteractive); 944if (!r.CanResolveEntity) throw new InvalidOperationException(SR.InvalidOperation_UnresolvedEntityReference); 950throw new InvalidOperationException(SR.Format(SR.InvalidOperation_UnexpectedNodeType, r.NodeType)); 1000if (!r.CanResolveEntity) throw new InvalidOperationException(SR.InvalidOperation_UnresolvedEntityReference); 1006throw new InvalidOperationException(SR.Format(SR.InvalidOperation_UnexpectedNodeType, r.NodeType)); 1098if (!r.CanResolveEntity) throw new InvalidOperationException(SR.InvalidOperation_UnresolvedEntityReference); 1104throw new InvalidOperationException(SR.Format(SR.InvalidOperation_UnexpectedNodeType, r.NodeType)); 1214if (!r.CanResolveEntity) throw new InvalidOperationException(SR.InvalidOperation_UnresolvedEntityReference); 1220throw new InvalidOperationException(SR.Format(SR.InvalidOperation_UnexpectedNodeType, r.NodeType)); 1245if (n.parent != this) throw new InvalidOperationException(SR.InvalidOperation_ExternalCode);
System\Xml\Linq\XDocument.cs (5)
430if (!reader.EOF) throw new InvalidOperationException(SR.InvalidOperation_ExpectedEndOfFile); 431if (d.Root == null) throw new InvalidOperationException(SR.InvalidOperation_MissingRoot); 472if (!reader.EOF) throw new InvalidOperationException(SR.InvalidOperation_ExpectedEndOfFile); 473if (d.Root == null) throw new InvalidOperationException(SR.InvalidOperation_MissingRoot); 928if (nt != allowBefore) throw new InvalidOperationException(SR.InvalidOperation_DocumentStructure);
System\Xml\Linq\XElement.cs (12)
811if (reader.MoveToContent() != XmlNodeType.Element) throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ExpectedNodeType, XmlNodeType.Element, reader.NodeType)); 814if (!reader.EOF) throw new InvalidOperationException(SR.InvalidOperation_ExpectedEndOfFile); 846if (await reader.MoveToContentAsync().ConfigureAwait(false) != XmlNodeType.Element) throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ExpectedNodeType, XmlNodeType.Element, reader.NodeType)); 854if (!reader.EOF) throw new InvalidOperationException(SR.InvalidOperation_ExpectedEndOfFile); 941if (lastAttr == null || a != lastAttr.next) throw new InvalidOperationException(SR.InvalidOperation_ExternalCode); 1882if (parent != null || annotations != null || content != null || lastAttr != null) throw new InvalidOperationException(SR.InvalidOperation_DeserializeInstance); 1883if (reader.MoveToContent() != XmlNodeType.Element) throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ExpectedNodeType, XmlNodeType.Element, reader.NodeType)); 1901if (Attribute(a.Name) != null) throw new InvalidOperationException(SR.InvalidOperation_DuplicateAttribute); 1908if (Attribute(a.Name) != null) throw new InvalidOperationException(SR.InvalidOperation_DuplicateAttribute); 1916if (a.parent != null) throw new InvalidOperationException(SR.InvalidOperation_ExternalCode); 2048if (r.ReadState != ReadState.Interactive) throw new InvalidOperationException(SR.InvalidOperation_ExpectedInteractive); 2085if (a.parent != this) throw new InvalidOperationException(SR.InvalidOperation_ExternalCode);
System\Xml\Linq\XLinq.cs (3)
50if (_parent.content != null) throw new InvalidOperationException(SR.InvalidOperation_ExternalCode); 157if (n.parent != null) throw new InvalidOperationException(SR.InvalidOperation_ExternalCode); 627if (_element == null) throw new InvalidOperationException(SR.InvalidOperation_WriteAttribute);
System\Xml\Linq\XNode.cs (11)
109if (parent == null) throw new InvalidOperationException(SR.InvalidOperation_MissingParent); 153if (parent == null) throw new InvalidOperationException(SR.InvalidOperation_MissingParent); 244if (p1 != p2) throw new InvalidOperationException(SR.InvalidOperation_MissingAncestor); 271throw new InvalidOperationException(SR.InvalidOperation_MissingAncestor); 430if (reader.ReadState != ReadState.Interactive) throw new InvalidOperationException(SR.InvalidOperation_ExpectedInteractive); 448throw new InvalidOperationException(SR.Format(SR.InvalidOperation_UnexpectedNodeType, reader.NodeType)); 475if (reader.ReadState != ReadState.Interactive) throw new InvalidOperationException(SR.InvalidOperation_ExpectedInteractive); 509throw new InvalidOperationException(SR.Format(SR.InvalidOperation_UnexpectedNodeType, reader.NodeType)); 526if (parent == null) throw new InvalidOperationException(SR.InvalidOperation_MissingParent); 542if (parent == null) throw new InvalidOperationException(SR.InvalidOperation_MissingParent); 548if (p != null && p.parent != c) throw new InvalidOperationException(SR.InvalidOperation_ExternalCode);
System\Xml\Linq\XNodeReader.cs (1)
557throw new InvalidOperationException(SR.InvalidOperation_ExpectedInteractive);
System\Xml\Schema\XNodeValidator.cs (3)
50if (source == null) throw new InvalidOperationException(SR.InvalidOperation_MissingRoot); 57if (source.Parent == null) throw new InvalidOperationException(SR.InvalidOperation_MissingParent); 60throw new InvalidOperationException(SR.Format(SR.InvalidOperation_BadNodeType, nt));
System\Xml\XPath\XNodeNavigator.cs (3)
684if (c == null) throw new InvalidOperationException(SR.Format(SR.InvalidOperation_BadNodeType, NodeType)); 875if (!(result is T)) throw new InvalidOperationException(SR.Format(SR.InvalidOperation_UnexpectedEvaluation, result.GetType())); 885if (!(r is T)) throw new InvalidOperationException(SR.Format(SR.InvalidOperation_UnexpectedEvaluation, r.GetType()));
System.Reflection.Context (12)
System\Reflection\Context\Custom\AttributeUtils.cs (1)
202throw new InvalidOperationException(SR.InvalidOperation_NullAttribute);
System\Reflection\Context\CustomReflectionContext.cs (3)
121throw new InvalidOperationException(SR.InvalidOperation_AddNullProperty); 125throw new InvalidOperationException(SR.InvalidOperation_AddPropertyDifferentContext); 130throw new InvalidOperationException(SR.InvalidOperation_AddPropertyDifferentType);
System\Reflection\Context\CustomReflectionContext.Projector.cs (2)
140throw new InvalidOperationException(SR.Format(SR.InvalidOperation_InvalidMethodType, value.GetType())); 255throw new InvalidOperationException(SR.Format(SR.InvalidOperation_InvalidMemberType, value.Name, value.MemberType));
System\Reflection\Context\Delegation\DelegatingType.cs (1)
23throw new InvalidOperationException(SR.Format(SR.InvalidOperation_NoTypeInfoForThisType, type.FullName));
System\Reflection\Context\Virtual\VirtualMethodBase.cs (2)
78throw new InvalidOperationException(); 94throw new InvalidOperationException(SR.Format(SR.InvalidOperation_NotGenericMethodDefinition, this));
System\Reflection\Context\Virtual\VirtualPropertyBase.cs (3)
70get { throw new InvalidOperationException(); } 139throw new InvalidOperationException(SR.InvalidOperation_EnumLitValueNotFound); 144throw new InvalidOperationException(SR.InvalidOperation_EnumLitValueNotFound);
System.Reflection.Emit (34)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilderInstantiation.cs (2)
15throw new InvalidOperationException(); 91throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericMethodDefinition, this));
System\Reflection\Emit\ConstructorBuilderImpl.cs (1)
35throw new InvalidOperationException(SR.InvalidOperation_DefaultConstructorILGen);
System\Reflection\Emit\ILGeneratorImpl.cs (3)
664throw new InvalidOperationException(SR.InvalidOperation_NotAVarArgCallingConvention); 725throw new InvalidOperationException(SR.Argument_BadExceptionCodeGen); 748throw new InvalidOperationException(SR.InvalidOperation_UnmatchingSymScope);
System\Reflection\Emit\LocalBuilderImpl.cs (1)
36throw new InvalidOperationException(SR.InvalidOperation_TypeHasBeenCreated);
System\Reflection\Emit\MethodBuilderImpl.cs (6)
113private void ThrowIfGeneric() { if (IsGenericMethod && !IsGenericMethodDefinition) throw new InvalidOperationException(); } 118throw new InvalidOperationException(SR.InvalidOperation_GenericParametersAlreadySet); 152throw new InvalidOperationException(); 159throw new InvalidOperationException(SR.InvalidOperation_ShouldNotHaveMethodBody); 164throw new InvalidOperationException(SR.InvalidOperation_ShouldNotHaveMethodBody); 281public override MethodInfo GetGenericMethodDefinition() => !IsGenericMethod ? throw new InvalidOperationException() : this;
System\Reflection\Emit\ModuleBuilderImpl.cs (6)
1081throw new InvalidOperationException(SR.InvalidOperation_TokenNotPopulated); 1179throw new InvalidOperationException(SR.InvalidOperation_NotAVarArgCallingConvention); 1218throw new InvalidOperationException(SR.InvalidOperation_GlobalsHaveBeenCreated); 1238throw new InvalidOperationException(SR.InvalidOperation_GlobalsHaveBeenCreated); 1257throw new InvalidOperationException(SR.InvalidOperation_GlobalsHaveBeenCreated); 1293throw new InvalidOperationException(SR.InvalidOperation_GlobalsHaveBeenCreated);
System\Reflection\Emit\PersistedAssemblyBuilder.cs (4)
142throw new InvalidOperationException(SR.InvalidOperation_AModuleRequired); 147throw new InvalidOperationException(SR.InvalidOperation_CannotPopulateMultipleTimes); 177throw new InvalidOperationException(SR.InvalidOperation_NoMultiModuleAssembly); 202public override Module ManifestModule => _module ?? throw new InvalidOperationException(SR.InvalidOperation_AModuleRequired);
System\Reflection\Emit\TypeBuilderImpl.cs (11)
147throw new InvalidOperationException(SR.InvalidOperation_BadTypeAttributesNotAbstract); 153throw new InvalidOperationException(SR.Format(SR.InvalidOperation_BadMethodBody, method.Name)); 158throw new InvalidOperationException(SR.Format(SR.InvalidOperation_BadEmptyMethodBody, method.Name)); 167throw new InvalidOperationException(SR.InvalidOperation_TypeHasBeenCreated); 176throw new InvalidOperationException(SR.InvalidOperation_ConstructorNotAllowedOnInterface); 202throw new InvalidOperationException(SR.InvalidOperation_ConstructorNotAllowedOnInterface); 275throw new InvalidOperationException(); 582throw new InvalidOperationException(SR.InvalidOperation_BadInterfaceNotAbstract); 606throw new InvalidOperationException(); 626throw new InvalidOperationException(SR.InvalidOperation_NoUnderlyingTypeOnEnum); 989throw new InvalidOperationException(SR.Argument_GenericParameter);
System.Reflection.Metadata (23)
System\Reflection\Internal\Utilities\ExceptionUtilities.cs (2)
12return new InvalidOperationException(SR.Format(SR.UnexpectedValue, value, value.GetType().FullName)); 15return new InvalidOperationException(SR.Format(SR.UnexpectedValueUnknownType, value));
System\Reflection\Metadata\BlobBuilder.cs (1)
538throw new InvalidOperationException(SR.Format(SR.ReturnedBuilderSizeTooSmall, GetType(), nameof(AllocateChunk)));
System\Reflection\Metadata\Ecma335\Encoding\ControlFlowBuilder.cs (1)
57throw new InvalidOperationException(SR.Format(SR.DistanceBetweenInstructionAndLabelTooBig, OpCode, ILOffset, distance));
System\Reflection\Metadata\MetadataReader.cs (2)
1055throw new InvalidOperationException(SR.MetadataImageDoesNotRepresentAnAssembly); 1112throw new InvalidOperationException(SR.StandaloneDebugMetadataImageDoesNotContainModuleTable);
System\Reflection\Metadata\TypeNameParserHelpers.cs (5)
341throw new InvalidOperationException(SR.Format(SR.InvalidOperation_MaxNodesExceeded, limit)); 352throw new InvalidOperationException(SR.InvalidOperation_NotGenericType); 363throw new InvalidOperationException(SR.InvalidOperation_NotNestedType); 374throw new InvalidOperationException(SR.InvalidOperation_NoElement); 385throw new InvalidOperationException(SR.Argument_HasToBeArrayClass);
System\Reflection\PortableExecutable\PEBuilder.cs (2)
79throw new InvalidOperationException(SR.Format(SR.MustNotReturnNull, nameof(CreateSections))); 506throw new InvalidOperationException(SR.SignatureProviderReturnedInvalidSignature);
System\Reflection\PortableExecutable\PEReader.cs (2)
363throw new InvalidOperationException(SR.PEImageDoesNotHaveMetadata); 831throw new InvalidOperationException(SR.StreamMustSupportReadAndSeek);
System\Reflection\Throw.cs (8)
47throw new InvalidOperationException(SR.SignatureNotVarArg); 53throw new InvalidOperationException(SR.ControlFlowBuilderNotAvailable); 59throw new InvalidOperationException(SR.BuilderAlreadyLinked); 65throw new InvalidOperationException(message); 71throw new InvalidOperationException(SR.Format(SR.LabelNotMarked, id)); 173throw new InvalidOperationException(SR.OutOfBoundsWrite); 227throw new InvalidOperationException(SR.Format(SR.MetadataTableNotSorted, tableIndex)); 233throw new InvalidOperationException(SR.PEImageNotAvailable);
System.Reflection.MetadataLoadContext (112)
System\Reflection\DefaultBinder.cs (4)
39ParameterModifier[]? modifiers, CultureInfo? cultureInfo, string[]? names, out object state) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 43public sealed override FieldInfo BindToField(BindingFlags bindingAttr, FieldInfo[] match, object value, CultureInfo? cultureInfo) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 268public override object ChangeType(object value, Type type, CultureInfo? cultureInfo) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 270public sealed override void ReorderArgumentArray(ref object?[] args, object state) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
System\Reflection\Runtime\BindingFlagSupport\Shared.cs (1)
50throw new InvalidOperationException(SR.NoInvokeMember);
System\Reflection\TypeLoading\Assemblies\RoAssembly.cs (3)
212public sealed override object[] GetCustomAttributes(bool inherit) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyCA); 213public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyCA); 214public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyCA);
System\Reflection\TypeLoading\Constructors\RoConstructor.cs (9)
37public sealed override object[] GetCustomAttributes(bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 38public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 39public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 76public sealed override bool IsSecurityCritical => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity); 77public sealed override bool IsSecuritySafeCritical => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity); 78public sealed override bool IsSecurityTransparent => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity); 81public sealed override object Invoke(object? obj, BindingFlags invokeAttr, Binder? binder, object?[]? parameters, CultureInfo? culture) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyInvoke); 82public sealed override object Invoke(BindingFlags invokeAttr, Binder? binder, object?[]? parameters, CultureInfo? culture) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyInvoke); 83public sealed override RuntimeMethodHandle MethodHandle => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
System\Reflection\TypeLoading\Events\RoEvent.cs (5)
78public sealed override object[] GetCustomAttributes(bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 79public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 80public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 81public sealed override void AddEventHandler(object? target, Delegate? handler) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 82public sealed override void RemoveEventHandler(object? target, Delegate? handler) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
System\Reflection\TypeLoading\Fields\RoField.cs (12)
130public sealed override object? GetRawConstantValue() => IsLiteral ? ComputeRawConstantValue() : throw new InvalidOperationException(); 137public sealed override bool IsSecurityCritical => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity); 138public sealed override bool IsSecuritySafeCritical => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity); 139public sealed override bool IsSecurityTransparent => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity); 142public sealed override object[] GetCustomAttributes(bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 143public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 144public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 145public sealed override RuntimeFieldHandle FieldHandle => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 146public sealed override object GetValue(object? obj) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 147public sealed override object GetValueDirect(TypedReference obj) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 148public sealed override void SetValue(object? obj, object? value, BindingFlags invokeAttr, Binder? binder, CultureInfo? culture) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 149public sealed override void SetValueDirect(TypedReference obj, object value) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
System\Reflection\TypeLoading\MethodBase\RoExceptionHandlingClause.cs (2)
27public sealed override Type? CatchType => _flags == ExceptionHandlingClauseOptions.Clause ? _catchType : throw new InvalidOperationException(SR.NotAClause); 29public sealed override int FilterOffset => _flags == ExceptionHandlingClauseOptions.Filter ? _filterOffset : throw new InvalidOperationException(SR.NotAFilter);
System\Reflection\TypeLoading\Methods\RoConstructedGenericMethod.cs (1)
52public sealed override MethodInfo MakeGenericMethod(params Type[] typeArguments) => throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericMethodDefinition, this));
System\Reflection\TypeLoading\Methods\RoDefinitionMethod.cs (2)
98public sealed override MethodInfo GetGenericMethodDefinition() => IsGenericMethodDefinition ? this : throw new InvalidOperationException(); // Very uninformative but compatible exception 107throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericMethodDefinition, this));
System\Reflection\TypeLoading\Methods\RoMethod.cs (10)
45public sealed override object[] GetCustomAttributes(bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 46public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 47public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 119public sealed override bool IsSecurityCritical => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity); 120public sealed override bool IsSecuritySafeCritical => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity); 121public sealed override bool IsSecurityTransparent => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity); 124public sealed override object Invoke(object? obj, BindingFlags invokeAttr, Binder? binder, object?[]? parameters, CultureInfo? culture) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyInvoke); 125public sealed override Delegate CreateDelegate(Type delegateType) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 126public sealed override Delegate CreateDelegate(Type delegateType, object? target) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 127public sealed override RuntimeMethodHandle MethodHandle => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
System\Reflection\TypeLoading\Methods\RoSyntheticMethod.cs (2)
86public sealed override MethodInfo GetGenericMethodDefinition() => throw new InvalidOperationException(); 88public sealed override MethodInfo MakeGenericMethod(params Type[] typeArguments) => throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericMethodDefinition, this));
System\Reflection\TypeLoading\Modules\RoModule.cs (3)
66public sealed override object[] GetCustomAttributes(bool inherit) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyCA); 67public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyCA); 68public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyCA);
System\Reflection\TypeLoading\Modules\RoResourceModule.cs (2)
31public sealed override int MDStreamVersion => throw new InvalidOperationException(SR.ResourceOnlyModule); 33public sealed override Guid ModuleVersionId => throw new InvalidOperationException(SR.ResourceOnlyModule);
System\Reflection\TypeLoading\Parameters\RoParameter.cs (4)
36public sealed override object DefaultValue => throw new InvalidOperationException(SR.Arg_ReflectionOnlyParameterDefaultValue); 61public sealed override object[] GetCustomAttributes(bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 62public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 63public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
System\Reflection\TypeLoading\Properties\RoProperty.cs (7)
156throw new InvalidOperationException(SR.Arg_EnumLitValueNotFound); 167public sealed override object[] GetCustomAttributes(bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 168public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 169public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 170public sealed override object GetConstantValue() => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 171public sealed override object GetValue(object? obj, BindingFlags invokeAttr, Binder? binder, object?[]? index, CultureInfo? culture) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 172public sealed override void SetValue(object? obj, object? value, BindingFlags invokeAttr, Binder? binder, object?[]? index, CultureInfo? culture) => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
System\Reflection\TypeLoading\Types\RoConstructedGenericType.cs (7)
58public sealed override Type GetFunctionPointerReturnType() => throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 59public sealed override Type[] GetFunctionPointerParameterTypes() => throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 103public sealed override MethodBase DeclaringMethod => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 126public sealed override Type MakeGenericType(params Type[] typeArguments) => throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); 134public sealed override GenericParameterAttributes GenericParameterAttributes => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 135public sealed override int GenericParameterPosition => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 136public sealed override Type[] GetGenericParameterConstraints() => throw new InvalidOperationException(SR.Arg_NotGenericParameter);
System\Reflection\TypeLoading\Types\RoDefinitionType.cs (8)
81public sealed override Type GetGenericTypeDefinition() => IsGenericTypeDefinition ? this : throw new InvalidOperationException(SR.InvalidOperation_NotGenericType); 96throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); 227public sealed override GenericParameterAttributes GenericParameterAttributes => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 228public sealed override int GenericParameterPosition => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 229public sealed override Type[] GetGenericParameterConstraints() => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 230public sealed override MethodBase DeclaringMethod => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 231public sealed override Type GetFunctionPointerReturnType() => throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 232public sealed override Type[] GetFunctionPointerParameterTypes() => throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer);
System\Reflection\TypeLoading\Types\RoFunctionPointerType.cs (6)
172public sealed override MethodBase DeclaringMethod => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 183public sealed override Type GetGenericTypeDefinition() => throw new InvalidOperationException(SR.InvalidOperation_NotGenericType); 188public sealed override Type MakeGenericType(params Type[] typeArguments) => throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); 190public sealed override GenericParameterAttributes GenericParameterAttributes => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 191public sealed override int GenericParameterPosition => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 192public sealed override Type[] GetGenericParameterConstraints() => throw new InvalidOperationException(SR.Arg_NotGenericParameter);
System\Reflection\TypeLoading\Types\RoGenericParameterType.cs (4)
44public sealed override Type GetGenericTypeDefinition() => throw new InvalidOperationException(SR.InvalidOperation_NotGenericType); 49public sealed override Type MakeGenericType(params Type[] typeArguments) => throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); 60public sealed override Type GetFunctionPointerReturnType() => throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 61public sealed override Type[] GetFunctionPointerParameterTypes() => throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer);
System\Reflection\TypeLoading\Types\RoHasElementType.cs (8)
51public sealed override MethodBase DeclaringMethod => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 62public sealed override Type GetGenericTypeDefinition() => throw new InvalidOperationException(SR.InvalidOperation_NotGenericType); 67public sealed override Type MakeGenericType(params Type[] typeArguments) => throw new InvalidOperationException(SR.Format(SR.Arg_NotGenericTypeDefinition, this)); 69public sealed override GenericParameterAttributes GenericParameterAttributes => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 70public sealed override int GenericParameterPosition => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 71public sealed override Type[] GetGenericParameterConstraints() => throw new InvalidOperationException(SR.Arg_NotGenericParameter); 73public sealed override Type GetFunctionPointerReturnType() => throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 74public sealed override Type[] GetFunctionPointerParameterTypes() => throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer);
System\Reflection\TypeLoading\Types\RoModifiedType.cs (2)
178public override Type GetFunctionPointerReturnType() => throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 179public override Type[] GetFunctionPointerParameterTypes() => throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer);
System\Reflection\TypeLoading\Types\RoType.cs (10)
62throw new InvalidOperationException(SR.InvalidOperation_NotFunctionPointer); 332public sealed override Array GetEnumValues() => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 367public sealed override bool IsSecurityCritical => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity); 368public sealed override bool IsSecuritySafeCritical => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity); 369public sealed override bool IsSecurityTransparent => throw new InvalidOperationException(SR.InvalidOperation_IsSecurity); 372public sealed override RuntimeTypeHandle TypeHandle => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection); 373public sealed override object[] GetCustomAttributes(bool inherit) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyCA); 374public sealed override object[] GetCustomAttributes(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyCA); 375public sealed override bool IsDefined(Type attributeType, bool inherit) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyCA); 376public sealed override object? InvokeMember(string name, BindingFlags invokeAttr, Binder? binder, object? target, object?[]? args, ParameterModifier[]? modifiers, CultureInfo? culture, string[]? namedParameters) => throw new InvalidOperationException(SR.Arg_ReflectionOnlyInvoke);
System.Reflection.TypeExtensions (1)
System\Reflection\TypeExtensions.cs (1)
431throw new InvalidOperationException(SR.NoMetadataTokenAvailable);
System.Resources.Extensions (19)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (6)
95throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 115throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 144throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 184throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 195throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 264throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved);
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (13)
241throw new InvalidOperationException(SR.ResourceReaderIsClosed); 489throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, FindType(typeIndex).FullName)); 502throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, typeString)); 1091if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1092if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1093if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1108if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1109if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1110if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1145if (_currentName == ENUM_DONE) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded); 1146if (!_currentIsValid) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted); 1147if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed); 1159if (_reader._resCache == null) throw new InvalidOperationException(SR.ResourceReaderIsClosed);
System.Resources.Writer (7)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (6)
95throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 115throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 144throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 184throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 195throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved); 264throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved);
System\Resources\ResourceWriter.core.cs (1)
30throw new InvalidOperationException(SR.InvalidOperation_ResourceWriterSaved);
System.Runtime.Caching (3)
System\Runtime\Caching\ChangeMonitor.cs (2)
211throw new InvalidOperationException(SR.Init_not_complete); 231throw new InvalidOperationException(SR.Method_already_invoked);
System\Runtime\Caching\ObjectCache.cs (1)
38throw new InvalidOperationException(SR.Property_already_set);
System.Runtime.InteropServices (4)
System\Runtime\InteropServices\ComAwareEventInfo.cs (2)
106throw new InvalidOperationException(SR.InvalidOperation_NoComEventInterfaceAttribute); 122throw new InvalidOperationException(SR.InvalidOperation_NoDispIdAttribute);
System\Runtime\InteropServices\HandleCollector.cs (2)
60throw new InvalidOperationException(SR.InvalidOperation_HCCountOverflow); 96throw new InvalidOperationException(SR.InvalidOperation_HCCountOverflow);
System.Security.Claims (3)
System\Security\Claims\ClaimsIdentity.cs (3)
176throw new InvalidOperationException(SR.InvalidOperationException_ActorGraphCircular); 286throw new InvalidOperationException(SR.InvalidOperationException_ActorGraphCircular); 495throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ClaimCannotBeRemoved, claim));
System.Security.Cryptography (40)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Initialization.cs (1)
42throw new InvalidOperationException();
src\libraries\Common\src\System\Security\Cryptography\Asn1\DirectoryStringAsn.xml.cs (1)
28throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
src\libraries\Common\src\System\Security\Cryptography\Asn1\ECDomainParameters.xml.cs (1)
25throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
src\libraries\Common\src\System\Security\Cryptography\Asn1\GeneralNameAsn.xml.cs (1)
32throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pbkdf2SaltChoice.xml.cs (1)
25throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
src\libraries\Common\src\System\Security\Cryptography\ECOpenSsl.ImportExport.cs (1)
182throw new InvalidOperationException(SR.Cryptography_InvalidKeySize);
src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (1)
635throw new InvalidOperationException();
src\libraries\System.Private.CoreLib\src\System\IO\PersistedFiles.Unix.cs (1)
38throw new InvalidOperationException(SR.PersistedFiles_NoHomeDirectory);
System\Security\Cryptography\HashAlgorithm.cs (2)
68throw new InvalidOperationException(SR.InvalidOperation_IncorrectImplementation); 275throw new InvalidOperationException(SR.InvalidOperation_IncorrectImplementation);
System\Security\Cryptography\RC2Implementation.cs (4)
89throw new InvalidOperationException(SR.Cryptography_InvalidKeySize); 113throw new InvalidOperationException(SR.Cryptography_InvalidKeySize); 138throw new InvalidOperationException(SR.Cryptography_InvalidKeySize); 163throw new InvalidOperationException(SR.Cryptography_InvalidKeySize);
System\Security\Cryptography\SafeEvpPKeyHandle.OpenSsl.cs (1)
54throw new InvalidOperationException(SR.Cryptography_OpenInvalidHandle);
System\Security\Cryptography\Shake128.cs (1)
491throw new InvalidOperationException(SR.InvalidOperation_AlreadyReading);
System\Security\Cryptography\Shake256.cs (1)
491throw new InvalidOperationException(SR.InvalidOperation_AlreadyReading);
System\Security\Cryptography\SymmetricAlgorithm.cs (1)
320throw new InvalidOperationException(SR.InvalidOperation_UnsupportedBlockSize);
System\Security\Cryptography\X509Certificates\Asn1\DistributionPointNameAsn.xml.cs (1)
26throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
System\Security\Cryptography\X509Certificates\Asn1\TimeAsn.xml.cs (1)
25throw new InvalidOperationException($"Tag '{tag}' is in use by both '{existing}' and '{fieldName}'");
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (7)
281throw new InvalidOperationException(SR.Cryptography_CertReq_NoKeyProvided); 351throw new InvalidOperationException( 357throw new InvalidOperationException( 363throw new InvalidOperationException(SR.Cryptography_CertReq_ExtensionRequestInOtherAttributes); 501throw new InvalidOperationException(SR.Cryptography_CertReq_NoKeyProvided); 707throw new InvalidOperationException(SR.Cryptography_CertReq_RSAPaddingRequired); 863throw new InvalidOperationException(
System\Security\Cryptography\X509Certificates\DSACertificateExtensions.cs (1)
39throw new InvalidOperationException(SR.Cryptography_Cert_AlreadyHasPrivateKey);
System\Security\Cryptography\X509Certificates\ECDsaCertificateExtensions.cs (1)
36throw new InvalidOperationException(SR.Cryptography_Cert_AlreadyHasPrivateKey);
System\Security\Cryptography\X509Certificates\ECDsaX509SignatureGenerator.cs (1)
75throw new InvalidOperationException(SR.Cryptography_ECC_NamedCurvesOnly);
System\Security\Cryptography\X509Certificates\OpenSslCachedSystemStoreProvider.cs (2)
76throw new InvalidOperationException(); 82throw new InvalidOperationException();
System\Security\Cryptography\X509Certificates\RSACertificateExtensions.cs (1)
36throw new InvalidOperationException(SR.Cryptography_Cert_AlreadyHasPrivateKey);
System\Security\Cryptography\X509Certificates\UnixExportProvider.cs (2)
307throw new InvalidOperationException(); 471throw new InvalidOperationException();
System\Security\Cryptography\X509Certificates\X500RelativeDistinguishedName.cs (2)
93throw new InvalidOperationException(SR.Cryptography_X500_MultiValued); 119throw new InvalidOperationException(SR.Cryptography_X500_MultiValued);
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (1)
751throw new InvalidOperationException(SR.Cryptography_Cert_AlreadyHasPrivateKey);
System\Security\Cryptography\X509Certificates\X509ChainElementCollection.cs (1)
45throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted);
System\Security\Cryptography\X509Certificates\X509ExtensionCollection.cs (1)
42throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted);
System.Security.Cryptography.Cose (29)
System\Security\Cryptography\Cose\CoseHeaderMap.cs (1)
241throw new InvalidOperationException(SR.CoseHeaderMapDecodedMapIsReadOnlyCannotSetValue);
System\Security\Cryptography\Cose\CoseHeaderValue.cs (8)
146throw new InvalidOperationException(SR.CoseHeaderValueErrorWhileDecoding, ex); 151throw new InvalidOperationException(SR.Format(SR.CoseHeaderMapCborEncodedValueNotValid)); 173throw new InvalidOperationException(SR.CoseHeaderValueErrorWhileDecoding, ex); 178throw new InvalidOperationException(SR.Format(SR.CoseHeaderMapCborEncodedValueNotValid)); 200throw new InvalidOperationException(SR.CoseHeaderValueErrorWhileDecoding, ex); 205throw new InvalidOperationException(SR.Format(SR.CoseHeaderMapCborEncodedValueNotValid)); 232throw new InvalidOperationException(SR.CoseHeaderValueErrorWhileDecoding, ex); 237throw new InvalidOperationException(SR.Format(SR.CoseHeaderMapCborEncodedValueNotValid));
System\Security\Cryptography\Cose\CoseMultiSignMessage.cs (7)
578throw new InvalidOperationException(SR.Sign1SignHeaderDuplicateLabels); 583throw new InvalidOperationException(SR.MultiSignMessageMustCarryAtLeastOneSignature); 612throw new InvalidOperationException(SR.Sign1SignHeaderDuplicateLabels); 677throw new InvalidOperationException(SR.ContentWasDetached); 736throw new InvalidOperationException(SR.ContentWasEmbedded); 772throw new InvalidOperationException(SR.ContentWasEmbedded); 848throw new InvalidOperationException(SR.ContentWasEmbedded);
System\Security\Cryptography\Cose\CoseSign1Message.cs (7)
403throw new InvalidOperationException(SR.ContentWasDetached); 445throw new InvalidOperationException(SR.ContentWasDetached); 493throw new InvalidOperationException(SR.ContentWasEmbedded); 537throw new InvalidOperationException(SR.ContentWasEmbedded); 603throw new InvalidOperationException(SR.ContentWasEmbedded); 704throw new InvalidOperationException(SR.ContentWasEmbedded); 806throw new InvalidOperationException(SR.Sign1SignHeaderDuplicateLabels);
System\Security\Cryptography\Cose\CoseSignature.cs (6)
109throw new InvalidOperationException(SR.ContentWasDetached); 152throw new InvalidOperationException(SR.ContentWasDetached); 201throw new InvalidOperationException(SR.ContentWasEmbedded); 245throw new InvalidOperationException(SR.ContentWasEmbedded); 312throw new InvalidOperationException(SR.ContentWasEmbedded); 379throw new InvalidOperationException(SR.ContentWasEmbedded);
System.Text.Encoding.CodePages (1)
System\Text\BaseCodePageEncoding.cs (1)
240throw new InvalidOperationException();
System.Text.Json (100)
System\Text\Json\Document\JsonElement.cs (1)
1474throw new InvalidOperationException();
System\Text\Json\Nodes\JsonArray.cs (1)
197_ => throw new InvalidOperationException(SR.Format(SR.NodeElementWrongType, nameof(JsonValueKind.Array))),
System\Text\Json\Nodes\JsonNode.cs (1)
190throw new InvalidOperationException(SR.Format(SR.NodeWrongType, nameof(JsonValue)));
System\Text\Json\Nodes\JsonObject.cs (1)
66_ => throw new InvalidOperationException(SR.Format(SR.NodeElementWrongType, nameof(JsonValueKind.Object)))
System\Text\Json\Nodes\JsonValueOfT.cs (2)
44throw new InvalidOperationException(SR.Format(SR.NodeUnableToConvert, Value!.GetType(), typeof(T))); 240throw new InvalidOperationException(SR.Format(SR.NodeUnableToConvertElement,
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.Small.cs (2)
51throw new InvalidOperationException(); 109throw new InvalidOperationException();
System\Text\Json\Serialization\Converters\Value\EnumConverter.cs (1)
469_ => throw new InvalidOperationException(),
System\Text\Json\Serialization\IgnoreReferenceResolver.cs (3)
33public override void AddReference(string referenceId, object value) => throw new InvalidOperationException(); 35public override string GetReference(object value, out bool alreadyExists) => throw new InvalidOperationException(); 37public override object ResolveReference(string referenceId) => throw new InvalidOperationException();
System\Text\Json\Serialization\JsonConverter.cs (2)
104throw new InvalidOperationException(); 111throw new InvalidOperationException();
System\Text\Json\Serialization\JsonConverterFactory.cs (12)
61throw new InvalidOperationException(); 73throw new InvalidOperationException(); 85throw new InvalidOperationException(); 92throw new InvalidOperationException(); 99throw new InvalidOperationException(); 106throw new InvalidOperationException(); 113throw new InvalidOperationException(); 124throw new InvalidOperationException(); 135throw new InvalidOperationException(); 142throw new InvalidOperationException(); 156throw new InvalidOperationException(); 163throw new InvalidOperationException();
System\Text\Json\Serialization\JsonConverterOfT.cs (2)
684=> throw new InvalidOperationException(); 687=> throw new InvalidOperationException();
System\Text\Json\Serialization\JsonSerializerOptions.cs (2)
390throw new InvalidOperationException(SR.DefaultIgnoreConditionAlreadySpecified); 425throw new InvalidOperationException(SR.DefaultIgnoreConditionAlreadySpecified);
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Converters.cs (1)
336throw new InvalidOperationException(SR.Format(SR.SerializationConverterNotCompatible, typedConverter, typeof(T)));
System\Text\Json\Serialization\Metadata\JsonMetadataServices.cs (1)
48throw new InvalidOperationException(SR.Format(SR.FieldCannotBeVirtual, nameof(propertyInfo.IsProperty), nameof(propertyInfo.IsVirtual)));
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (1)
1322throw new InvalidOperationException();
System\Text\Json\Serialization\Metadata\ReflectionEmitMemberAccessor.cs (1)
152_ => throw new InvalidOperationException()
System\Text\Json\Serialization\Metadata\ReflectionMemberAccessor.cs (1)
109throw new InvalidOperationException();
System\Text\Json\Serialization\PreserveReferenceHandler.cs (1)
8public override ReferenceResolver CreateResolver() => throw new InvalidOperationException();
System\Text\Json\Serialization\ReferenceResolver.cs (3)
39internal virtual void PopReferenceForCycleDetection() => throw new InvalidOperationException(); 41internal virtual void PushReferenceForCycleDetection(object value) => throw new InvalidOperationException(); 43internal virtual bool ContainsReferenceForCycleDetection(object value) => throw new InvalidOperationException();
System\Text\Json\ThrowHelper.cs (2)
207return new InvalidOperationException(message) { Source = ExceptionSourceValueToRethrowAsJsonException }; 548InvalidOperationException ex = new InvalidOperationException(message, innerException);
System\Text\Json\ThrowHelper.Node.cs (5)
26throw new InvalidOperationException(SR.NodeAlreadyHasParent); 32throw new InvalidOperationException(SR.NodeCycleDetected); 38throw new InvalidOperationException(SR.NodeElementCannotBeObjectOrArray); 50throw new InvalidOperationException(SR.Format(SR.NodeWrongType, typeName)); 56throw new InvalidOperationException(SR.Format(SR.NodeParentWrongType, typeName));
System\Text\Json\ThrowHelper.Serialization.cs (54)
63throw new InvalidOperationException(SR.Format(SR.DeserializeUnableToAssignNull, declaredType)); 69throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPopulateNotSupportedByConverter, propertyInfo.Name, propertyInfo.DeclaringType)); 75throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyMustHaveAGetter, propertyInfo.Name, propertyInfo.DeclaringType)); 81throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyValueTypeMustHaveASetter, propertyInfo.Name, propertyInfo.DeclaringType)); 87throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyCannotAllowPolymorphicDeserialization, propertyInfo.Name, propertyInfo.DeclaringType)); 93throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyCannotAllowReadOnlyMember, propertyInfo.Name, propertyInfo.DeclaringType)); 99throw new InvalidOperationException(SR.ObjectCreationHandlingPropertyCannotAllowReferenceHandling); 151throw new InvalidOperationException(SR.Format(SR.CannotSerializeInvalidType, typeToConvert)); 155throw new InvalidOperationException(SR.Format(SR.CannotSerializeInvalidMember, typeToConvert, memberInfo.Name, declaringType)); 161throw new InvalidOperationException(SR.Format(SR.SerializationConverterNotCompatible, converterType, type)); 167throw new InvalidOperationException(SR.Format(SR.ResolverTypeNotCompatible, actualType, requestedType)); 173throw new InvalidOperationException(SR.ResolverTypeInfoOptionsNotCompatible); 179throw new InvalidOperationException(SR.JsonSerializerOptionsNoTypeInfoResolverSpecified); 185throw new InvalidOperationException(SR.JsonSerializerIsReflectionDisabled); 197throw new InvalidOperationException(SR.Format(SR.SerializationConverterOnAttributeInvalid, location)); 210throw new InvalidOperationException(SR.Format(SR.SerializationConverterOnAttributeNotCompatible, location, typeToConvert)); 220throw new InvalidOperationException(message); 226throw new InvalidOperationException(SR.DefaultTypeInfoResolverImmutable); 232throw new InvalidOperationException(SR.TypeInfoResolverChainImmutable); 238throw new InvalidOperationException(SR.TypeInfoImmutable); 244throw new InvalidOperationException(SR.SerializerOptions_InvalidChainedResolver); 250throw new InvalidOperationException(SR.Format(SR.SerializerPropertyNameConflict, type, propertyName)); 256throw new InvalidOperationException(SR.Format(SR.SerializerPropertyNameNull, jsonPropertyInfo.DeclaringType, jsonPropertyInfo.MemberName)); 262throw new InvalidOperationException(SR.Format(SR.JsonPropertyRequiredAndNotDeserializable, jsonPropertyInfo.Name, jsonPropertyInfo.DeclaringType)); 268throw new InvalidOperationException(SR.Format(SR.JsonPropertyRequiredAndExtensionData, jsonPropertyInfo.Name, jsonPropertyInfo.DeclaringType)); 312throw new InvalidOperationException(SR.Format(SR.NamingPolicyReturnNull, namingPolicy)); 318throw new InvalidOperationException(SR.Format(SR.SerializerConverterFactoryReturnsNull, converterType)); 324throw new InvalidOperationException(SR.Format(SR.SerializerConverterFactoryReturnsJsonConverterFactory, converterType)); 334throw new InvalidOperationException( 346throw new InvalidOperationException(SR.Format(SR.ConstructorParamIncompleteBinding, parentType)); 352throw new InvalidOperationException(SR.Format(SR.ExtensionDataCannotBindToCtorParam, propertyName, jsonPropertyInfo.DeclaringType)); 358throw new InvalidOperationException(SR.Format(SR.JsonIncludeOnInaccessibleProperty, memberName, declaringType)); 364throw new InvalidOperationException(SR.Format(SR.IgnoreConditionOnValueTypeInvalid, clrPropertyName, propertyDeclaringType)); 371throw new InvalidOperationException(SR.Format(SR.NumberHandlingOnPropertyInvalid, jsonPropertyInfo.MemberName, jsonPropertyInfo.DeclaringType)); 377throw new InvalidOperationException(SR.Format(SR.ConverterCanConvertMultipleTypes, jsonConverter.GetType(), jsonConverter.Type, runtimePropertyType)); 397throw new InvalidOperationException(SR.Format(SR.InvalidJsonTypeInfoOperationForKind, kind)); 403throw new InvalidOperationException(SR.Format(SR.CreateObjectConverterNotCompatible, type)); 504throw new InvalidOperationException(SR.Format(SR.SerializationDuplicateAttribute, attribute, location)); 510throw new InvalidOperationException(SR.Format(SR.SerializationDuplicateTypeAttribute, classType, attribute)); 516throw new InvalidOperationException(SR.Format(SR.SerializationDuplicateTypeAttribute, classType, typeof(TAttribute))); 522throw new InvalidOperationException(SR.Format(SR.ExtensionDataConflictsWithUnmappedMemberHandling, classType, jsonPropertyInfo.MemberName)); 528throw new InvalidOperationException(SR.Format(SR.SerializationDataExtensionPropertyInvalid, jsonPropertyInfo.PropertyType, jsonPropertyInfo.MemberName)); 534throw new InvalidOperationException(SR.NodeJsonObjectCustomConverterNotAllowedOnExtensionProperty); 755throw new InvalidOperationException(SR.Format(SR.MetadataReferenceOfTypeCannotBeAssignedToType, referenceId, currentType, typeToConvert)); 762throw new InvalidOperationException(SR.Format(SR.JsonPropertyInfoBoundToDifferentParent, propertyInfo.Name, propertyInfo.ParentTypeInfo.Type.FullName)); 803throw new InvalidOperationException(SR.Format(SR.NoMetadataForType, type, resolver?.ToString() ?? "<null>")); 808return new InvalidOperationException(SR.Format(SR.NoMetadataForTypeProperties, resolver?.ToString() ?? "<null>", type)); 850throw new InvalidOperationException(SR.Format(SR.Polymorphism_TypeDoesNotSupportPolymorphism, baseType)); 856throw new InvalidOperationException(SR.Format(SR.Polymorphism_DerivedTypeIsNotSupported, derivedType, baseType)); 862throw new InvalidOperationException(SR.Format(SR.Polymorphism_DerivedTypeIsAlreadySpecified, baseType, derivedType)); 868throw new InvalidOperationException(SR.Format(SR.Polymorphism_TypeDicriminatorIdIsAlreadySpecified, baseType, typeDiscriminator)); 874throw new InvalidOperationException(SR.Polymorphism_InvalidCustomTypeDiscriminatorPropertyName); 880throw new InvalidOperationException(SR.Format(SR.Polymorphism_ConfigurationDoesNotSpecifyDerivedTypes, baseType)); 886throw new InvalidOperationException(SR.Format(SR.InvalidEnumTypeWithSpecialChar, enumType.Name, enumName));
System.Text.Json.SourceGeneration (3)
JsonSourceGenerator.Parser.cs (2)
401throw new InvalidOperationException(); 457throw new InvalidOperationException();
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
184_ => throw new InvalidOperationException("Unreachable"),
System.Text.RegularExpressions (5)
System\Text\RegularExpressions\CaptureCollection.cs (1)
213throw new InvalidOperationException(SR.EnumNotStarted);
System\Text\RegularExpressions\GroupCollection.cs (2)
266throw new InvalidOperationException(SR.EnumNotStarted); 279throw new InvalidOperationException(SR.EnumNotStarted);
System\Text\RegularExpressions\MatchCollection.cs (1)
231throw new InvalidOperationException(SR.EnumNotStarted);
System\Text\RegularExpressions\RegexAssemblyCompiler.cs (1)
40throw new InvalidOperationException("DefinePersistedAssembly returned null");
System.Text.RegularExpressions.Generator (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
184_ => throw new InvalidOperationException("Unreachable"),
System.Threading (16)
System\Threading\Barrier.cs (8)
298throw new InvalidOperationException(SR.Barrier_AddParticipants_Overflow_ArgumentOutOfRange); 331throw new InvalidOperationException(SR.Barrier_InvalidOperation_CalledFromPHA); 426throw new InvalidOperationException(SR.Barrier_InvalidOperation_CalledFromPHA); 445throw new InvalidOperationException(SR.Barrier_RemoveParticipants_InvalidOperation); 639throw new InvalidOperationException(SR.Barrier_InvalidOperation_CalledFromPHA); 658throw new InvalidOperationException(SR.Barrier_SignalAndWait_InvalidOperation_ZeroTotal); 664throw new InvalidOperationException(SR.Barrier_SignalAndWait_InvalidOperation_ThreadsExceeded); 913throw new InvalidOperationException(SR.Barrier_InvalidOperation_CalledFromPHA);
System\Threading\CountdownEvent.cs (5)
180throw new InvalidOperationException(SR.CountdownEvent_Decrement_BelowZero); 193throw new InvalidOperationException(SR.CountdownEvent_Decrement_BelowZero); 230throw new InvalidOperationException(SR.CountdownEvent_Decrement_BelowZero); 299throw new InvalidOperationException(SR.CountdownEvent_Increment_AlreadyZero); 337throw new InvalidOperationException(SR.CountdownEvent_Increment_AlreadyMax);
System\Threading\HostExecutionContextManager.cs (3)
26throw new InvalidOperationException(SR.HostExecutionContextManager_InvalidOperation_NotNewCaptureContext); 39throw new InvalidOperationException( 45throw new InvalidOperationException(
System.Threading.Channels (3)
System\Threading\Channels\AsyncOperation.cs (3)
25throw new InvalidOperationException(SR.InvalidOperation_IncompleteAsyncOperation); 29throw new InvalidOperationException(SR.InvalidOperation_MultipleContinuations); 33throw new InvalidOperationException(SR.InvalidOperation_IncorrectToken);
System.Threading.Tasks.Dataflow (11)
Base\DataflowBlock.cs (4)
712throw new InvalidOperationException(SR.InvalidOperation_MessageNotReservedByTarget); 723throw new InvalidOperationException(SR.InvalidOperation_MessageNotReservedByTarget); 1359try { target.TrySetException(target._receivedException ?? new InvalidOperationException(SR.InvalidOperation_ErrorDuringCleanup)); } 1370return Common.InitializeStackTrace(new InvalidOperationException(SR.InvalidOperation_DataNotAvailableForReceive));
Blocks\BatchBlock.cs (1)
1006throw new InvalidOperationException(SR.InvalidOperation_FailedToConsumeReservedMessage);
Blocks\BroadcastBlock.cs (2)
1120if (_nextMessageReservedFor != target) throw new InvalidOperationException(SR.InvalidOperation_MessageNotReservedByTarget); 1126if (messageHeader.Id != _nextMessageId) throw new InvalidOperationException(SR.InvalidOperation_MessageNotReservedByTarget);
Blocks\JoinBlock.cs (1)
667_sharedResources._exceptionAction(new InvalidOperationException(SR.InvalidOperation_FailedToConsumeReservedMessage));
Blocks\WriteOnceBlock.cs (1)
428if (_header.Id != messageHeader.Id) throw new InvalidOperationException(SR.InvalidOperation_MessageNotReservedByTarget);
Internal\SourceCore.cs (2)
255if (_nextMessageReservedFor != target) throw new InvalidOperationException(SR.InvalidOperation_MessageNotReservedByTarget); 260if (messageHeader.Id != _nextMessageId.Value || _messages.IsEmpty) throw new InvalidOperationException(SR.InvalidOperation_MessageNotReservedByTarget);
System.Threading.Tasks.Parallel (13)
System\Threading\Tasks\Parallel.cs (9)
1953throw new InvalidOperationException(SR.Parallel_ForEach_OrderedPartitionerKeysNotNormalized); 2111throw new InvalidOperationException(SR.Parallel_ForEach_OrderedPartitionerKeysNotNormalized); 2315throw new InvalidOperationException(SR.Parallel_ForEach_OrderedPartitionerKeysNotNormalized); 2499throw new InvalidOperationException(SR.Parallel_ForEach_OrderedPartitionerKeysNotNormalized); 2529throw new InvalidOperationException(SR.Parallel_ForEach_PartitionerNotDynamic); 2576throw new InvalidOperationException(SR.Parallel_ForEach_PartitionerReturnedNull); 2584throw new InvalidOperationException(SR.Parallel_ForEach_PartitionerReturnedNull); 2643throw new InvalidOperationException(SR.Parallel_ForEach_NullEnumerator); 2689throw new InvalidOperationException(SR.Parallel_ForEach_NullEnumerator);
System\Threading\Tasks\Parallel.ForEachAsync.cs (2)
720Enumerator = source.GetEnumerator() ?? throw new InvalidOperationException(SR.Parallel_ForEach_NullEnumerator); 742Enumerator = source.GetAsyncEnumerator(Cancellation.Token) ?? throw new InvalidOperationException(SR.Parallel_ForEach_NullEnumerator);
System\Threading\Tasks\ParallelLoopState.cs (2)
198throw new InvalidOperationException( 339throw new InvalidOperationException(SR.ParallelState_Stop_InvalidOperationException_StopAfterBreak);
System.Transactions.Local (19)
System\Transactions\InternalTransaction.cs (1)
216throw new InvalidOperationException(SR.PromoterTypeInvalid);
System\Transactions\Transaction.cs (2)
169throw new InvalidOperationException(SR.TransactionScopeComplete); 198throw new InvalidOperationException(SR.CannotSetCurrent);
System\Transactions\TransactionException.cs (3)
49return new InvalidOperationException(messagewithTxId, innerException); 60return new InvalidOperationException(message, innerException); 133return new InvalidOperationException(messagewithTxId);
System\Transactions\TransactionManager.cs (1)
128throw new InvalidOperationException(SR.CurrentDelegateSet);
System\Transactions\TransactionScope.cs (1)
528throw new InvalidOperationException(SR.InvalidScopeThread);
System\Transactions\TransactionState.cs (11)
306throw new InvalidOperationException(); 318throw new InvalidOperationException(); 330throw new InvalidOperationException(); 342throw new InvalidOperationException(); 354throw new InvalidOperationException(); 366throw new InvalidOperationException(); 378throw new InvalidOperationException(); 390throw new InvalidOperationException(); 402throw new InvalidOperationException(); 430throw new InvalidOperationException(); 4336throw new InvalidOperationException();
System.Windows.Controls.Ribbon (39)
Microsoft\Windows\Automation\Peers\RibbonComboBoxAutomationPeer.cs (3)
91throw new InvalidOperationException(Microsoft.Windows.Controls.SR.SetFocusFailed); 94throw new InvalidOperationException(Microsoft.Windows.Controls.SR.SetFocusFailed); 99throw new InvalidOperationException(Microsoft.Windows.Controls.SR.SetFocusFailed);
Microsoft\Windows\Automation\Peers\RibbonGalleryItemDataAutomationPeer.cs (1)
100throw new InvalidOperationException();
Microsoft\Windows\Automation\Peers\RibbonMenuButtonAutomationPeer.cs (6)
176throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 190throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 240throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 249throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 253throw new InvalidOperationException(Microsoft.Windows.Controls.SR.ResizeParametersNotValid); 259throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed);
Microsoft\Windows\Automation\Peers\RibbonMenuItemDataAutomationPeer.cs (13)
156throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 163throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 187throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 194throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 227throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 252throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 276throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 296throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 333throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 350throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 354throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 358throw new InvalidOperationException(Microsoft.Windows.Controls.SR.ResizeParametersNotValid); 364throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed);
Microsoft\Windows\Automation\Peers\RibbonQuickAccessToolBarAutomationPeer.cs (2)
112throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 124throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed);
Microsoft\Windows\Automation\Peers\RibbonSplitButtonAutomationPeer.cs (2)
78throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 111throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed);
Microsoft\Windows\Automation\Peers\RibbonTabDataAutomationPeer.cs (2)
153throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed); 168throw new InvalidOperationException(Microsoft.Windows.Controls.SR.UIA_OperationCannotBePerformed);
Microsoft\Windows\Controls\KeyTipService.cs (1)
968throw new InvalidOperationException(Microsoft.Windows.Controls.SR.ElementNotKeyTipScope);
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (3)
756throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Ribbon_ContextualTabHeadersSourceInvalid); 1473throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Ribbon_ContextualTabHeadersSourceInvalid); 1483throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Ribbon_ContextualTabHeadersSourceInvalid);
Microsoft\Windows\Controls\Ribbon\RibbonApplicationMenu.cs (1)
244throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidApplicationMenuOrItemContainer, this.GetType().Name, itemContainer));
Microsoft\Windows\Controls\Ribbon\RibbonApplicationMenuItem.cs (1)
79throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidApplicationMenuOrItemContainer, this.GetType().Name, itemContainer));
Microsoft\Windows\Controls\Ribbon\RibbonApplicationSplitMenuItem.cs (1)
77throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidApplicationMenuOrItemContainer, this.GetType().Name, itemContainer));
Microsoft\Windows\Controls\Ribbon\RibbonContextMenu.cs (1)
518throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidMenuButtonOrItemContainer, this.GetType().Name, itemContainer));
Microsoft\Windows\Controls\Ribbon\RibbonMenuButton.cs (1)
561throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidMenuButtonOrItemContainer, this.GetType().Name, itemContainer));
Microsoft\Windows\Controls\Ribbon\RibbonMenuItem.cs (1)
523throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidMenuButtonOrItemContainer, this.GetType().Name, itemContainer));
System.Windows.Input.Manipulations (4)
System\Windows\Input\Manipulations\Exceptions.cs (4)
121return new InvalidOperationException(Format( 142return new InvalidOperationException(Format( 157return new InvalidOperationException(Format( 179return new InvalidOperationException(Format(
System.Xaml (52)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Xaml\Parser\SpecialBracketCharacters.cs (4)
53throw new InvalidOperationException(); 78throw new InvalidOperationException("Opening bracket character cannot be the same as closing bracket character."); 82throw new InvalidOperationException("Bracket characters cannot be alpha-numeric or whitespace."); 86throw new InvalidOperationException("Bracket characters cannot be one of the following: '=' , ',', '\'', '\"', '{ ', ' }', '\\'");
src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\FrugalList.cs (2)
1769throw new InvalidOperationException(SR.FrugalList_CannotPromoteBeyondArray); 2144throw new InvalidOperationException(SR.FrugalList_CannotPromoteBeyondArray);
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\ReflectionHelper.cs (1)
431throw new InvalidOperationException(SR.Format(SR.ParserAssemblyLoadVersionMismatch, request, found));
System\Windows\Markup\ArrayExtension.cs (2)
85throw new InvalidOperationException(SR.MarkupExtensionArrayType); 97throw new InvalidOperationException(SR.Format(SR.MarkupExtensionArrayBadType, Type.Name));
System\Windows\Markup\NameReferenceConverter.cs (3)
32throw new InvalidOperationException(SR.MissingNameResolver); 38throw new InvalidOperationException(SR.MustHaveName); 72throw new InvalidOperationException(SR.MissingNameProvider);
System\Windows\Markup\Reference.cs (2)
32throw new InvalidOperationException(SR.MissingNameResolver); 36throw new InvalidOperationException(SR.MustHaveName);
System\Windows\Markup\StaticExtension.cs (1)
52throw new InvalidOperationException(SR.MarkupExtensionStaticMember);
System\Windows\Markup\TypeExtension.cs (3)
64throw new InvalidOperationException(SR.MarkupExtensionTypeName); 73throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, nameof(IXamlTypeResolver))); 80throw new InvalidOperationException(SR.Format(SR.MarkupExtensionTypeNameBad, _typeName));
System\Xaml\AttachablePropertyServices.cs (1)
203throw new InvalidOperationException(SR.DefaultAttachablePropertyStoreCannotAddInstance);
System\Xaml\Context\ObjectWriterContext.cs (1)
883throw new InvalidOperationException(SR.NameScopeOnRootInstance);
System\Xaml\Context\ServiceProviderContext.cs (1)
126set { throw new InvalidOperationException(SR.MustNotCallSetter); }
System\Xaml\InfosetObjects\XamlObjectWriter.cs (1)
1066throw new InvalidOperationException(SR.Format(SR.ObjectWriterTypeNotAllowed,
System\Xaml\Parser\NodeStreamSorter.cs (2)
302throw new InvalidOperationException("premature end of stream before EoA"); 360throw new InvalidOperationException("premature end of stream after EoA");
System\Xaml\XamlBackgroundReader.cs (1)
89throw new InvalidOperationException(SR.ThreadAlreadyStarted);
System\Xaml\XamlMarkupExtensionWriter.cs (9)
138throw new InvalidOperationException(SR.Format(SR.XamlMarkupExtensionWriterDuplicateMember, property.Name)); 337throw new InvalidOperationException(SR.XamlMarkupExtensionWriterInputInvalid); 344throw new InvalidOperationException(SR.XamlMarkupExtensionWriterInputInvalid); 358throw new InvalidOperationException(SR.XamlMarkupExtensionWriterInputInvalid); 376throw new InvalidOperationException(SR.XamlMarkupExtensionWriterInputInvalid); 383throw new InvalidOperationException(SR.XamlMarkupExtensionWriterInputInvalid); 548throw new InvalidOperationException(SR.XamlMarkupExtensionWriterInputInvalid); 605throw new InvalidOperationException(SR.XamlMarkupExtensionWriterInputInvalid); 612throw new InvalidOperationException(SR.XamlMarkupExtensionWriterInputInvalid);
System\Xaml\XamlObjectReader.cs (4)
317throw new InvalidOperationException(SR.ExpectedObjectMarkupInfo); 915throw new InvalidOperationException(SR.Format(SR.AttachedPropertyOnTypeConvertedOrStringProperty, property.Name, value.ToString(), props[0].Key.ToString())); 919throw new InvalidOperationException(SR.Format(SR.AttachedPropertyOnDictionaryKey, value.ToString(), props[0].Key.ToString())); 2933throw new InvalidOperationException(SR.Format(SR.XamlFactoryInvalidXamlNode, reader.NodeType));
System\Xaml\XamlTypeName.cs (3)
208throw new InvalidOperationException(SR.XamlTypeNameNamespaceIsNull); 212throw new InvalidOperationException(SR.XamlTypeNameNameIsNullOrEmpty); 225throw new InvalidOperationException(SR.Format(SR.XamlTypeNameCannotGetPrefix, Namespace));
System\Xaml\XamlXmlWriter.cs (11)
395throw new InvalidOperationException(SR.Format(SR.PrefixNotInFrames, prefix)); 1029throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteStartMember")); 1036throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteStartMember")); 1080throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteEndObject")); 1239throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteValue")); 1276throw new InvalidOperationException(SR.Format(SR.WhiteSpaceInCollection, value, containingXamlType.Name)); 1369throw new InvalidOperationException(SR.XamlXmlWriterWriteObjectNotSupportedInCurrentState); 1381throw new InvalidOperationException(SR.XamlXmlWriterIsObjectFromMemberSetForArraysOrNonCollections); 1474throw new InvalidOperationException(SR.Format(SR.WhiteSpaceInCollection, writer.deferredValue, containingXamlType.Name)); 2019throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, operation)); 2044throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteGetObject"));
Templates.Blazor.Tests (17)
BlazorWasmTemplateTest.cs (1)
437throw new InvalidOperationException(@$"Couldn't find listening url:
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
232throw new InvalidOperationException(@$"Couldn't find listening url:
src\ProjectTemplates\Shared\Project.cs (1)
36throw new InvalidOperationException($"No test log folder specified via {nameof(TestFrameworkFileLoggerAttribute)}.");
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
36throw new InvalidOperationException($"Project key collision in {nameof(ProjectFactoryFixture)}.{nameof(CreateProject)}!");
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (3)
96throw new InvalidOperationException($"Failed to find required templates in {packagesDir}. Please ensure the *Templates*.nupkg have been built."); 123throw new InvalidOperationException($"Couldn't find {templateName} as an option in {proc.Output}."); 139throw new InvalidOperationException($"Failed to uninstall previous templates. The template '{templateName}' could still be found.");
src\Shared\CertificateGeneration\CertificateManager.cs (4)
524throw new InvalidOperationException("Unknown format."); 707throw new InvalidOperationException($"'{nameof(RemoveLocations.Undefined)}' is not a valid location."); 719throw new InvalidOperationException("Invalid location."); 749throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
105throw new InvalidOperationException("There was an error trusting the certificate."); 260throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'. 277throw new InvalidOperationException($"Can't determine the subject for the certificate with subject '{certificate.Subject}'."); 361throw new InvalidOperationException("Failed to add the certificate to the keychain. Are you running in a non-interactive session perhaps?");
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
54throw new InvalidOperationException("Trusting the certificate is not supported on linux");
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
Templates.Blazor.WebAssembly.Auth.Tests (23)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
232throw new InvalidOperationException(@$"Couldn't find listening url:
src\ProjectTemplates\Shared\Project.cs (1)
36throw new InvalidOperationException($"No test log folder specified via {nameof(TestFrameworkFileLoggerAttribute)}.");
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
36throw new InvalidOperationException($"Project key collision in {nameof(ProjectFactoryFixture)}.{nameof(CreateProject)}!");
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (3)
96throw new InvalidOperationException($"Failed to find required templates in {packagesDir}. Please ensure the *Templates*.nupkg have been built."); 123throw new InvalidOperationException($"Couldn't find {templateName} as an option in {proc.Output}."); 139throw new InvalidOperationException($"Failed to uninstall previous templates. The template '{templateName}' could still be found.");
src\Shared\CertificateGeneration\CertificateManager.cs (4)
524throw new InvalidOperationException("Unknown format."); 707throw new InvalidOperationException($"'{nameof(RemoveLocations.Undefined)}' is not a valid location."); 719throw new InvalidOperationException("Invalid location."); 749throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
105throw new InvalidOperationException("There was an error trusting the certificate."); 260throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'. 277throw new InvalidOperationException($"Can't determine the subject for the certificate with subject '{certificate.Subject}'."); 361throw new InvalidOperationException("Failed to add the certificate to the keychain. Are you running in a non-interactive session perhaps?");
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
54throw new InvalidOperationException("Trusting the certificate is not supported on linux");
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
src\Shared\E2ETesting\BrowserFixture.cs (1)
203throw new InvalidOperationException("Couldn't create a Selenium remote driver client. The server is irresponsive", innerException);
src\Shared\E2ETesting\CaptureSeleniumLogsAttribute.cs (1)
21throw new InvalidOperationException("This should only be used with BrowserTestBase");
src\Shared\E2ETesting\SauceConnectServer.cs (4)
39throw new InvalidOperationException("Sauce connect singleton already created."); 103throw new InvalidOperationException($"Invalid tracking folder. Set the 'SauceConnectProcessTrackingFolder' MSBuild property to a valid folder."); 188throw new InvalidOperationException(message); 249throw new InvalidOperationException($"Failed to write file for process {process.Id}");
src\Shared\E2ETesting\WaitAssert.cs (1)
140throw new InvalidOperationException("The assertion succeeded after the timeout.");
Templates.Blazor.WebAssembly.Tests (23)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
232throw new InvalidOperationException(@$"Couldn't find listening url:
src\ProjectTemplates\Shared\Project.cs (1)
36throw new InvalidOperationException($"No test log folder specified via {nameof(TestFrameworkFileLoggerAttribute)}.");
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
36throw new InvalidOperationException($"Project key collision in {nameof(ProjectFactoryFixture)}.{nameof(CreateProject)}!");
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (3)
96throw new InvalidOperationException($"Failed to find required templates in {packagesDir}. Please ensure the *Templates*.nupkg have been built."); 123throw new InvalidOperationException($"Couldn't find {templateName} as an option in {proc.Output}."); 139throw new InvalidOperationException($"Failed to uninstall previous templates. The template '{templateName}' could still be found.");
src\Shared\CertificateGeneration\CertificateManager.cs (4)
524throw new InvalidOperationException("Unknown format."); 707throw new InvalidOperationException($"'{nameof(RemoveLocations.Undefined)}' is not a valid location."); 719throw new InvalidOperationException("Invalid location."); 749throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
105throw new InvalidOperationException("There was an error trusting the certificate."); 260throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'. 277throw new InvalidOperationException($"Can't determine the subject for the certificate with subject '{certificate.Subject}'."); 361throw new InvalidOperationException("Failed to add the certificate to the keychain. Are you running in a non-interactive session perhaps?");
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
54throw new InvalidOperationException("Trusting the certificate is not supported on linux");
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
src\Shared\E2ETesting\BrowserFixture.cs (1)
203throw new InvalidOperationException("Couldn't create a Selenium remote driver client. The server is irresponsive", innerException);
src\Shared\E2ETesting\CaptureSeleniumLogsAttribute.cs (1)
21throw new InvalidOperationException("This should only be used with BrowserTestBase");
src\Shared\E2ETesting\SauceConnectServer.cs (4)
39throw new InvalidOperationException("Sauce connect singleton already created."); 103throw new InvalidOperationException($"Invalid tracking folder. Set the 'SauceConnectProcessTrackingFolder' MSBuild property to a valid folder."); 188throw new InvalidOperationException(message); 249throw new InvalidOperationException($"Failed to write file for process {process.Id}");
src\Shared\E2ETesting\WaitAssert.cs (1)
140throw new InvalidOperationException("The assertion succeeded after the timeout.");
Templates.Mvc.Tests (23)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
232throw new InvalidOperationException(@$"Couldn't find listening url:
src\ProjectTemplates\Shared\Project.cs (1)
36throw new InvalidOperationException($"No test log folder specified via {nameof(TestFrameworkFileLoggerAttribute)}.");
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
36throw new InvalidOperationException($"Project key collision in {nameof(ProjectFactoryFixture)}.{nameof(CreateProject)}!");
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (3)
96throw new InvalidOperationException($"Failed to find required templates in {packagesDir}. Please ensure the *Templates*.nupkg have been built."); 123throw new InvalidOperationException($"Couldn't find {templateName} as an option in {proc.Output}."); 139throw new InvalidOperationException($"Failed to uninstall previous templates. The template '{templateName}' could still be found.");
src\Shared\CertificateGeneration\CertificateManager.cs (4)
524throw new InvalidOperationException("Unknown format."); 707throw new InvalidOperationException($"'{nameof(RemoveLocations.Undefined)}' is not a valid location."); 719throw new InvalidOperationException("Invalid location."); 749throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
105throw new InvalidOperationException("There was an error trusting the certificate."); 260throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'. 277throw new InvalidOperationException($"Can't determine the subject for the certificate with subject '{certificate.Subject}'."); 361throw new InvalidOperationException("Failed to add the certificate to the keychain. Are you running in a non-interactive session perhaps?");
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
54throw new InvalidOperationException("Trusting the certificate is not supported on linux");
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
src\Shared\E2ETesting\BrowserFixture.cs (1)
203throw new InvalidOperationException("Couldn't create a Selenium remote driver client. The server is irresponsive", innerException);
src\Shared\E2ETesting\CaptureSeleniumLogsAttribute.cs (1)
21throw new InvalidOperationException("This should only be used with BrowserTestBase");
src\Shared\E2ETesting\SauceConnectServer.cs (4)
39throw new InvalidOperationException("Sauce connect singleton already created."); 103throw new InvalidOperationException($"Invalid tracking folder. Set the 'SauceConnectProcessTrackingFolder' MSBuild property to a valid folder."); 188throw new InvalidOperationException(message); 249throw new InvalidOperationException($"Failed to write file for process {process.Id}");
src\Shared\E2ETesting\WaitAssert.cs (1)
140throw new InvalidOperationException("The assertion succeeded after the timeout.");
Templates.Tests (23)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
232throw new InvalidOperationException(@$"Couldn't find listening url:
src\ProjectTemplates\Shared\Project.cs (1)
36throw new InvalidOperationException($"No test log folder specified via {nameof(TestFrameworkFileLoggerAttribute)}.");
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
36throw new InvalidOperationException($"Project key collision in {nameof(ProjectFactoryFixture)}.{nameof(CreateProject)}!");
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (3)
96throw new InvalidOperationException($"Failed to find required templates in {packagesDir}. Please ensure the *Templates*.nupkg have been built."); 123throw new InvalidOperationException($"Couldn't find {templateName} as an option in {proc.Output}."); 139throw new InvalidOperationException($"Failed to uninstall previous templates. The template '{templateName}' could still be found.");
src\Shared\CertificateGeneration\CertificateManager.cs (4)
524throw new InvalidOperationException("Unknown format."); 707throw new InvalidOperationException($"'{nameof(RemoveLocations.Undefined)}' is not a valid location."); 719throw new InvalidOperationException("Invalid location."); 749throw new InvalidOperationException($"Failed to create a key with a size of {minimumKeySize} bits");
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
105throw new InvalidOperationException("There was an error trusting the certificate."); 260throw new InvalidOperationException($@"There was an error removing the certificate with thumbprint '{certificate.Thumbprint}'. 277throw new InvalidOperationException($"Can't determine the subject for the certificate with subject '{certificate.Subject}'."); 361throw new InvalidOperationException("Failed to add the certificate to the keychain. Are you running in a non-interactive session perhaps?");
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
54throw new InvalidOperationException("Trusting the certificate is not supported on linux");
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
src\Shared\E2ETesting\BrowserFixture.cs (1)
203throw new InvalidOperationException("Couldn't create a Selenium remote driver client. The server is irresponsive", innerException);
src\Shared\E2ETesting\CaptureSeleniumLogsAttribute.cs (1)
21throw new InvalidOperationException("This should only be used with BrowserTestBase");
src\Shared\E2ETesting\SauceConnectServer.cs (4)
39throw new InvalidOperationException("Sauce connect singleton already created."); 103throw new InvalidOperationException($"Invalid tracking folder. Set the 'SauceConnectProcessTrackingFolder' MSBuild property to a valid folder."); 188throw new InvalidOperationException(message); 249throw new InvalidOperationException($"Failed to write file for process {process.Id}");
src\Shared\E2ETesting\WaitAssert.cs (1)
140throw new InvalidOperationException("The assertion succeeded after the timeout.");
TestExclusionListTasks (3)
src\tasks\AndroidAppBuilder\ApkBuilder.cs (3)
98throw new InvalidOperationException("Interpreter and AOT cannot be enabled at the same time"); 177throw new InvalidOperationException("Need list of AOT files."); 413throw new InvalidOperationException("Didn't find any .class files");
UIAutomationClient (41)
MS\Internal\Automation\HwndProxyElementProvider.cs (24)
310throw new InvalidOperationException(SR.OperationCannotBePerformed); 326throw new InvalidOperationException(SR.OperationCannotBePerformed); 335throw new InvalidOperationException(SR.OperationCannotBePerformed); 344throw new InvalidOperationException(SR.OperationCannotBePerformed); 356throw new InvalidOperationException(SR.OperationCannotBePerformed); 365throw new InvalidOperationException(SR.OperationCannotBePerformed); 377throw new InvalidOperationException(SR.OperationCannotBePerformed); 399throw new InvalidOperationException(SR.OperationCannotBePerformed); 642throw new InvalidOperationException(SR.OperationCannotBePerformed); 653throw new InvalidOperationException(SR.OperationCannotBePerformed); 662throw new InvalidOperationException(SR.OperationCannotBePerformed); 686throw new InvalidOperationException(SR.OperationCannotBePerformed); 708throw new InvalidOperationException(SR.OperationCannotBePerformed); 718throw new InvalidOperationException(SR.OperationCannotBePerformed); 724throw new InvalidOperationException(SR.OperationCannotBePerformed); 738throw new InvalidOperationException(SR.OperationCannotBePerformed); 747throw new InvalidOperationException(SR.OperationCannotBePerformed); 755throw new InvalidOperationException(SR.OperationCannotBePerformed); 764throw new InvalidOperationException(SR.OperationCannotBePerformed); 777throw new InvalidOperationException(SR.OperationCannotBePerformed); 792throw new InvalidOperationException(SR.OperationCannotBePerformed); 829throw new InvalidOperationException(SR.OperationCannotBePerformed); 841throw new InvalidOperationException(SR.OperationCannotBePerformed); 850throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\Automation\Misc.cs (3)
193throw new InvalidOperationException(SR.CacheRequestNeedCache); 202throw new InvalidOperationException(SR.CacheRequestNeedLiveForProperties); 260throw new InvalidOperationException();
System\Windows\Automation\AutomationElement.cs (9)
336throw new InvalidOperationException(SR.OperationCannotBePerformed); 563throw new InvalidOperationException(SR.UnsupportedPattern); 686throw new InvalidOperationException(SR.UnsupportedPattern); 869throw new InvalidOperationException(SR.SetFocusFailed); 1049throw new InvalidOperationException(SR.CachedPropertyNotRequested); 1081throw new InvalidOperationException(SR.CachedPropertyNotRequested); 1123throw new InvalidOperationException(SR.CacheRequestNeedElementReference); 1225throw new InvalidOperationException(SR.CachedPropertyNotRequested); 1256throw new InvalidOperationException(SR.CachedPropertyNotRequested);
System\Windows\Automation\CacheRequest.cs (2)
201throw new InvalidOperationException(SR.CacheReqestCanOnlyPopTop); 475throw new InvalidOperationException(SR.CacheReqestCantModifyWhileActive);
System\Windows\Automation\RangeValuePattern.cs (1)
101throw new InvalidOperationException(SR.ValueReadonly);
System\Windows\Automation\TextPattern.cs (1)
278throw new InvalidOperationException(SR.CantPrefetchTextPattern);
System\Windows\Automation\ValuePattern.cs (1)
88throw new InvalidOperationException(SR.ValueReadonly);
UIAutomationClientSideProviders (104)
MS\Internal\AutomationProxies\Accessible.cs (2)
552throw new InvalidOperationException(SR.OperationCannotBePerformed, e); 1158throw new InvalidOperationException(SR.OperationCannotBePerformed, e);
MS\Internal\AutomationProxies\Misc.cs (1)
1716throw new InvalidOperationException();
MS\Internal\AutomationProxies\MSAANativeProvider.cs (1)
1218throw new InvalidOperationException(SR.OperationCannotBePerformed, e);
MS\Internal\AutomationProxies\ProxySimple.cs (1)
563throw new InvalidOperationException(SR.SetFocusFailed);
MS\Internal\AutomationProxies\WindowsButton.cs (2)
375throw new InvalidOperationException(SR.DoesNotSupportMultipleSelection); 381throw new InvalidOperationException(SR.DoesNotSupportMultipleSelection);
MS\Internal\AutomationProxies\WindowsComboBox.cs (1)
403throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsEditBox.cs (5)
276throw new InvalidOperationException(SR.ValueReadonly); 298throw new InvalidOperationException (SR.OperationCannotBePerformed); 305throw new InvalidOperationException(SR.OperationCannotBePerformed); 348throw new InvalidOperationException(SR.Format(SR.EditControlsHaveNoChildren, GetType().FullName)); 885throw new InvalidOperationException();
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (7)
44throw new InvalidOperationException(SR.Format(SR.InvalidTextRangeOffset, GetType().FullName)); 451throw new InvalidOperationException(); 456throw new InvalidOperationException(); 1072throw new InvalidOperationException(SR.Format(SR.InvalidTextRangeOffset, GetType().FullName)); 1084throw new InvalidOperationException(SR.Format(SR.InvalidRangeEndpoint, GetType().FullName)); 1118throw new InvalidOperationException(SR.Format(SR.InvalidTextRangeOffset, GetType().FullName)); 1149throw new InvalidOperationException(SR.Format(SR.InvalidTextRangeOffset, GetType().FullName));
MS\Internal\AutomationProxies\WindowsFormsLinkLabel.cs (1)
129throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsHyperlink.cs (1)
436throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsIPAddress.cs (1)
146throw new InvalidOperationException (SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsListBox.cs (8)
823throw new InvalidOperationException(SR.OperationCannotBePerformed); 856throw new InvalidOperationException(SR.DoesNotSupportMultipleSelection); 875throw new InvalidOperationException(SR.OperationCannotBePerformed); 901throw new InvalidOperationException(SR.SelectionRequired); 906throw new InvalidOperationException(SR.OperationCannotBePerformed); 937throw new InvalidOperationException(SR.OperationCannotBePerformed); 942throw new InvalidOperationException(SR.OperationCannotBePerformed); 963throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsListView.cs (2)
230throw new InvalidOperationException(SR.OperationCannotBePerformed); 673throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (6)
203throw new InvalidOperationException(SR.OperationCannotBePerformed); 574throw new InvalidOperationException(SR.OperationCannotBePerformed); 604throw new InvalidOperationException(SR.OperationCannotBePerformed); 617throw new InvalidOperationException(SR.OperationCannotBePerformed); 675throw new InvalidOperationException(SR.OperationCannotBePerformed); 713throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (2)
66throw new InvalidOperationException(SR.OperationCannotBePerformed); 80throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsListViewItem.cs (10)
405throw new InvalidOperationException(SR.OperationCannotBePerformed); 434throw new InvalidOperationException(SR.DoesNotSupportMultipleSelection); 443throw new InvalidOperationException(SR.OperationCannotBePerformed); 472throw new InvalidOperationException(SR.SelectionRequired); 479throw new InvalidOperationException(SR.OperationCannotBePerformed); 536throw new InvalidOperationException(SR.OperationCannotBePerformed); 669throw new InvalidOperationException(SR.OperationCannotBePerformed); 756throw new InvalidOperationException(SR.ValueReadonly); 769throw new InvalidOperationException(SR.OperationCannotBePerformed); 810throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsListViewItemCheckBox.cs (1)
221throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsMenu.cs (8)
1713throw new InvalidOperationException(SR.OperationCannotBePerformed); 1722throw new InvalidOperationException(SR.OperationCannotBePerformed); 1730throw new InvalidOperationException(SR.OperationCannotBePerformed); 1756throw new InvalidOperationException(SR.OperationCannotBePerformed); 1765throw new InvalidOperationException(SR.OperationCannotBePerformed); 1774throw new InvalidOperationException(SR.OperationCannotBePerformed); 1808throw new InvalidOperationException(SR.DoesNotSupportMultipleSelection); 1814throw new InvalidOperationException(SR.DoesNotSupportMultipleSelection);
MS\Internal\AutomationProxies\WindowsProgressbar.cs (1)
91throw new InvalidOperationException(SR.ValueReadonly);
MS\Internal\AutomationProxies\WindowsRichEdit.cs (4)
174throw new InvalidOperationException(SR.ValueReadonly); 196throw new InvalidOperationException (SR.OperationCannotBePerformed); 203throw new InvalidOperationException(SR.OperationCannotBePerformed); 265throw new InvalidOperationException(SR.Format(SR.RichEditTextPatternHasNoChildren, GetType().FullName));
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (2)
344throw new InvalidOperationException(); 349throw new InvalidOperationException();
MS\Internal\AutomationProxies\WindowsScroll.cs (4)
36throw new InvalidOperationException(SR.OperationCannotBePerformed); 61throw new InvalidOperationException(SR.OperationCannotBePerformed); 69throw new InvalidOperationException(SR.OperationCannotBePerformed); 78throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsScrollBar.cs (1)
632throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsStatusBar.cs (1)
527throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (1)
485throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsTab.cs (15)
464throw new InvalidOperationException(SR.OperationCannotBePerformed); 469throw new InvalidOperationException(SR.OperationCannotBePerformed); 474throw new InvalidOperationException(SR.OperationCannotBePerformed); 488throw new InvalidOperationException(SR.OperationCannotBePerformed); 493throw new InvalidOperationException(SR.OperationCannotBePerformed); 509throw new InvalidOperationException(SR.OperationCannotBePerformed); 686throw new InvalidOperationException(SR.OperationCannotBePerformed); 823throw new InvalidOperationException(SR.OperationCannotBePerformed); 1073throw new InvalidOperationException(SR.OperationCannotBePerformed); 1094throw new InvalidOperationException(SR.OperationCannotBePerformed); 1116throw new InvalidOperationException(SR.OperationCannotBePerformed); 1121throw new InvalidOperationException(SR.DoesNotSupportMultipleSelection); 1152throw new InvalidOperationException(SR.OperationCannotBePerformed); 1161throw new InvalidOperationException(SR.OperationCannotBePerformed); 1220throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsToolbar.cs (2)
659throw new InvalidOperationException(SR.OperationCannotBePerformed); 669throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsTreeView.cs (12)
617throw new InvalidOperationException(SR.OperationCannotBePerformed); 641throw new InvalidOperationException(SR.OperationCannotBePerformed); 986throw new InvalidOperationException(SR.OperationCannotBePerformed); 1016throw new InvalidOperationException(SR.DoesNotSupportMultipleSelection); 1022throw new InvalidOperationException(SR.OperationCannotBePerformed); 1040throw new InvalidOperationException(SR.SelectionRequired); 1092throw new InvalidOperationException (SR.OperationCannotBePerformed); 1121throw new InvalidOperationException (SR.OperationCannotBePerformed); 1160throw new InvalidOperationException(SR.OperationCannotBePerformed); 1228throw new InvalidOperationException(SR.OperationCannotBePerformed); 1418throw new InvalidOperationException(SR.OperationCannotBePerformed); 1465throw new InvalidOperationException(SR.OperationCannotBePerformed);
MS\Internal\AutomationProxies\WindowsUpDown.cs (1)
542throw new InvalidOperationException(SR.OperationCannotBePerformed);
UIAutomationTypes (1)
System\Windows\Automation\AutomationIdentifier.cs (1)
172throw new InvalidOperationException("Invalid type specified for AutomationIdentifier");
VersioningWebSite (1)
src\Mvc\test\WebSites\Common\TestResponseGenerator.cs (1)
20throw new InvalidOperationException("ActionContext should not be null here.");
Wasm.Performance.ConsoleHost (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
124throw new InvalidOperationException(message);
Wasm.Performance.Driver (1)
Selenium.cs (1)
125throw new InvalidOperationException("Couldn't create a Selenium remote driver client. The server is irresponsive");
WindowsFormsIntegration (3)
System\Windows\Integration\PropertyMap.cs (2)
149throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, SR.WFI_PropertyMappingExists, propertyName)); 344throw new InvalidOperationException(SR.WFI_PropertyMapError, ex);
System\Windows\Integration\WindowsFormsHost.cs (1)
222InvalidOperationException exception = new InvalidOperationException(SR.Host_CannotRotateWindowsFormsHost);
XmlFormattersWebSite (1)
Controllers\SerializableErrorController.cs (1)
18throw new InvalidOperationException("Error in executing the action");
xunit.console (3)
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\CompilationLibrary.cs (1)
55throw new InvalidOperationException($"Cannot find compilation library location for package '{Name}'");
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\DependencyContextJsonReader.cs (1)
370throw new InvalidOperationException($"Cannot find library information for {nameWithVersion}");
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\Resolution\ReferenceAssemblyPathResolver.cs (1)
52throw new InvalidOperationException($"Cannot find reference assembly '{assembly}' file for package {library.Name}");
3286 references to InvalidOperationException
Diagnostics.EFCore.FunctionalTests (4)
DatabaseErrorPageMiddlewareTest.cs (2)
79var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () =>
MigrationsEndPointMiddlewareTest.cs (2)
261var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () =>
IIS.Tests (4)
HttpBodyControlFeatureTests.cs (2)
52Assert.IsType<InvalidOperationException>(readException); 53Assert.IsType<InvalidOperationException>(writeException);
MaxRequestBodySizeTests.cs (2)
240InvalidOperationException invalidOpEx = null; 251invalidOpEx = Assert.Throws<InvalidOperationException>(() =>
InMemory.FunctionalTests (130)
ChunkedRequestTests.cs (7)
246Assert.Throws<InvalidOperationException>(() => request.GetTrailer("X-Trailer-Header")); // Not yet 253Assert.Throws<InvalidOperationException>(() => request.GetTrailer("X-Trailer-Header")); // Not yet 261Assert.Throws<InvalidOperationException>(() => request.GetTrailer("X-Trailer-Header")); 372Assert.Throws<InvalidOperationException>(() => request.GetTrailer("X-Trailer-Header")); // Not yet 379Assert.Throws<InvalidOperationException>(() => request.GetTrailer("X-Trailer-Header")); // Not yet 387Assert.Throws<InvalidOperationException>(() => request.GetTrailer("X-Trailer-Header")); 977await Assert.ThrowsAsync<InvalidOperationException>(async () => await request.BodyReader.ReadAsync());
Http2\Http2StreamTests.cs (28)
1515InvalidOperationException ex = null; 1526ex = Assert.Throws<InvalidOperationException>(() => context.Response.OnStarting(_ => Task.CompletedTask, null)); 2151Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("Custom你好Name", "Custom Value")); 2152Assert.Throws<InvalidOperationException>(() => context.Response.ContentType = "Custom 你好 Type"); 2153Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom 你好 Value")); 2154Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom \r Value")); 2192Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("Custom你好Name", "Custom Value")); 2193Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom \r Value")); 2475Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("Custom你好Name", "Custom Value")); 2476Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("CustomName", "Custom 你好 Value")); 2477Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("CustomName", "Custom \r Value")); 2479Assert.Throws<InvalidOperationException>(() => context.Features.Get<IHttpResponseTrailersFeature>().Trailers.ETag = "Custom 你好 Tag"); 2480Assert.Throws<InvalidOperationException>(() => context.Features.Get<IHttpResponseTrailersFeature>().Trailers.Accept = "Custom 你好 Tag"); 2518Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("Custom你好Name", "Custom Value")); 2519Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("CustomName", "Custom \r Value")); 4087InvalidOperationException writeEx = null; 4097writeEx = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Response.WriteAsync("")); 4293var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Response.CompleteAsync().DefaultTimeout()); 4416var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Response.WriteAsync("2 Hello World").DefaultTimeout()); 4475var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Response.WriteAsync("2 Hello World").DefaultTimeout()); 4535catch (InvalidOperationException) 4741var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Response.CompleteAsync().DefaultTimeout()); 4812var ex = Assert.Throws<InvalidOperationException>(() => context.Response.BodyWriter.Complete());
Http2\Http2WebSocketTests.cs (5)
456var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Response.Body.WriteAsync(new byte[1] { 0x00 }).AsTask()); 458ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Response.BodyWriter.WriteAsync(new byte[1] { 0x00 }).AsTask()); 465ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Response.Body.WriteAsync(new byte[1] { 0x00 }).AsTask()); 467ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Response.BodyWriter.WriteAsync(new byte[1] { 0x00 }).AsTask());
Http3\Http3StreamTests.cs (26)
867Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("Custom你好Name", "Custom Value")); 868Assert.Throws<InvalidOperationException>(() => context.Response.ContentType = "Custom 你好 Type"); 869Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom 你好 Value")); 870Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom \r Value")); 901Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("Custom你好Name", "Custom Value")); 902Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom \r Value")); 1018Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("Custom你好Name", "Custom Value")); 1019Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("CustomName", "Custom 你好 Value")); 1020Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("CustomName", "Custom \r Value")); 1022Assert.Throws<InvalidOperationException>(() => context.Features.Get<IHttpResponseTrailersFeature>().Trailers.ETag = "Custom 你好 Tag"); 1023Assert.Throws<InvalidOperationException>(() => context.Features.Get<IHttpResponseTrailersFeature>().Trailers.Accept = "Custom 你好 Tag"); 1049Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("Custom你好Name", "Custom Value")); 1050Assert.Throws<InvalidOperationException>(() => context.Response.AppendTrailer("CustomName", "Custom \r Value")); 1247var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Response.CompleteAsync().DefaultTimeout()); 1350var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Response.WriteAsync("2 Hello World").DefaultTimeout()); 1402var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Response.WriteAsync("2 Hello World").DefaultTimeout()); 1448catch (InvalidOperationException) 1609var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Response.CompleteAsync().DefaultTimeout()); 1667var ex = Assert.Throws<InvalidOperationException>(() => context.Response.BodyWriter.Complete()); 2076var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => readTrailersTcs.Task).DefaultTimeout();
HttpProtocolSelectionTests.cs (1)
22return TestError<InvalidOperationException>(HttpProtocols.None, CoreStrings.EndPointRequiresAtLeastOneProtocol);
HttpsConnectionMiddlewareTests.cs (6)
898var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Connection.GetClientCertificateAsync()); 1082var ioe = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Connection.GetClientCertificateAsync()); 1344var ex = Assert.Throws<InvalidOperationException>(() =>
MaxRequestBodySizeTests.cs (4)
279InvalidOperationException invalidOpEx = null; 290invalidOpEx = Assert.Throws<InvalidOperationException>(() => 319InvalidOperationException invalidOpEx = null; 330invalidOpEx = Assert.Throws<InvalidOperationException>(() =>
RequestTests.cs (9)
1692var ioEx = Assert.Throws<InvalidOperationException>(() => context.Request.Body.Read(new byte[1], 0, 1)); 1695var ioEx2 = Assert.Throws<InvalidOperationException>(() => context.Request.Body.CopyTo(Stream.Null)); 1785var ioEx = Assert.Throws<InvalidOperationException>(() => context.Request.Body.Read(new byte[1], 0, 1)); 1788var ioEx2 = Assert.Throws<InvalidOperationException>(() => context.Request.Body.CopyTo(Stream.Null)); 1959await Assert.ThrowsAsync<InvalidOperationException>(async () => await request.BodyReader.ReadAsync());
ResponseHeaderTests.cs (7)
23Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("Custom你好Name", "Custom Value")); 24Assert.Throws<InvalidOperationException>(() => context.Response.ContentType = "Custom 你好 Type"); // Special cased 25Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Accept = "Custom 你好 Accept"); // Not special cased 26Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom 你好 Value")); 27Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom \r Value")); 54Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("Custom你好Name", "Custom Value")); 55Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom \r Value"));
ResponseTests.cs (27)
76InvalidOperationException ex = null; 82ex = Assert.Throws<InvalidOperationException>(() => context.Response.OnStarting(_ => Task.CompletedTask, null)); 111InvalidOperationException ex = null; 116ex = Assert.Throws<InvalidOperationException>(() => context.Response.OnStarting(_ => Task.CompletedTask, null)); 694var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => responseWriteTcs.Task).DefaultTimeout(); 770var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => responseWriteTcs.Task).DefaultTimeout(); 808var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => responseWriteTcs.Task).DefaultTimeout(); 850var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => responseWriteTcs.Task).DefaultTimeout(); 1130m.Exception is InvalidOperationException ex && 1137InvalidOperationException completeEx = null; 1154completeEx = Assert.Throws<InvalidOperationException>(() => httpContext.Response.BodyWriter.Complete()); 1187m.Exception is InvalidOperationException ex && 3384var ioEx = Assert.Throws<InvalidOperationException>(() => context.Response.Body.Write(Encoding.ASCII.GetBytes("What!?"), 0, 6)); 3480var ioEx = Assert.Throws<InvalidOperationException>(() => context.Response.Body.Write(Encoding.ASCII.GetBytes("What!?"), 0, 6)); 3604Assert.Throws<InvalidOperationException>(() => response.BodyWriter.Advance(1)); 3801InvalidOperationException writeEx = null; 3806writeEx = await Assert.ThrowsAsync<InvalidOperationException>(() => httpContext.Response.WriteAsync("test")); 4033Assert.Throws<InvalidOperationException>(() => httpContext.Response.BodyWriter.Advance(1)); 4204Assert.Throws<InvalidOperationException>(() => httpContext.Response.BodyWriter.Advance(1)); 4230InvalidOperationException writeEx = null; 4236writeEx = Assert.Throws<InvalidOperationException>(() => httpContext.Response.BodyWriter.GetMemory());
UpgradeTests.cs (10)
31var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.Response.Body.WriteAsync(new byte[1], 0, 1)); 34await Assert.ThrowsAsync<InvalidOperationException>(() => context.Response.BodyWriter.WriteAsync(new byte[1]).AsTask()); 154var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await upgradeTcs.Task.DefaultTimeout()); 296var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await upgradeTcs.Task).DefaultTimeout(); 321catch (InvalidOperationException ex) 347var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await upgradeTcs.Task.TimeoutAfter(TimeSpan.FromSeconds(60)));
InProcessWebSite (4)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (2)
526catch (InvalidOperationException) 540catch (InvalidOperationException)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.WebSockets.cs (2)
96var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => upgradeFeature.UpgradeAsync());
Interop.FunctionalTests (2)
Http3\Http3TlsTests.cs (2)
393Assert.Throws<InvalidOperationException>(host.Run); 426Assert.Throws<InvalidOperationException>(host.Run);
InteropClient (1)
InteropClient.cs (1)
543catch (InvalidOperationException)
Microsoft.AspNetCore.Antiforgery.Test (12)
AntiforgeryApplicationBuilderExtensionsTest.cs (2)
41var exception = Assert.Throws<InvalidOperationException>(() => builder.UseAntiforgery());
DefaultAntiforgeryTest.cs (8)
37var exception = await Assert.ThrowsAsync<InvalidOperationException>( 58var exception = await Assert.ThrowsAsync<InvalidOperationException>( 79var exception = Assert.Throws<InvalidOperationException>( 100var exception = Assert.Throws<InvalidOperationException>( 121var exception = Assert.Throws<InvalidOperationException>(
DefaultAntiforgeryTokenGeneratorTest.cs (2)
95var exception = Assert.Throws<InvalidOperationException>(
Microsoft.AspNetCore.Authentication.Core.Test (20)
AuthenticationSchemeProviderTests.cs (2)
153var error = Assert.Throws<InvalidOperationException>(() => services.GetRequiredService<IAuthenticationSchemeProvider>());
AuthenticationServiceTests.cs (18)
23var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.AuthenticateAsync("missing")); 62var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.ChallengeAsync("missing")); 77var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.ForbidAsync("missing")); 91var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignInAsync("signin", new ClaimsPrincipal(), null)); 124var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignInAsync("base", new ClaimsPrincipal(new ClaimsIdentity("whatever")), null)); 128ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignInAsync("signout", new ClaimsPrincipal(new ClaimsIdentity("whatever")), null)); 147var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignOutAsync("base")); 168var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignOutAsync()); 170ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignInAsync(new ClaimsPrincipal(new ClaimsIdentity("whatever")))); 225var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignInAsync(new ClaimsPrincipal(new ClaimsIdentity("whatever"))));
Microsoft.AspNetCore.Authentication.Negotiate.Test (9)
EventTests.cs (3)
80Assert.IsType<InvalidOperationException>(context.Exception); 88var ex = await Assert.ThrowsAsync<InvalidOperationException>(() =>
NegotiateHandlerTests.cs (4)
94var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => SendAsync(server, "/404", testConnection)); 471return Assert.ThrowsAsync<InvalidOperationException>(() => context.SignInAsync(new ClaimsPrincipal())); 476return Assert.ThrowsAsync<InvalidOperationException>(() => context.SignOutAsync());
ServerDeferralTests.cs (2)
28var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await CreateHostAsync(supportsAuth: true, isEnabled: false));
Microsoft.AspNetCore.Authentication.Test (53)
CookieTests.cs (3)
306await Assert.ThrowsAsync<InvalidOperationException>(async () => await SendAsync(server, "http://example.com/testpath")); 319await Assert.ThrowsAsync<InvalidOperationException>(async () => await SendAsync(server, "http://example.com/testpath")); 1277await Assert.ThrowsAsync<InvalidOperationException>(() => context.ChallengeAsync(CookieAuthenticationDefaults.AuthenticationScheme));
DynamicSchemeTests.cs (4)
63await Assert.ThrowsAsync<InvalidOperationException>(() => server.SendAsync("http://example.com/auth/One")); 80await Assert.ThrowsAsync<InvalidOperationException>(() => server.SendAsync("http://example.com/auth/Two")); 87await Assert.ThrowsAsync<InvalidOperationException>(() => server.SendAsync("http://example.com/auth/Two")); 88await Assert.ThrowsAsync<InvalidOperationException>(() => server.SendAsync("http://example.com/auth/One"));
GoogleTests.cs (3)
1206await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignInAsync("Google", new ClaimsPrincipal())); 1210await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignOutAsync("Google")); 1214await Assert.ThrowsAsync<InvalidOperationException>(() => context.ForbidAsync("Google"));
JwtBearerTests.cs (2)
1222await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignInAsync(JwtBearerDefaults.AuthenticationScheme, new ClaimsPrincipal())); 1226await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignOutAsync(JwtBearerDefaults.AuthenticationScheme));
JwtBearerTests_Handler.cs (2)
1254await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignInAsync(JwtBearerDefaults.AuthenticationScheme, new ClaimsPrincipal())); 1258await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignOutAsync(JwtBearerDefaults.AuthenticationScheme));
MicrosoftAccountTests.cs (3)
398await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignInAsync("Microsoft", new ClaimsPrincipal())); 402await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignOutAsync("Microsoft")); 406await Assert.ThrowsAsync<InvalidOperationException>(() => context.ForbidAsync("Microsoft"));
OpenIdConnect\OpenIdConnectChallengeTests.cs (2)
467var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => server.SendAsync(ChallengeEndpoint));
OpenIdConnect\OpenIdConnectConfigurationTests.cs (9)
68await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignInAsync(new ClaimsPrincipal())); 97await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignInAsync(new ClaimsPrincipal())); 301await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignInAsync(new ClaimsPrincipal())); 356await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignInAsync(new ClaimsPrincipal())); 416await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignInAsync(new ClaimsPrincipal())); 472return TestConfigurationException<InvalidOperationException>( 498return TestConfigurationException<InvalidOperationException>( 512return TestConfigurationException<InvalidOperationException>( 527return TestConfigurationException<InvalidOperationException>(
OpenIdConnect\OpenIdConnectTests.cs (2)
297var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => server.SendAsync(DefaultHost + TestServerBuilder.Signout));
RemoteAuthenticationTests.cs (6)
69var error = await Assert.ThrowsAsync<InvalidOperationException>(() => server.SendAsync("https://example.com/challenge")); 82var error = await Assert.ThrowsAsync<InvalidOperationException>(() => server.SendAsync("https://example.com/challenge")); 97var error = await Assert.ThrowsAsync<InvalidOperationException>(() => server.SendAsync("https://example.com/challenge"));
SharedAuthenticationTests.cs (8)
67await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignOutAsync()); 77await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignInAsync(new ClaimsPrincipal())); 367await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignOutAsync()); 377await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignInAsync(new ClaimsPrincipal())); 436await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignOutAsync()); 446await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignInAsync(new ClaimsPrincipal())); 510await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignOutAsync()); 520await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignInAsync(new ClaimsPrincipal()));
TwitterTests.cs (5)
295var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => 549await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignInAsync("Twitter", new ClaimsPrincipal())); 553await Assert.ThrowsAsync<InvalidOperationException>(() => context.SignOutAsync("Twitter")); 557await Assert.ThrowsAsync<InvalidOperationException>(() => context.ForbidAsync("Twitter"));
WsFederation\WsFederationTest.cs (2)
65var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => httpClient.GetAsync("/"));
WsFederation\WsFederationTest_Handler.cs (2)
63var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => httpClient.GetAsync("/"));
Microsoft.AspNetCore.Authorization.Test (7)
AuthorizationAppBuilderExtensionsTests.cs (2)
52var ex = Assert.Throws<InvalidOperationException>(() =>
AuthorizationPolicyFacts.cs (1)
14Assert.Throws<InvalidOperationException>(() => new AuthorizationPolicyBuilder().RequireRole());
DefaultAuthorizationServiceTests.cs (4)
30await Assert.ThrowsAsync<InvalidOperationException>(() => AuthorizationPolicy.CombineAsync(provider, new AuthorizeAttribute[] { 340var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => authorizationService.AuthorizeAsync(new ClaimsPrincipal(), "whatever", "BogusPolicy")); 482Assert.Throws<InvalidOperationException>(() => BuildAuthorizationService(services =>
Microsoft.AspNetCore.Components (1)
src\Http\Routing\src\RouteOptions.cs (1)
162/// <exception cref="InvalidOperationException">Throws an exception if the type is not an <see cref="IParameterPolicy"/>.</exception>
Microsoft.AspNetCore.Components.Authorization.Tests (4)
AuthorizeViewTest.cs (2)
244var ex = Assert.Throws<InvalidOperationException>(() =>
CascadingAuthenticationStateTest.cs (2)
28var ex = Assert.Throws<InvalidOperationException>(() => component.TriggerRender());
Microsoft.AspNetCore.Components.Endpoints (1)
Discovery\ComponentApplicationBuilder.cs (1)
70/// <exception cref="InvalidOperationException">When the assembly has already been added
Microsoft.AspNetCore.Components.Endpoints.Tests (20)
Binding\FormDataMapperTests.cs (2)
545var result = Assert.Throws<InvalidOperationException>(() => FormDataMapper.Map<int[]>(reader, options));
EndpointHtmlRendererTest.cs (6)
697var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await renderer.PrerenderComponentAsync( 717var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await renderer.PrerenderComponentAsync( 737var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await renderer.PrerenderComponentAsync( 769var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await renderer.PrerenderComponentAsync( 846var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => renderer.DispatchSubmitEventAsync("default", out isBadRequest)); 1369await Assert.ThrowsAsync<InvalidOperationException>(async () => await renderer.PrerenderPersistedStateAsync(httpContext));
RazorComponentResultTest.cs (2)
251var ex = await Assert.ThrowsAsync<InvalidOperationException>(
SSRRenderModeBoundaryTest.cs (8)
36var ex = Assert.Throws<InvalidOperationException>(() => new SSRRenderModeBoundary( 50var ex = Assert.Throws<InvalidOperationException>(() => new SSRRenderModeBoundary( 64var ex = Assert.Throws<InvalidOperationException>(() => new SSRRenderModeBoundary( 78var ex = Assert.Throws<InvalidOperationException>(() => new SSRRenderModeBoundary(
TypeNameHashTest.cs (2)
75var ex = Assert.Throws<InvalidOperationException>(() => TypeNameHash.Compute(type));
Microsoft.AspNetCore.Components.Server.Tests (14)
Circuits\CircuitHostTest.cs (4)
523var exception = Assert.IsType<InvalidOperationException>(evt.Arguments.ExceptionObject); 560var exception = Assert.IsType<InvalidOperationException>(evt.Arguments.ExceptionObject);
Circuits\RemoteJSDataStreamTest.cs (1)
114var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await remoteJSDataStream.CopyToAsync(mem).DefaultTimeout());
Circuits\RemoteRendererTest.cs (8)
421var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => renderer.OnRenderCompletedAsync(4, null)); 445var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => AddWebRootComponentAsync(renderer, MaxInteractiveServerRootComponentCount)); 461var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => AddWebRootComponentAsync(renderer, 0)); 474var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => 512var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => 532var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => 611var ex = Assert.Throws<InvalidOperationException>(() => renderer.GetOrCreateWebRootComponentManager().RemoveRootComponent(1));
Circuits\ServerAuthenticationStateProviderTest.cs (1)
14await Assert.ThrowsAsync<InvalidOperationException>(() =>
Microsoft.AspNetCore.Components.Tests (163)
CascadingParameterStateTest.cs (2)
396var ex = Assert.Throws<InvalidOperationException>(() => CreateAncestry(
CascadingParameterTest.cs (8)
325var ex = Assert.Throws<InvalidOperationException>(() => component.TriggerRender()); 350var ex = Assert.Throws<InvalidOperationException>(() => component.TriggerRender()); 384var ex = Assert.Throws<InvalidOperationException>(nestedComponent.AttemptIllegalAccessToLastParameterView); 566var ex = Assert.Throws<InvalidOperationException>(() => renderer.AssignRootComponentId(component));
ComponentFactoryTest.cs (4)
71var ex = Assert.Throws<InvalidOperationException>(() => factory.InstantiateComponent(GetServiceProvider(), componentType, null, null)); 226var ex = Assert.Throws<InvalidOperationException>(() =>
DependencyInjectionTest.cs (6)
44var ex = Assert.Throws<InvalidOperationException>(() => 57var ex = Assert.Throws<InvalidOperationException>(() => 73var ex = Assert.Throws<InvalidOperationException>(() =>
DynamicComponentTest.cs (4)
14var ex = Assert.Throws<InvalidOperationException>(() => 35var ex = Assert.Throws<InvalidOperationException>(
EventCallbackFactoryBinderExtensionsTest.cs (2)
605var ex = Assert.Throws<InvalidOperationException>(() => EventCallback.Factory.CreateBinder(component, setter, value));
Lifetime\ComponentApplicationStateTest.cs (1)
41Assert.Throws<InvalidOperationException>(() => applicationState.InitializeExistingState(existingState));
Lifetime\ComponentStatePersistenceManagerTest.cs (2)
53await Assert.ThrowsAsync<InvalidOperationException>(() => lifetime.RestoreStateAsync(store)); 75await Assert.ThrowsAsync<InvalidOperationException>(() => lifetime.PersistStateAsync(store, renderer));
NavigationManagerTest.cs (10)
140var exception = Assert.Throws<InvalidOperationException>(() => navigationManager.GetUriWithQueryParameter(name, "test")); 193var exception = Assert.Throws<InvalidOperationException>(() => navigationManager.GetUriWithQueryParameters(unsupportedParameterValues)); 209var exception = Assert.Throws<InvalidOperationException>(() => navigationManager.GetUriWithQueryParameters(values)); 764var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => navigationManager.RunNotifyLocationChangingAsync($"{baseUri}/subdir1", null, false)); 786var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => navigationManager.RunNotifyLocationChangingAsync($"{baseUri}/subdir1", null, false));
ParameterViewTest.Assignment.cs (30)
159var ex = Assert.Throws<InvalidOperationException>(() => parameters.SetParameterProperties(target)); 179var ex = Assert.Throws<InvalidOperationException>( 201var ex = Assert.Throws<InvalidOperationException>( 238var ex = Assert.Throws<InvalidOperationException>(() => parameters.SetParameterProperties(target)); 257var ex = Assert.Throws<InvalidOperationException>(() => parameters.SetParameterProperties(target)); 276var ex = Assert.Throws<InvalidOperationException>(() => parameters.SetParameterProperties(target)); 381var ex = Assert.Throws<InvalidOperationException>(() => parameters.SetParameterProperties(target)); 405var ex = Assert.Throws<InvalidOperationException>(() => parameters.SetParameterProperties(target)); 424var ex = Assert.Throws<InvalidOperationException>(() => parameters.SetParameterProperties(target)); 445var ex = Assert.Throws<InvalidOperationException>(() => parameters.SetParameterProperties(target)); 491var ex = Assert.Throws<InvalidOperationException>(() => parameters.SetParameterProperties(target)); 512var ex = Assert.Throws<InvalidOperationException>( 533var ex = Assert.Throws<InvalidOperationException>( 551var ex = Assert.Throws<InvalidOperationException>(() => 574var ex = Assert.Throws<InvalidOperationException>(() =>
ParameterViewTest.cs (6)
336Assert.Throws<InvalidOperationException>(() => parameterView.GetEnumerator()); 337Assert.Throws<InvalidOperationException>(() => parameterView.GetValueOrDefault<object>("anything")); 338Assert.Throws<InvalidOperationException>(() => parameterView.SetParameterProperties(new object())); 339Assert.Throws<InvalidOperationException>(() => parameterView.ToDictionary()); 340var ex = Assert.Throws<InvalidOperationException>(() => parameterView.TryGetValue<object>("anything", out _));
RendererTest.cs (26)
663var ex = Assert.Throws<InvalidOperationException>(() => renderer.GetEventArgsType(eventHandlerId)); 686var ex = Assert.Throws<InvalidOperationException>(() => renderer.GetEventArgsType(eventHandlerId)); 2311var exception1 = new InvalidOperationException(); 2384var exception1 = new InvalidOperationException(); 2429var exception1 = new InvalidOperationException(); 2460var aex = Assert.IsType<InvalidOperationException>(Assert.Single(renderer.HandledExceptions)); 2924var ex = Assert.Throws<InvalidOperationException>(component.TriggerRender); 3725var exception = new InvalidOperationException(); 4267var exception1 = new InvalidOperationException(); 4294var exception1 = new InvalidOperationException(); 4430var ex = Assert.Throws<InvalidOperationException>( 4458Assert.Throws<InvalidOperationException>(() => parameterView.GetEnumerator()); 4459Assert.Throws<InvalidOperationException>(() => parameterView.GetValueOrDefault<object>("anything")); 4460Assert.Throws<InvalidOperationException>(() => parameterView.SetParameterProperties(new object())); 4461Assert.Throws<InvalidOperationException>(parameterView.ToDictionary); 4462var ex = Assert.Throws<InvalidOperationException>(() => parameterView.TryGetValue<object>("anything", out _)); 4537var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => renderer.RenderRootComponentAsync(rootComponentId)); 4883var ex = Assert.Throws<InvalidOperationException>(() =>
Rendering\RenderTreeBuilderTest.cs (36)
435Assert.Throws<InvalidOperationException>(() => 448Assert.Throws<InvalidOperationException>(() => 461Assert.Throws<InvalidOperationException>(() => 474Assert.Throws<InvalidOperationException>(() => 489Assert.Throws<InvalidOperationException>(() => 504Assert.Throws<InvalidOperationException>(() => 519Assert.Throws<InvalidOperationException>(() => 533Assert.Throws<InvalidOperationException>(() => 547Assert.Throws<InvalidOperationException>(() => 562Assert.Throws<InvalidOperationException>(() => 577Assert.Throws<InvalidOperationException>(() => 592Assert.Throws<InvalidOperationException>(() => 738Assert.Throws<InvalidOperationException>(() => 751Assert.Throws<InvalidOperationException>(() => 765Assert.Throws<InvalidOperationException>(() => 827Assert.Throws<InvalidOperationException>(() => 840Assert.Throws<InvalidOperationException>(() => 854Assert.Throws<InvalidOperationException>(() => 1747var ex = Assert.Throws<InvalidOperationException>(() => 1763var ex = Assert.Throws<InvalidOperationException>(() => 2049var ex = Assert.Throws<InvalidOperationException>(() => builder.AssertTreeIsValid(component)); 2064var ex = Assert.Throws<InvalidOperationException>(() => builder.AssertTreeIsValid(component)); 2079var ex = Assert.Throws<InvalidOperationException>(() => builder.AssertTreeIsValid(component)); 2136var ex = Assert.Throws<InvalidOperationException>(() => 2175var ex = Assert.Throws<InvalidOperationException>(() => 2211var ex = Assert.Throws<InvalidOperationException>(() => 2272var ex = Assert.Throws<InvalidOperationException>(() =>
RenderTreeDiffBuilderTest.cs (6)
398var ex = Assert.Throws<InvalidOperationException>(() => GetSingleUpdatedComponent()); 415var ex = Assert.Throws<InvalidOperationException>(() => GetSingleUpdatedComponent()); 432var ex = Assert.Throws<InvalidOperationException>(() => GetSingleUpdatedComponent());
RouteViewTest.cs (2)
35var ex = Assert.Throws<InvalidOperationException>(() =>
Routing\QueryParameterValueSupplierTest.cs (8)
175var ex = Assert.Throws<InvalidOperationException>(() => _supplier.GetQueryParameterValue(targetType, key)); 200var ex = Assert.Throws<InvalidOperationException>(() => _supplier.GetQueryParameterValue(targetType.MakeArrayType(), key)); 217var ex = Assert.Throws<InvalidOperationException>(() => _supplier.GetQueryParameterValue(targetType, key)); 282var ex = Assert.Throws<InvalidOperationException>(
Routing\RouteTableFactoryTests.cs (8)
803Assert.Throws<InvalidOperationException>(() => new TestRouteTableBuilder() 836Assert.Throws<InvalidOperationException>(() => new TestRouteTableBuilder() 847var exception = Assert.Throws<InvalidOperationException>(() => new TestRouteTableBuilder() 1042var exception = Assert.Throws<InvalidOperationException>(() => new TestRouteTableBuilder() 1128catch (InvalidOperationException ex) when (ex.InnerException is InvalidOperationException)
StackObjectPoolTest.cs (2)
96var ex = Assert.Throws<InvalidOperationException>(() =>
Microsoft.AspNetCore.Components.Web (2)
Forms\InputExtensions.cs (1)
46catch (InvalidOperationException ex)
Forms\Mapping\FormValueMappingContext.cs (1)
68/// <exception cref="InvalidOperationException">Thrown if the result has already been set.</exception>
Microsoft.AspNetCore.Components.Web.Tests (34)
Forms\EditFormTest.cs (4)
42var ex = await Assert.ThrowsAsync<InvalidOperationException>( 56var ex = await Assert.ThrowsAsync<InvalidOperationException>(
Forms\InputBaseTest.cs (4)
21var ex = Assert.Throws<InvalidOperationException>(() => rootComponent.TriggerRender()); 33var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => InputRenderer.RenderAndGetComponent(rootComponent));
Forms\InputFileChangeEventArgsTest.cs (6)
30var ex = Assert.Throws<InvalidOperationException>(() => instance.File); 38var ex = Assert.Throws<InvalidOperationException>(() => instance.File); 62var ex = Assert.Throws<InvalidOperationException>(() => instance.GetMultipleFiles(1));
Forms\InputRadioTest.cs (2)
23var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => RenderAndGetTestInputComponentAsync(rootComponent));
Forms\Mapping\FormMappingScopeTest.cs (6)
91var exception = Assert.Throws<InvalidOperationException>(() => _renderer.RenderRootComponent(id)); 106var exception = Assert.Throws<InvalidOperationException>(() => _renderer.RenderRootComponent(id)); 129var exception = Assert.Throws<InvalidOperationException>(testComponent.TriggerRender);
HtmlRendering\HtmlRendererTest.cs (4)
29var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => resultTask); 42var ex = Assert.Throws<InvalidOperationException>(() => htmlContent.WriteHtmlTo(new StringWriter()));
Virtualization\VirtualizeTest.cs (8)
30var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await testRenderer.RenderRootComponentAsync(componentId)); 49var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await testRenderer.RenderRootComponentAsync(componentId)); 68var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await testRenderer.RenderRootComponentAsync(componentId)); 98var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await testRenderer.RenderRootComponentAsync(componentId));
Microsoft.AspNetCore.Components.WebAssembly.Tests (4)
Hosting\WebAssemblyCultureProviderTest.cs (2)
40var ex = Assert.Throws<InvalidOperationException>(() => cultureProvider.ThrowIfCultureChangeIsUnsupported());
Hosting\WebAssemblyHostBuilderTest.cs (1)
106Assert.Throws<InvalidOperationException>(() => host.Services.GetRequiredService<TestServiceThatTakesStringBuilder>());
Hosting\WebAssemblyHostTest.cs (1)
50var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => host.RunAsyncCore(cts.Token));
Microsoft.AspNetCore.Components.WebView.Test (2)
WebViewManagerTests.cs (2)
108var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await webViewManager.AddRootComponentAsync(typeof(MyComponent), arbitraryComponentSelector, ParameterView.Empty));
Microsoft.AspNetCore.ConcurrencyLimiter.Tests (2)
PolicyTests\StackPolicyTests.cs (2)
143Assert.Throws<InvalidOperationException>(() => stack.OnExit()); 149Assert.Throws<InvalidOperationException>(() => stack.OnExit());
Microsoft.AspNetCore.CookiePolicy.Test (1)
CookieConsentTests.cs (1)
331Assert.Throws<InvalidOperationException>(() => context.Response.Cookies.Append("Test", "Value"));
Microsoft.AspNetCore.Cors.Test (2)
CorsPolicyBuilderTests.cs (2)
342var ex = Assert.Throws<InvalidOperationException>(() => builder.Build());
Microsoft.AspNetCore.DataProtection (6)
Error.cs (6)
12public static InvalidOperationException CertificateXmlEncryptor_CertificateNotFound(string thumbprint) 40public static InvalidOperationException Common_PropertyCannotBeNullOrEmpty(string propertyName) 46public static InvalidOperationException Common_PropertyMustBeNonNegative(string propertyName) 89public static InvalidOperationException XmlKeyManager_DuplicateKey(Guid keyId) 95public static InvalidOperationException KeyRingProvider_DefaultKeyRevoked(Guid id) 101public static InvalidOperationException KeyRingProvider_RefreshFailedOnOtherThread(Exception? inner)
Microsoft.AspNetCore.DataProtection.Abstractions (1)
DataProtectionCommonExtensions.cs (1)
92/// <exception cref="InvalidOperationException">If no <see cref="IDataProtectionProvider"/> service exists in <paramref name="services"/>.</exception>
Microsoft.AspNetCore.DataProtection.Abstractions.Tests (2)
DataProtectionCommonExtensionsTests.cs (2)
116var ex = Assert.Throws<InvalidOperationException>(() => services.GetDataProtectionProvider());
Microsoft.AspNetCore.DataProtection.Tests (11)
AuthenticatedEncryption\ConfigurationModel\ManagedAuthenticatedEncryptorDescriptorDeserializerTests.cs (2)
125var ex = Assert.Throws<InvalidOperationException>(() => new ManagedAuthenticatedEncryptorDescriptorDeserializer().ImportFromXml(XElement.Parse(xml)));
Internal\KeyManagementOptionsPostSetupTest.cs (2)
168Assert.Throws<InvalidOperationException>(() => repository.StoreElement(xElement, friendlyName: null)); 172Assert.Throws<InvalidOperationException>(() => options.XmlEncryptor.Encrypt(xElement));
KeyManagement\KeyRingProviderTests.cs (3)
183Assert.Throws<InvalidOperationException>(() => keyRingProvider.GetCacheableKeyRing(now)); // The would-be default key is revoked 264var exception = Assert.Throws<InvalidOperationException>(() => keyRingProvider.GetCacheableKeyRing(now));
RegistryPolicyResolverTests.cs (2)
64var ex = ExceptionAssert.Throws<InvalidOperationException>(() => RunTestWithRegValues(registryEntries));
ServiceCollectionTests.cs (2)
102Assert.Throws<InvalidOperationException>(() => repository.StoreElement(xElement, friendlyName: null)); 106Assert.Throws<InvalidOperationException>(() => options.XmlEncryptor.Encrypt(xElement));
Microsoft.AspNetCore.Diagnostics (1)
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
218$"This {nameof(InvalidOperationException)} containing the original exception was thrown since this is often due to a misconfigured {nameof(ExceptionHandlerOptions.ExceptionHandlingPath)}. " +
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Tests (1)
DatabaseDeveloperPageExceptionFilterTests.cs (1)
49var exception = new InvalidOperationException("Bang!", new Mock<DbException>().Object);
Microsoft.AspNetCore.Diagnostics.HealthChecks (1)
HealthCheckOptions.cs (1)
43/// <exception cref="InvalidOperationException">Thrown if at least one <see cref="HealthStatus"/> is missing when setting this property.</exception>
Microsoft.AspNetCore.Diagnostics.HealthChecks.Tests (8)
HealthCheckEndpointRouteBuilderExtensionsTest.cs (2)
38var ex = Assert.Throws<InvalidOperationException>(() => host.Start());
HealthCheckMiddlewareTests.cs (6)
33var ex = Assert.Throws<InvalidOperationException>(() => host.Start()); 936var exception = Assert.Throws<InvalidOperationException>(() => 947var exception = Assert.Throws<InvalidOperationException>(() =>
Microsoft.AspNetCore.Diagnostics.Tests (12)
ExceptionHandlerMiddlewareTest.cs (2)
265await Assert.ThrowsAsync<InvalidOperationException>(() => middleware.Invoke(httpContext)); 441await Assert.ThrowsAsync<InvalidOperationException>(() => middleware.Invoke(httpContext));
ExceptionHandlerTest.cs (10)
84catch (InvalidOperationException ex) 329catch (InvalidOperationException ex) 397catch (InvalidOperationException ex) 526var exception = Assert.Throws<InvalidOperationException>(() => host.Start()); 553catch (InvalidOperationException ex) 715catch (InvalidOperationException ex) 766catch (InvalidOperationException ex) 821catch (InvalidOperationException ex) 872catch (InvalidOperationException ex)
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (14)
HttpRoutePatternParserTests.cs (2)
322var ex = Assert.Throws<InvalidOperationException>(() => HttpRoutePattern.Parse(pattern));
JsonTranscodingServiceMethodProviderTests.cs (12)
97var ex = Assert.Throws<InvalidOperationException>(() => FindGrpcEndpoint(endpoints, nameof(JsonTranscodingGreeterService.NoOption))); 166var ex = Assert.Throws<InvalidOperationException>(() => MapEndpoints<JsonTranscodingInvalidResponseBodyGreeterService>()); 178var ex = Assert.Throws<InvalidOperationException>(() => MapEndpoints<JsonTranscodingInvalidNestedResponseBodyGreeterService>()); 190var ex = Assert.Throws<InvalidOperationException>(() => MapEndpoints<JsonTranscodingInvalidBodyGreeterService>()); 202var ex = Assert.Throws<InvalidOperationException>(() => MapEndpoints<JsonTranscodingInvalidNestedBodyGreeterService>()); 214var ex = Assert.Throws<InvalidOperationException>(() => MapEndpoints<JsonTranscodingInvalidPatternGreeterService>());
Microsoft.AspNetCore.HeaderPropagation.Tests (5)
HeaderPropagationIntegrationTest.cs (5)
68Assert.IsType<InvalidOperationException>(captured); 90var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => client.GetAsync("http://localhost/")); 164var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => host.StartAsync());
Microsoft.AspNetCore.HostFiltering.Tests (1)
HostFilteringMiddlewareTests.cs (1)
34await Assert.ThrowsAsync<InvalidOperationException>(() => host.GetTestServer().SendAsync(_ => { }));
Microsoft.AspNetCore.Hosting.Tests (42)
ConfigureBuilderTests.cs (2)
26var ex = Assert.Throws<InvalidOperationException>(() => action.Invoke(applicationBuilder));
StartupManagerTests.cs (14)
79var exception = Assert.Throws<InvalidOperationException>(() => startup.ConfigureServicesDelegate(serviceCollection)); 367var ex = Assert.Throws<InvalidOperationException>(() => StartupLoader.LoadMethods(services, type, "Boom")); 416var ex = Assert.Throws<InvalidOperationException>(() => StartupLoader.LoadMethods(services, type, "TwoConfigures")); 431var ex = Assert.Throws<InvalidOperationException>(() => StartupLoader.LoadMethods(services, type, "PrivateConfigure")); 445var ex = Assert.Throws<InvalidOperationException>(() => StartupLoader.LoadMethods(services, type, "TwoConfigureServices")); 514Assert.Throws<InvalidOperationException>(() => startup.ConfigureDelegate(app)); 602Assert.Throws<InvalidOperationException>(() => startup.ConfigureServicesDelegate(serviceCollection)); 611Assert.Throws<InvalidOperationException>(() => StartupLoader.LoadMethods(services, typeof(MyContainerStartupBaseClass), Environments.Development)); 621Assert.Throws<InvalidOperationException>(() => StartupLoader.LoadMethods(services, typeof(MyContainerStartupWithOverloads), Environments.Development));
WebHostBuilderTests.cs (20)
77var ex = Assert.Throws<InvalidOperationException>(() => builder.UseServer(server).UseStartup<object>(context => null).Build()); 233Assert.Throws<InvalidOperationException>(() => host.Start()); 261Assert.Throws<InvalidOperationException>(() => host.Start()); 424var exception = Assert.Throws<InvalidOperationException>(() => hostBuilder.Build()); 441Assert.Throws<InvalidOperationException>(() => hostBuilder.Build()); 454var exception = Assert.Throws<InvalidOperationException>(() => hostBuilder.Build()); 714var ex = Assert.Throws<InvalidOperationException>(() => 841var ex = Assert.Throws<InvalidOperationException>(() => builder.Build()); 1251Assert.Throws<InvalidOperationException>(() => host.Start()); 1297var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => 1354var startEx = await Assert.ThrowsAsync<InvalidOperationException>(() => host.StartAsync()); 1379var startEx = await Assert.ThrowsAsync<InvalidOperationException>(() => host.StartAsync());
WebHostTests.cs (6)
27var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => CreateBuilder().Build().StartAsync()); 471await Assert.ThrowsAsync<InvalidOperationException>(() => host.StartAsync()); 691await Assert.ThrowsAsync<InvalidOperationException>(() => host.StartAsync()); 990var ex = Assert.Throws<InvalidOperationException>(() => builder.Build());
Microsoft.AspNetCore.Http.Abstractions (4)
HttpRequest.cs (2)
128/// <exception cref="System.InvalidOperationException"> 143/// <exception cref="System.InvalidOperationException">
ProblemDetails\IProblemDetailsService.cs (1)
24/// <exception cref="InvalidOperationException">If no <see cref="IProblemDetailsWriter"/> can write to the given context.</exception>
Routing\EndpointMetadataCollection.cs (1)
131/// Throws an <see cref="InvalidOperationException"/> if the metadata is not found.
Microsoft.AspNetCore.Http.Abstractions.Tests (25)
EndpointMetadataCollectionTests.cs (1)
90Assert.Throws<InvalidOperationException>(() => metadata.GetRequiredMetadata<string>());
RouteValueDictionaryTests.cs (2)
352var exception = Assert.Throws<InvalidOperationException>(() =>
UseMiddlewareTest.cs (22)
15var exception = Assert.Throws<InvalidOperationException>(() => builder.UseMiddleware(typeof(MiddlewareNoParametersStub))); 29var exception = Assert.Throws<InvalidOperationException>(() => builder.UseMiddleware(typeof(MiddlewareAsyncNoParametersStub))); 43var exception = Assert.Throws<InvalidOperationException>(() => builder.UseMiddleware(typeof(MiddlewareNonTaskReturnStub))); 57var exception = Assert.Throws<InvalidOperationException>(() => builder.UseMiddleware(typeof(MiddlewareAsyncNonTaskReturnStub))); 71var exception = Assert.Throws<InvalidOperationException>(() => builder.UseMiddleware(typeof(MiddlewareNoInvokeStub))); 84var exception = Assert.Throws<InvalidOperationException>(() => builder.UseMiddleware(typeof(MiddlewareMultipleInvokesStub))); 97var exception = Assert.Throws<InvalidOperationException>(() => builder.UseMiddleware(typeof(MiddlewareMultipleInvokeAsyncStub))); 110var exception = Assert.Throws<InvalidOperationException>(() => builder.UseMiddleware(typeof(MiddlewareMultipleInvokeAndInvokeAsyncStub))); 125var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => app(new DefaultHttpContext())); 167var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => 184var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () =>
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionDispatcher.cs (1)
490catch (InvalidOperationException ex)
Microsoft.AspNetCore.Http.Connections.Tests (6)
HttpConnectionManagerTests.cs (6)
134var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await connection.Transport.Input.ReadAsync()); 137exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await connection.Application.Input.ReadAsync()); 325var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await firstTask.DefaultTimeout()); 328exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await secondTask.DefaultTimeout());
Microsoft.AspNetCore.Http.Extensions.Tests (79)
HttpRequestJsonExtensionsTests.cs (6)
42var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await context.Request.ReadFromJsonAsync<int>()); 161var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await context.Request.ReadFromJsonAsync<object>()); 205var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await context.Request.ReadFromJsonAsync(typeof(object)));
ParameterBindingMethodCacheTests.cs (16)
556var ex = Assert.Throws<InvalidOperationException>( 573var ex = Assert.Throws<InvalidOperationException>( 618var ex = Assert.Throws<InvalidOperationException>( 642var ex = Assert.Throws<InvalidOperationException>(() => cache.FindBindAsyncMethod(parameter)); 683var ex = Assert.Throws<InvalidOperationException>(() => cache.FindConstructor(type)); 693var ex = Assert.Throws<InvalidOperationException>(() => cache.FindConstructor(type)); 703var ex = Assert.Throws<InvalidOperationException>(() => cache.FindConstructor(type)); 715var ex = Assert.Throws<InvalidOperationException>(() => cache.FindConstructor(type));
ProblemDetailsServiceCollectionExtensionsTest.cs (1)
125Assert.Throws<InvalidOperationException>(() => jsonOptions.Value);
ProblemDetailsServiceTest.cs (2)
75await Assert.ThrowsAsync<InvalidOperationException>(async () => await service.WriteAsync(new() { HttpContext = context })); 91await Assert.ThrowsAsync<InvalidOperationException>(async () => await service.WriteAsync(new() { HttpContext = context }));
RequestDelegateFactoryTests.cs (35)
290var ex = Assert.Throws<InvalidOperationException>(() => 729var ex = Assert.Throws<InvalidOperationException>(() => RequestDelegateFactory.Create(action)); 738var ex = Assert.Throws<InvalidOperationException>(() => RequestDelegateFactory.Create(lambda.Compile())); 932Assert.Throws<InvalidOperationException>(() => RequestDelegateFactory.Create(TestAttributedInvalidAction)); 933Assert.Throws<InvalidOperationException>(() => RequestDelegateFactory.Create(TestInferredInvalidAction)); 934Assert.Throws<InvalidOperationException>(() => RequestDelegateFactory.Create(TestBothInvalidAction)); 943Assert.Throws<InvalidOperationException>(() => RequestDelegateFactory.Create(TestTryParseStruct)); 944Assert.Throws<InvalidOperationException>(() => RequestDelegateFactory.Create(TestTryParseClass)); 966var ex = Assert.Throws<InvalidOperationException>(() => RequestDelegateFactory.Create(TestBindAsyncStruct)); 967Assert.Throws<InvalidOperationException>(() => RequestDelegateFactory.Create(TestBindAsyncClass)); 1021var exception = Assert.Throws<InvalidOperationException>(() => RequestDelegateFactory.Create(@delegate)); 1162var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => requestDelegateResult.RequestDelegate(httpContext)); 1520var exception = await Assert.ThrowsAnyAsync<InvalidOperationException>(async () => await requestDelegate(httpContext)); 1758await Assert.ThrowsAsync<InvalidOperationException>(() => requestDelegate(httpContext)); 2003Assert.Throws<InvalidOperationException>(() => RequestDelegateFactory.Create(TestFormFileAndJson)); 2004Assert.Throws<InvalidOperationException>(() => RequestDelegateFactory.Create(TestFormFilesAndJson)); 2005Assert.Throws<InvalidOperationException>(() => RequestDelegateFactory.Create(TestFormFileAndJsonWithAttribute)); 2006Assert.Throws<InvalidOperationException>(() => RequestDelegateFactory.Create(TestFormFileCollectionAndJson)); 2007Assert.Throws<InvalidOperationException>(() => RequestDelegateFactory.Create(TestFormCollectionAndJson)); 2008Assert.Throws<InvalidOperationException>(() => RequestDelegateFactory.Create(TestFormWithAttributeAndJson)); 2009Assert.Throws<InvalidOperationException>(() => RequestDelegateFactory.Create(TestJsonAndFormFile)); 2010Assert.Throws<InvalidOperationException>(() => RequestDelegateFactory.Create(TestJsonAndFormFiles)); 2011Assert.Throws<InvalidOperationException>(() => RequestDelegateFactory.Create(TestJsonAndFormFileCollection)); 2012Assert.Throws<InvalidOperationException>(() => RequestDelegateFactory.Create(TestJsonAndFormFileWithAttribute)); 2013Assert.Throws<InvalidOperationException>(() => RequestDelegateFactory.Create(TestJsonAndFormCollection)); 2014Assert.Throws<InvalidOperationException>(() => RequestDelegateFactory.Create(TestJsonAndFormWithAttribute)); 2113var exception = Assert.Throws<InvalidOperationException>(() => RequestDelegateFactory.Create(action));
RequestDelegateGenerator\CompileTimeCreationTests.cs (6)
44var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => endpoint.RequestDelegate(httpContext)); 426var exception = Assert.Throws<InvalidOperationException>(() => GetEndpointFromCompilation(compilation, serviceProvider: serviceProvider)); 456var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await endpoint.RequestDelegate(httpContext));
RequestDelegateGenerator\RequestDelegateCreationTests.BindAsync.cs (2)
197var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => endpoint.RequestDelegate(httpContext));
RequestDelegateGenerator\RequestDelegateCreationTests.cs (2)
283await Assert.ThrowsAsync<InvalidOperationException>(() => endpoint.RequestDelegate(httpContext)); 314await Assert.ThrowsAsync<InvalidOperationException>(() => endpoints[0].RequestDelegate(httpContext));
RequestDelegateGenerator\RequestDelegateCreationTests.KeyServices.cs (6)
125var exception = await Assert.ThrowsAsync<InvalidOperationException>( 216var runtimeException = Assert.Throws<InvalidOperationException>(() => GetEndpointFromCompilation(compilation, serviceProvider: serviceProvider)); 223var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await endpoint.RequestDelegate(httpContext));
RequestDelegateGenerator\RuntimeCreationTests.cs (2)
26var ex = Assert.Throws<InvalidOperationException>(() => GetEndpointFromCompilation(compilation));
ResponseExtensionTests.cs (1)
31Assert.Throws<InvalidOperationException>(() => context.Response.Clear());
Microsoft.AspNetCore.Http.Features (3)
IFormCollection.cs (2)
80/// <exception cref="System.InvalidOperationException"> 91/// <see cref="System.InvalidOperationException" /> is thrown.
IHttpRequestTrailersFeature.cs (1)
18/// The trailing headers received. This will throw <see cref="InvalidOperationException"/> if <see cref="Available"/>
Microsoft.AspNetCore.Http.Results.Tests (21)
AcceptedAtRouteOfTResultTests.cs (1)
117await ExceptionAssert.ThrowsAsync<InvalidOperationException>(() =>
AcceptedAtRouteResultTests.cs (1)
70await ExceptionAssert.ThrowsAsync<InvalidOperationException>(() =>
CreatedAtRouteOfTResultTests.cs (1)
86await ExceptionAssert.ThrowsAsync<InvalidOperationException>(
CreatedAtRouteResultTests.cs (1)
68await ExceptionAssert.ThrowsAsync<InvalidOperationException>(
LocalRedirectResultTests.cs (4)
92var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => result.ExecuteAsync(httpContext)); 113var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => result.ExecuteAsync(httpContext));
RedirectToRouteResultTests.cs (1)
24await ExceptionAssert.ThrowsAsync<InvalidOperationException>(
ResultsOfTHelperTests.cs (1)
75Assert.Throws<InvalidOperationException>(() => GetMetadata<DefaultInterfaceMethodEndpointMetadataProvider>());
ResultsOfTTests.Generated.cs (5)
94Assert.ThrowsAsync<InvalidOperationException>(async () => 309Assert.ThrowsAsync<InvalidOperationException>(async () => 593Assert.ThrowsAsync<InvalidOperationException>(async () => 954Assert.ThrowsAsync<InvalidOperationException>(async () => 1400Assert.ThrowsAsync<InvalidOperationException>(async () =>
ResultsTests.cs (4)
1051var ex = Assert.Throws<InvalidOperationException>(() => Results.Json(null, type: typeof(Todo), context: StringJsonContext.Default)); 1058var ex = Assert.Throws<InvalidOperationException>(() => Results.Json<Todo>(null, context: StringJsonContext.Default));
TypedResultsTests.cs (2)
905var ex = Assert.Throws<InvalidOperationException>(() => TypedResults.Json(string.Empty, context: ObjectJsonContext.Default));
Microsoft.AspNetCore.Http.Tests (13)
ApplicationBuilderTests.cs (2)
69var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => app.Invoke(httpContext));
DefaultHttpContextTests.cs (2)
23var exception = Assert.Throws<InvalidOperationException>(() => context.Session);
HeaderDictionaryTests.cs (8)
93Assert.Throws<InvalidOperationException>(() => headers["header1"] = "value1"); 94Assert.Throws<InvalidOperationException>(() => ((IDictionary<string, StringValues>)headers)["header1"] = "value1"); 95Assert.Throws<InvalidOperationException>(() => headers.ContentLength = 12); 96Assert.Throws<InvalidOperationException>(() => headers.Add(new KeyValuePair<string, StringValues>("header1", "value1"))); 97Assert.Throws<InvalidOperationException>(() => headers.Add("header1", "value1")); 98Assert.Throws<InvalidOperationException>(() => headers.Clear()); 99Assert.Throws<InvalidOperationException>(() => headers.Remove(new KeyValuePair<string, StringValues>("header1", "value1"))); 100Assert.Throws<InvalidOperationException>(() => headers.Remove("header1"));
Timeouts\RequestTimeoutsMiddlewareTests.cs (1)
183await Assert.ThrowsAsync<InvalidOperationException>(() => middleware.Invoke(context));
Microsoft.AspNetCore.HttpLogging (3)
FileLoggerProcessor.cs (1)
115catch (InvalidOperationException) { }
HttpLoggingAttribute.cs (2)
38/// <exception cref="InvalidOperationException">Thrown when getting <see cref="RequestBodyLogLimit"/> if it hasn't been set to a value. Check <see cref="IsRequestBodyLogLimitSet"/> first.</exception> 67/// <exception cref="InvalidOperationException">Thrown when getting <see cref="ResponseBodyLogLimit"/> if it hasn't been set to a value. Check <see cref="IsResponseBodyLogLimitSet"/> first.</exception>
Microsoft.AspNetCore.HttpLogging.Tests (6)
HttpLoggingAttributeTests.cs (2)
23Assert.Throws<InvalidOperationException>(() => attribute.RequestBodyLogLimit); 24Assert.Throws<InvalidOperationException>(() => attribute.ResponseBodyLogLimit);
HttpLoggingServicesExtensionsTests.cs (4)
33var ex = Assert.Throws<InvalidOperationException>(() => appBuilder.UseHttpLogging()); 45var ex = Assert.Throws<InvalidOperationException>(() => appBuilder.UseW3CLogging());
Microsoft.AspNetCore.HttpsPolicy.Tests (2)
HttpsRedirectionMiddlewareTests.cs (2)
312var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => client.SendAsync(request));
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (10)
SqlStoreTestBase.cs (1)
318await Assert.ThrowsAsync<InvalidOperationException>(async () => await manager.GetSecurityStampAsync(user));
UserOnlyTest.cs (1)
79await Assert.ThrowsAsync<InvalidOperationException>(async () => await manager.FindByEmailAsync("dupe@dupe.com"));
UserStoreEncryptPersonalDataTest.cs (2)
290var e = Assert.Throws<InvalidOperationException>(() => dbContext.Database.EnsureCreated());
UserStoreTest.cs (2)
194await Assert.ThrowsAsync<InvalidOperationException>(async () => await manager.FindByEmailAsync("dupe@dupe.com")); 204await Assert.ThrowsAsync<InvalidOperationException>(
UserStoreWithGenericsTest.cs (4)
83var e = Assert.Throws<InvalidOperationException>(() => builder.AddEntityFrameworkStores<ContextWithGenerics>()); 92var e = Assert.Throws<InvalidOperationException>(() => builder.AddEntityFrameworkStores<ContextWithGenerics>());
Microsoft.AspNetCore.Identity.FunctionalTests (1)
MapIdentityApiTests.cs (1)
235await Assert.ThrowsAsync<InvalidOperationException>(()
Microsoft.AspNetCore.Identity.Test (20)
IdentityBuilderTest.cs (6)
50Assert.Throws<InvalidOperationException>(() => sp.GetService<RoleManager<PocoRole>>()); 256Assert.Throws<InvalidOperationException>(() => builder.AddUserManager<object>()); 257Assert.Throws<InvalidOperationException>(() => builder.AddRoleManager<object>()); 258Assert.Throws<InvalidOperationException>(() => builder.AddSignInManager<object>()); 267Assert.Throws<InvalidOperationException>(() => builder.AddTokenProvider<object>("whatevs")); 268Assert.Throws<InvalidOperationException>(() => builder.AddTokenProvider("whatevs", typeof(object)));
PasswordHasherTest.cs (4)
29var ex = Assert.Throws<InvalidOperationException>(() => 42var ex = Assert.Throws<InvalidOperationException>(() =>
SecurityStampValidatorTest.cs (2)
65var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => SecurityStampValidator.ValidatePrincipalAsync(context));
UserManagerTest.cs (8)
606var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => manager.CreateAsync(user)); 623var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => manager.UpdateAsync(user)); 811var e = Assert.Throws<InvalidOperationException>(() => services.BuildServiceProvider().GetService<UserManager<PocoUser>>()); 822var e = Assert.Throws<InvalidOperationException>(() => services.BuildServiceProvider().GetService<UserManager<PocoUser>>());
Microsoft.AspNetCore.JsonPatch.Tests (2)
JsonPatchDocumentGetPathTest.cs (2)
97var exception = Assert.Throws<InvalidOperationException>(() =>
Microsoft.AspNetCore.Mvc.Abstractions.Test (14)
ModelBinding\ModelStateDictionaryTest.cs (14)
193var exception = Assert.Throws<InvalidOperationException>(() => source.MarkFieldSkipped("key")); 252var exception = Assert.Throws<InvalidOperationException>(() => source.MarkFieldValid("key")); 1652var invalidException = Assert.Throws<InvalidOperationException>(() => dictionary.TryAddModelException(key, exception)); 1670var invalidException = Assert.Throws<InvalidOperationException>(() => dictionary.TryAddModelError(key, "errorMessage")); 1687var invalidException = Assert.Throws<InvalidOperationException>(() => dictionary.SetModelValue(key, string.Empty, string.Empty)); 1705var exception = Assert.Throws<InvalidOperationException>(() => source.MarkFieldValid(key)); 1723var exception = Assert.Throws<InvalidOperationException>(() => source.MarkFieldSkipped(key));
Microsoft.AspNetCore.Mvc.Core (6)
ApplicationModels\ApplicationModelFactory.cs (1)
160catch (InvalidOperationException ex)
ModelBinding\Metadata\ModelAttributes.cs (1)
233catch (InvalidOperationException e)
MvcOptions.cs (4)
289/// binding system will throw an <see cref="InvalidOperationException"/>. 298/// This limit does not <em>correct</em> the bound model. The <see cref="InvalidOperationException"/> instead 326/// <see cref="DefaultModelBindingContext"/> will throw an <see cref="InvalidOperationException"/> if more than 338/// This limit does not <em>correct</em> the bound model. The <see cref="InvalidOperationException"/> instead
Microsoft.AspNetCore.Mvc.Core.Test (145)
AcceptedAtActionResultTests.cs (1)
192await ExceptionAssert.ThrowsAsync<InvalidOperationException>(() =>
AcceptedAtRouteResultTests.cs (1)
140await ExceptionAssert.ThrowsAsync<InvalidOperationException>(() =>
ApplicationModels\ApiBehaviorApplicationModelProviderTest.cs (2)
36var ex = Assert.Throws<InvalidOperationException>(() => provider.OnProvidersExecuting(context));
ApplicationModels\AttributeRouteModelTests.cs (4)
170var ex = Assert.Throws<InvalidOperationException>( 197var ex = Assert.Throws<InvalidOperationException>(
ApplicationModels\ControllerActionDescriptorProviderTests.cs (12)
437var ex = Assert.Throws<InvalidOperationException>(() => { provider.GetDescriptors(); }); 681var exception = Assert.Throws<InvalidOperationException>(() => provider.GetDescriptors()); 725var exception = Assert.Throws<InvalidOperationException>(() => provider.GetDescriptors()); 761var ex = Assert.Throws<InvalidOperationException>(() => { provider.GetDescriptors(); }); 882var ex = Assert.Throws<InvalidOperationException>(() => { provider.GetDescriptors(); }); 1102var ex = Assert.Throws<InvalidOperationException>(() => provider.GetDescriptors());
ApplicationModels\InferParameterBindingInfoConventionTest.cs (6)
67var ex = Assert.Throws<InvalidOperationException>(() => convention.InferParameterBindingSources(action)); 86var ex = Assert.Throws<InvalidOperationException>(() => convention.InferParameterBindingSources(action)); 105var ex = Assert.Throws<InvalidOperationException>(() => convention.InferParameterBindingSources(action));
ApplicationParts\RelatedAssemblyPartTest.cs (2)
36var ex = Assert.Throws<InvalidOperationException>(() => RelatedAssemblyAttribute.GetRelatedAssemblies(assembly, throwOnError: true));
Authorization\AuthorizeFilterTest.cs (4)
63var ex = await Assert.ThrowsAsync<InvalidOperationException>( 79var ex = await Assert.ThrowsAsync<InvalidOperationException>(
Builder\MvcApplicationBuilderExtensionsTest.cs (4)
24var exception = Assert.Throws<InvalidOperationException>( 71var ex = Assert.Throws<InvalidOperationException>(() =>
ConsumesAttributeTests.cs (2)
65var ex = Assert.Throws<InvalidOperationException>(
Controllers\DefaultControllerFactoryTest.cs (2)
179var exception = Assert.Throws<InvalidOperationException>(() => factory.CreateController(context));
Controllers\ServiceBasedControllerActivatorTest.cs (2)
66var ex = Assert.Throws<InvalidOperationException>(
CreatedAtActionResultTests.cs (1)
61await ExceptionAssert.ThrowsAsync<InvalidOperationException>(
CreatedAtRouteResultTests.cs (1)
74await ExceptionAssert.ThrowsAsync<InvalidOperationException>(
FileResultHelperTest.cs (1)
130await Assert.ThrowsAsync<InvalidOperationException>(() => result.ExecuteResultAsync(actionContext));
Filters\MiddlewareFilterBuilderTest.cs (6)
100var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => pipeline(httpContext)); 214var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => pipeline(httpContext)); 282var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => pipeline(httpContext));
Filters\MiddlewareFilterConfigurationProviderTest.cs (6)
24var exception = Assert.Throws<InvalidOperationException>(() => MiddlewareFilterConfigurationProvider.CreateConfigureDelegate(configurationType)); 70var exception = Assert.Throws<InvalidOperationException>(() => 86var exception = Assert.Throws<InvalidOperationException>(() =>
Filters\MiddlewareFilterTest.cs (4)
158var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await invoker.InvokeAsync()); 207var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await invoker.InvokeAsync());
Filters\ResponseCacheFilterExecutorTest.cs (4)
59var ex = Assert.Throws<InvalidOperationException>(() => executor.Execute(context)); 428var exception = Assert.Throws<InvalidOperationException>(() => executor.Execute(context));
Formatters\InputFormatterTest.cs (2)
393Assert.Throws<InvalidOperationException>(() => formatter.CanRead(context)); 403Assert.Throws<InvalidOperationException>(
Formatters\OutputFormatterTests.cs (2)
216Assert.Throws<InvalidOperationException>(() => formatter.CanWriteResult(context)); 227Assert.Throws<InvalidOperationException>(
Formatters\SystemTextJsonOutputFormatterTest.cs (2)
265var exception = Assert.Throws<InvalidOperationException>(() => SystemTextJsonOutputFormatter.CreateFormatter(jsonOptions));
Formatters\TextInputFormatterTest.cs (1)
57Assert.Throws<InvalidOperationException>(() => formatter.TestSelectCharacterEncoding(context));
Infrastructure\ActionMethodExecutorTest.cs (1)
434var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => Execute(actionMethodExecutor, filterContext, withFilter).AsTask());
Infrastructure\AsyncEnumerableReaderTest.cs (2)
183var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => reader(enumerable, default));
Infrastructure\ControllerActionInvokerTest.cs (3)
520await ExceptionAssert.ThrowsAsync<InvalidOperationException>( 1374await ExceptionAssert.ThrowsAsync<InvalidOperationException>( 1539var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => invoker.InvokeAsync());
Infrastructure\JsonResultExecutorTestBase.cs (2)
303var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => executor.ExecuteAsync(context, result));
Infrastructure\ObjectResultExecutorTest.cs (4)
318var exception = await Assert.ThrowsAsync<InvalidOperationException>( 350var exception = await Assert.ThrowsAsync<InvalidOperationException>(
LocalRedirectResultTest.cs (4)
99var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => result.ExecuteResultAsync(actionContext)); 121var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => result.ExecuteResultAsync(actionContext));
ModelBinding\Binders\BodyModelBinderProviderTest.cs (2)
52var exception = Assert.Throws<InvalidOperationException>(() => provider.GetBinder(context));
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (8)
539var exception = Assert.Throws<InvalidOperationException>(() => binder.CreateModelPublic(bindingContext)); 564var exception = Assert.Throws<InvalidOperationException>(() => binder.CreateModelPublic(bindingContext)); 581var exception = Assert.Throws<InvalidOperationException>(() => binder.CreateModelPublic(bindingContext)); 1017var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await binder.BindModelAsync(bindingContext));
ModelBinding\Binders\FormCollectionModelBinderProviderTest.cs (2)
20var exception = Assert.Throws<InvalidOperationException>(() => provider.GetBinder(context));
ModelBinding\Binders\TryParseTypeModelBinderTest.cs (1)
488Assert.Throws<InvalidOperationException>(() => new TryParseModelBinder(typeof(TestClass), NullLoggerFactory.Instance));
ModelBinding\Metadata\ModelAttributesTest.cs (2)
298var exception = Assert.Throws<InvalidOperationException>(() => ModelAttributes.GetAttributesForProperty(modelType, property));
ModelBinding\ModelBinderFactoryTest.cs (4)
34var exception = Assert.Throws<InvalidOperationException>(() => factory.CreateBinder(context)); 56var exception = Assert.Throws<InvalidOperationException>(() => factory.CreateBinder(context));
ModelBinding\ModelBindingHelperTest.cs (14)
355var ex = Assert.Throws<InvalidOperationException>(() => 396var ex = Assert.Throws<InvalidOperationException>(() => 415var ex = Assert.Throws<InvalidOperationException>(() => 431var ex = Assert.Throws<InvalidOperationException>(() => 447var ex = Assert.Throws<InvalidOperationException>(() => 1249var ex = Assert.Throws<InvalidOperationException>( 1265var ex = Assert.Throws<InvalidOperationException>(
ModelBinding\Validation\DefaultComplexObjectValidationStrategyTest.cs (2)
182var exception = Assert.Throws<InvalidOperationException>(() => BufferEntries(enumerator));
ModelBinding\Validation\DefaultObjectValidatorTests.cs (2)
1279var ex = Assert.Throws<InvalidOperationException>(() => validator.Validate(actionContext, validationState, prefix: string.Empty, model));
ProducesAttributeTests.cs (2)
122var ex = Assert.Throws<InvalidOperationException>(
ProducesResponseTypeAttributeTests.cs (2)
41var ex = Assert.Throws<InvalidOperationException>(
RedirectToActionResultTest.cs (1)
75await ExceptionAssert.ThrowsAsync<InvalidOperationException>(
RedirectToPageResultTest.cs (1)
37await ExceptionAssert.ThrowsAsync<InvalidOperationException>(
RedirectToRouteResultTest.cs (1)
75await ExceptionAssert.ThrowsAsync<InvalidOperationException>(
ResponseCacheAttributeTest.cs (4)
54var ex = Assert.Throws<InvalidOperationException>( 314var exception = Assert.Throws<InvalidOperationException>(() =>
Routing\ActionEndpointFactoryTest.cs (2)
213var exception = Assert.Throws<InvalidOperationException>(() => CreateAttributeRoutedEndpoint(action));
Routing\DynamicControllerEndpointMatcherPolicyTest.cs (1)
233await Assert.ThrowsAsync<InvalidOperationException>(() => policy.ApplyAsync(httpContext, candidates));
Routing\KnownRouteValueConstraintTests.cs (2)
191var ex = Assert.Throws<InvalidOperationException>(
Routing\UrlHelperExtensionsTest.cs (2)
549var ex = Assert.Throws<InvalidOperationException>(() => urlHelper.Object.Page(expected));
Routing\UrlHelperTestBase.cs (2)
1088var ex = Assert.Throws<InvalidOperationException>(() => urlHelper.ActionLink("contact", "home"));
Microsoft.AspNetCore.Mvc.Core.TestCommon (3)
CommonResourceInvokerTest.cs (3)
947await ExceptionAssert.ThrowsAsync<InvalidOperationException>( 1693var exception = await Assert.ThrowsAsync<InvalidOperationException>(invoker.InvokeAsync);
Microsoft.AspNetCore.Mvc.Formatters.Xml (2)
XmlSerializerInputFormatter.cs (2)
145catch (InvalidOperationException exception) when (exception.InnerException != null && 154catch (InvalidOperationException exception) when (exception.InnerException is FormatException ||
Microsoft.AspNetCore.Mvc.FunctionalTests (10)
AntiforgeryMiddlewareTest.cs (4)
63var exception = Assert.Throws<InvalidOperationException>(() => app.MapControllers()); 134var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await client.SendAsync(request));
ApplicationModelTest.cs (2)
151var ex = await Assert.ThrowsAsync<InvalidOperationException>(
SimpleWithWebApplicationBuilderExceptionTests.cs (2)
18var ex = Assert.Throws<InvalidOperationException>(() => _fixture.CreateClient());
TestingInfrastructureTests.cs (2)
47var ex = Assert.Throws<InvalidOperationException>(() => factory.CreateClient());
Microsoft.AspNetCore.Mvc.IntegrationTests (42)
ActionParametersIntegrationTest.cs (12)
404var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => parameterBinder.BindModelAsync(parameter, testContext)); 471var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => parameterBinder.BindModelAsync(parameter, testContext)); 495var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => parameterBinder.BindModelAsync(parameter, testContext)); 518var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => parameterBinder.BindModelAsync(parameter, testContext)); 557var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => parameterBinder.BindModelAsync(parameter, testContext)); 590var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => parameterBinder.BindModelAsync(parameter, testContext));
ArrayModelBinderIntegrationTest.cs (2)
399var exception = await Assert.ThrowsAsync<InvalidOperationException>(
CollectionModelBinderIntegrationTest.cs (6)
996var exception = await Assert.ThrowsAsync<InvalidOperationException>( 1082var exception = await Assert.ThrowsAsync<InvalidOperationException>( 1120var exception = await Assert.ThrowsAsync<InvalidOperationException>(
ComplexRecordIntegrationTest.cs (6)
3324var exception = await Assert.ThrowsAsync<InvalidOperationException>( 3394var exception = await Assert.ThrowsAsync<InvalidOperationException>( 3428var exception = await Assert.ThrowsAsync<InvalidOperationException>(
ComplexTypeIntegrationTestBase.cs (6)
3559var exception = await Assert.ThrowsAsync<InvalidOperationException>( 3645var exception = await Assert.ThrowsAsync<InvalidOperationException>( 3697var exception = await Assert.ThrowsAsync<InvalidOperationException>(
DictionaryModelBinderIntegrationTest.cs (2)
1225var exception = await Assert.ThrowsAsync<InvalidOperationException>(
ServicesModelBinderIntegrationTest.cs (2)
179var exception = await Assert.ThrowsAsync<InvalidOperationException>(
ValidationWithRecordIntegrationTests.cs (6)
2326var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => 2365var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => 2406var ex = await Assert.ThrowsAsync<InvalidOperationException>(() =>
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (12)
BsonTempDataSerializerTest.cs (4)
32var exception = Assert.Throws<InvalidOperationException>(() => 60var exception = Assert.Throws<InvalidOperationException>(() =>
DependencyInjection\MvcNewtonsoftJsonOptionsExtensionsTest.cs (4)
221var exception = Assert.Throws<InvalidOperationException>( 235var exception = Assert.Throws<InvalidOperationException>(
src\Mvc\Mvc.Core\test\Infrastructure\AsyncEnumerableReaderTest.cs (2)
183var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => reader(enumerable, default));
src\Mvc\Mvc.Core\test\Infrastructure\JsonResultExecutorTestBase.cs (2)
303var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => executor.ExecuteAsync(context, result));
Microsoft.AspNetCore.Mvc.Razor (2)
IRazorPage.cs (1)
64/// <exception cref="System.InvalidOperationException">if one or more sections were not rendered or if no sections were
RazorPage.cs (1)
143/// <exception cref="InvalidOperationException">if <paramref name="required"/> is <c>true</c> and the section
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (2)
RuntimeCompilationFileProviderTest.cs (2)
24var exception = Assert.Throws<InvalidOperationException>(
Microsoft.AspNetCore.Mvc.Razor.Test (52)
ApplicationParts\RazorCompiledItemFeatureProviderTest.cs (2)
107var ex = Assert.Throws<InvalidOperationException>(() => featureProvider.PopulateFeature(new[] { part1, part2.Object }, feature));
RazorPageTest.cs (26)
130var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => page.ExecuteAsync()); 183var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => page.ExecuteAsync()); 262var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => page.ExecuteAsync()); 410var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => page.ExecuteAsync()); 444ex = Assert.Throws<InvalidOperationException>(() => v.RenderSection("bar")); 470var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => page.ExecuteAsync()); 508ExceptionAssert.Throws<InvalidOperationException>(() => page.IsSectionDefined("foo"), 578var ex = await Assert.ThrowsAsync<InvalidOperationException>(page.ExecuteAsync); 602var ex = await Assert.ThrowsAsync<InvalidOperationException>(page.ExecuteAsync); 626var ex = await Assert.ThrowsAsync<InvalidOperationException>(page.ExecuteAsync); 645var ex = await Assert.ThrowsAsync<InvalidOperationException>(page.ExecuteAsync); 665var ex = Assert.Throws<InvalidOperationException>(() => page.EnsureRenderedBodyOrSections()); 704var ex = Assert.Throws<InvalidOperationException>(() => page.EnsureRenderedBodyOrSections()); 896var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => page.ExecuteAsync());
RazorViewTest.cs (22)
549var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => view.RenderAsync(viewContext)); 592var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => view.RenderAsync(viewContext)); 637var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => view.RenderAsync(viewContext)); 746var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => view.RenderAsync(viewContext)); 945var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => view.RenderAsync(viewContext)); 1014var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => view.RenderAsync(viewContext)); 1049var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => view.RenderAsync(viewContext)); 1232var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => view.RenderAsync(viewContext)); 1286var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => view.RenderAsync(viewContext)); 1500var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => view.RenderAsync(viewContext)); 1547var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => view.RenderAsync(viewContext));
TagHelpers\UrlResolutionTagHelperTest.cs (2)
346var exception = Assert.Throws<InvalidOperationException>(
Microsoft.AspNetCore.Mvc.RazorPages.Test (26)
ApplicationModels\CompiledPageActionDescriptorBuilderTest.cs (2)
134var actual = Assert.Throws<InvalidOperationException>(() =>
ApplicationModels\DefaultPageApplicationModelProviderTest.cs (8)
27var ex = Assert.Throws<InvalidOperationException>(() => provider.OnProvidersExecuting(context)); 68var ex = Assert.Throws<InvalidOperationException>(() => provider.OnProvidersExecuting(context)); 91var ex = Assert.Throws<InvalidOperationException>(() => provider.OnProvidersExecuting(context)); 116var ex = Assert.Throws<InvalidOperationException>(() => provider.OnProvidersExecuting(context));
ApplicationModels\TempDataFilterPageApplicationModelProviderTest.cs (4)
40var ex = Assert.Throws<InvalidOperationException>(() => provider.OnProvidersExecuting(context)); 57var ex = Assert.Throws<InvalidOperationException>(() => provider.OnProvidersExecuting(context));
Infrastructure\DefaultPageFactoryProviderTest.cs (2)
35var ex = Assert.Throws<InvalidOperationException>(() => factoryProvider.CreatePageFactory(descriptor));
Infrastructure\DefaultPageHandlerMethodSelectorTest.cs (4)
661var ex = Assert.Throws<InvalidOperationException>(() => selector.Select(pageContext)); 721var ex = Assert.Throws<InvalidOperationException>(() => selector.Select(pageContext));
Infrastructure\DynamicPageEndpointMatcherPolicyTest.cs (1)
294await Assert.ThrowsAsync<InvalidOperationException>(() => policy.ApplyAsync(httpContext, candidates));
Infrastructure\ExecutorFactoryTest.cs (2)
178var ex = Assert.Throws<InvalidOperationException>(() => ExecutorFactory.CreateExecutor(handler));
Infrastructure\PageActionInvokerTest.cs (1)
1041await ExceptionAssert.ThrowsAsync<InvalidOperationException>(
Infrastructure\ServiceBasedPageModelActivatorProviderTest.cs (2)
115var ex = Assert.Throws<InvalidOperationException>(
Microsoft.AspNetCore.Mvc.TagHelpers (3)
FormActionTagHelper.cs (1)
172/// <exception cref="InvalidOperationException">
FormTagHelper.cs (1)
144/// <exception cref="InvalidOperationException">
InputTagHelper.cs (1)
148/// <exception cref="InvalidOperationException">
Microsoft.AspNetCore.Mvc.TagHelpers.Test (41)
AnchorTagHelperTest.cs (8)
524var ex = await Assert.ThrowsAsync<InvalidOperationException>( 564var ex = await Assert.ThrowsAsync<InvalidOperationException>( 602var ex = await Assert.ThrowsAsync<InvalidOperationException>( 640var ex = await Assert.ThrowsAsync<InvalidOperationException>(
ComponentTagHelperTest.cs (2)
57var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => tagHelper.ProcessAsync(context, output));
FormActionTagHelperTest.cs (10)
547var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => tagHelper.ProcessAsync(context, output)); 587var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => tagHelper.ProcessAsync(context, output)); 625var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => tagHelper.ProcessAsync(context, output)); 663var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => tagHelper.ProcessAsync(context, output)); 701var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => tagHelper.ProcessAsync(context, output));
FormTagHelperTest.cs (8)
1044var ex = await Assert.ThrowsAsync<InvalidOperationException>( 1080var ex = await Assert.ThrowsAsync<InvalidOperationException>( 1114var ex = await Assert.ThrowsAsync<InvalidOperationException>( 1148var ex = await Assert.ThrowsAsync<InvalidOperationException>(
InputTagHelperTest.cs (4)
149var ex = Assert.Throws<InvalidOperationException>(() => tagHelper.Process(context, output)); 196var ex = Assert.Throws<InvalidOperationException>(() => tagHelper.Process(context, output));
PartialTagHelperTest.cs (8)
122var exception = Assert.Throws<InvalidOperationException>(() => tagHelper.ResolveModel()); 144var exception = Assert.Throws<InvalidOperationException>(() => tagHelper.ResolveModel()); 600var exception = await Assert.ThrowsAsync<InvalidOperationException>( 743var exception = await Assert.ThrowsAsync<InvalidOperationException>(
PersistComponentStateTagHelperTest.cs (1)
235await Assert.ThrowsAsync<InvalidOperationException>(() => tagHelper.ProcessAsync(context, output));
Microsoft.AspNetCore.Mvc.ViewFeatures (3)
ExpressionHelper.cs (1)
222catch (InvalidOperationException ex)
ViewEngines\ViewEngineResult.cs (2)
83/// Additional <see cref="SearchedLocations"/> to include in the thrown <see cref="InvalidOperationException"/> 86/// <exception cref="InvalidOperationException">
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (115)
AttributeDictionaryTest.cs (1)
59Assert.Throws<InvalidOperationException>(() => attributes.Add("one", "15"));
DefaultHtmlGeneratorTest.cs (2)
525var exception = Assert.Throws<InvalidOperationException>(() => htmlGenerator.GetCurrentValues(
Filters\AntiforgeryApplicationModelProviderTest.cs (2)
136var exception = Assert.Throws<InvalidOperationException>(() => provider.OnProvidersExecuting(context));
Filters\TempDataApplicationModelProviderTest.cs (4)
42var ex = Assert.Throws<InvalidOperationException>(() => provider.OnProvidersExecuting(context)); 59var ex = Assert.Throws<InvalidOperationException>(() => provider.OnProvidersExecuting(context));
Infrastructure\DefaultTempDataSerializerTest.cs (2)
51var ex = Assert.Throws<InvalidOperationException>(() => testProvider.Serialize(input));
PageRemoteAttributeTest.cs (1)
89ExceptionAssert.Throws<InvalidOperationException>(
PartialViewResultTest.cs (8)
54var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => viewResult.ExecuteResultAsync(actionContext)); 92var ex = await Assert.ThrowsAsync<InvalidOperationException>( 130var ex = await Assert.ThrowsAsync<InvalidOperationException>( 170var ex = await Assert.ThrowsAsync<InvalidOperationException>(
RemoteAttributeTest.cs (2)
149var exception = Assert.Throws<InvalidOperationException>(() => testableAttribute.InvokeGetUrl(context));
Rendering\HtmlHelperDisplayNameExtensionsTest.cs (4)
166var exception = Assert.Throws<InvalidOperationException>( 181var exception = Assert.Throws<InvalidOperationException>(
Rendering\HtmlHelperLabelExtensionsTest.cs (2)
429var exception = Assert.Throws<InvalidOperationException>(
Rendering\HtmlHelperNameExtensionsTest.cs (2)
335ExceptionAssert.Throws<InvalidOperationException>(() => helper.IdFor(m => collection[m]), message); 336ExceptionAssert.Throws<InvalidOperationException>(() => helper.NameFor(m => collection[m]), message);
Rendering\HtmlHelperPartialExtensionsTest.cs (18)
72var expected = new InvalidOperationException(); 85var actual = Assert.Throws<InvalidOperationException>(() => partialMethod(helper.Object)); 163var expected = new InvalidOperationException(); 176var actual = Assert.Throws<InvalidOperationException>(() => partialMethod(helper.Object)); 420var exception = await Assert.ThrowsAsync<InvalidOperationException>( 449var exception = await Assert.ThrowsAsync<InvalidOperationException>( 480var exception = await Assert.ThrowsAsync<InvalidOperationException>( 509var exception = await Assert.ThrowsAsync<InvalidOperationException>( 538var exception = await Assert.ThrowsAsync<InvalidOperationException>( 569var exception = await Assert.ThrowsAsync<InvalidOperationException>(
SessionStateTempDataProviderTest.cs (2)
26Assert.Throws<InvalidOperationException>(() => 39Assert.Throws<InvalidOperationException>(() =>
ViewComponentResultTest.cs (8)
63var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => viewResult.ExecuteResultAsync(actionContext)); 114var exception = await Assert.ThrowsAsync<InvalidOperationException>( 137var exception = await Assert.ThrowsAsync<InvalidOperationException>( 162var exception = await Assert.ThrowsAsync<InvalidOperationException>(
ViewComponents\DefaultViewComponentDescriptorProviderTest.cs (10)
22var ex = Assert.Throws<InvalidOperationException>(() => provider.GetViewComponents().ToArray()); 38var ex = Assert.Throws<InvalidOperationException>(() => provider.GetViewComponents().ToArray()); 53var ex = Assert.Throws<InvalidOperationException>(() => provider.GetViewComponents().ToArray()); 67var ex = Assert.Throws<InvalidOperationException>(() => provider.GetViewComponents().ToArray()); 80var ex = Assert.Throws<InvalidOperationException>(() => provider.GetViewComponents().ToArray());
ViewComponents\DefaultViewComponentSelectorTest.cs (4)
104var ex = Assert.Throws<InvalidOperationException>(() => selector.SelectComponent("Ambiguous")); 125var ex = Assert.Throws<InvalidOperationException>(() => selector.SelectComponent(name));
ViewComponents\ViewViewComponentResultTest.cs (10)
175var ex = Assert.Throws<InvalidOperationException>(() => result.Execute(viewComponentContext)); 213var ex = Assert.Throws<InvalidOperationException>(() => result.Execute(viewComponentContext)); 253var ex = Assert.Throws<InvalidOperationException>(() => result.Execute(viewComponentContext)); 413var ex = await Assert.ThrowsAsync<InvalidOperationException>( 442var ex = await Assert.ThrowsAsync<InvalidOperationException>(
ViewDataDictionaryOfTModelTest.cs (13)
216var exception = Assert.Throws<InvalidOperationException>(() => new ViewDataDictionary<string>(source)); 219exception = Assert.Throws<InvalidOperationException>(() => new ViewDataDictionary<string>(source, model: 24)); 385var exception = Assert.Throws<InvalidOperationException>(() => viewData1.Model = 23); 388exception = Assert.Throws<InvalidOperationException>(() => viewData2.Model = 24); 391exception = Assert.Throws<InvalidOperationException>(() => viewData3.Model = 25); 395exception = Assert.Throws<InvalidOperationException>(() => viewData4.Model = 26); 412var exception = Assert.Throws<InvalidOperationException>(() => viewData1.Model = null); 415exception = Assert.Throws<InvalidOperationException>(() => viewData2.Model = null); 418exception = Assert.Throws<InvalidOperationException>(() => viewData3.Model = null); 422exception = Assert.Throws<InvalidOperationException>(() => viewData4.Model = null);
ViewDataDictionaryTest.cs (4)
141var exception = Assert.Throws<InvalidOperationException>(() => viewData.SetModelPublic(model)); 402var exception = Assert.Throws<InvalidOperationException>(() => viewData.SetModelPublic(value: null));
ViewDataOfTTest.cs (2)
18Exception ex = Assert.Throws<InvalidOperationException>(() => viewData.Model = null); 30Exception ex = Assert.Throws<InvalidOperationException>(() => viewData.Model = DateTime.UtcNow);
ViewEngines\CompositeViewEngineTest.cs (6)
44var exception = Assert.Throws<InvalidOperationException>( 172var exception = Assert.Throws<InvalidOperationException>( 311var exception = Assert.Throws<InvalidOperationException>(
ViewResultTest.cs (8)
64var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => viewResult.ExecuteResultAsync(actionContext)); 102var ex = await Assert.ThrowsAsync<InvalidOperationException>( 142var ex = await Assert.ThrowsAsync<InvalidOperationException>( 182var ex = await Assert.ThrowsAsync<InvalidOperationException>(
Microsoft.AspNetCore.OpenApi.Tests (6)
Extensions\ApiDescriptionExtensionsTests.cs (2)
71var exception = Assert.Throws<InvalidOperationException>(() => apiDescription.GetOperationType());
Services\OpenApiGeneratorTests.cs (2)
77var ex = Assert.Throws<InvalidOperationException>(() => GetOpenApiOperation(lambda.Compile()));
Transformers\OperationTransformerTests.cs (2)
145var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => VerifyOpenApiDocument(builder, options, _ => { }));
Microsoft.AspNetCore.OutputCaching.Tests (1)
OutputCacheMiddlewareTests.cs (1)
800Assert.ThrowsAny<InvalidOperationException>(() => OutputCacheMiddleware.AddOutputCacheFeature(context));
Microsoft.AspNetCore.RateLimiting.Tests (3)
RateLimitingApplicationBuilderExtensionsTests.cs (2)
34var ex = Assert.Throws<InvalidOperationException>(() => appBuilder.UseRateLimiter());
RateLimitingMiddlewareTests.cs (1)
178await Assert.ThrowsAsync<InvalidOperationException>(() => middleware.Invoke(context)).DefaultTimeout();
Microsoft.AspNetCore.Razor.Runtime.Test (2)
Runtime\TagHelpers\TagHelperScopeManagerTest.cs (2)
215var ex = Assert.Throws<InvalidOperationException>(() =>
Microsoft.AspNetCore.RequestDecompression.Tests (4)
RequestDecompressionMiddlewareTests.cs (3)
399Assert.IsAssignableFrom<InvalidOperationException>(exception); 502Assert.IsAssignableFrom<InvalidOperationException>(exception); 586Assert.IsAssignableFrom<InvalidOperationException>(exception);
SizeLimitedStreamTests.cs (1)
99Assert.IsAssignableFrom<InvalidOperationException>(exception);
Microsoft.AspNetCore.ResponseCaching.Tests (2)
ResponseCachingKeyProviderTests.cs (1)
62Assert.Throws<InvalidOperationException>(() => cacheKeyProvider.CreateStorageVaryByKey(context));
ResponseCachingMiddlewareTests.cs (1)
885Assert.ThrowsAny<InvalidOperationException>(() => ResponseCachingMiddleware.AddResponseCachingFeature(httpContext));
Microsoft.AspNetCore.Routing (3)
Builder\EndpointFilterExtensions.cs (1)
43catch (InvalidOperationException)
Patterns\RoutePatternFactory.cs (1)
1031/// <exception cref="InvalidOperationException"></exception>
RouteOptions.cs (1)
162/// <exception cref="InvalidOperationException">Throws an exception if the type is not an <see cref="IParameterPolicy"/>.</exception>
Microsoft.AspNetCore.Routing.FunctionalTests (15)
EndpointRoutingIntegrationTest.cs (8)
152var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => server.CreateRequest("/").SendAsync("GET")); 213var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => server.CreateRequest("/").SendAsync("GET")); 244var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => server.CreateRequest("/").SendAsync("GET")); 343var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => server.CreateRequest("/").SendAsync("GET"));
MinimalFormTests.cs (7)
209var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await client.SendAsync(request)); 229exception = Assert.Throws<InvalidOperationException>(() => app.UseAntiforgery()); 429var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await client.SendAsync(request)); 488var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await client.SendAsync(request));
Microsoft.AspNetCore.Routing.Tests (77)
Builder\EndpointRoutingApplicationBuilderExtensionsTest.cs (8)
28var ex = Assert.Throws<InvalidOperationException>(() => app.UseRouting()); 45var ex = Assert.Throws<InvalidOperationException>(() => app.UseEndpoints(endpoints => { })); 118var ex = Assert.Throws<InvalidOperationException>(() => app.UseEndpoints(endpoints => { })); 140var ex = Assert.Throws<InvalidOperationException>(() => app.Map("/Test", b => b.UseEndpoints(endpoints => { })));
Builder\RequestDelegateEndpointRouteBuilderExtensionsTest.cs (2)
469Assert.Throws<InvalidOperationException>(() => endpointBuilder.WithMetadata(new RouteNameMetadata("Foo"))); 470Assert.Throws<InvalidOperationException>(() => endpointBuilder.Finally(b => b.Metadata.Add(new RouteNameMetadata("Foo"))));
Builder\RouteHandlerEndpointRouteBuilderExtensionsTest.cs (12)
216var ex = Assert.Throws<InvalidOperationException>(() => dataSource.Endpoints); 227var ex = Assert.Throws<InvalidOperationException>(() => dataSource.Endpoints); 255var ex = Assert.Throws<InvalidOperationException>(() => dataSource.Endpoints); 499Assert.Throws<InvalidOperationException>(() => endpointBuilder.WithMetadata(new RouteNameMetadata("Foo"))); 500Assert.Throws<InvalidOperationException>(() => endpointBuilder.Finally(b => b.Metadata.Add(new RouteNameMetadata("Foo")))); 596var ex = Assert.Throws<InvalidOperationException>(() => dataSource.Endpoints); 654var ex = Assert.Throws<InvalidOperationException>(() => dataSource.Endpoints);
Builder\RoutingBuilderExtensionsTest.cs (6)
25var exception = Assert.Throws<InvalidOperationException>( 42var ex = Assert.Throws<InvalidOperationException>(() => app.UseRouter(Mock.Of<IRouter>())); 59var ex = Assert.Throws<InvalidOperationException>(() => app.UseRouter(b => { }));
DefaultInlineConstraintResolverTest.cs (2)
290var ex = Assert.Throws<InvalidOperationException>(() => routeOptions.SetParameterPolicy("custom", typeof(string)));
DefaultParameterPolicyFactoryTest.cs (4)
21var exception = Assert.Throws<InvalidOperationException>( 376var inner = Assert.IsType<InvalidOperationException>(exception.InnerException);
EndpointMiddlewareTest.cs (4)
118var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => middleware.Invoke(httpContext)); 147var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => middleware.Invoke(httpContext)); 244var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => middleware.Invoke(httpContext)); 342var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => middleware.Invoke(httpContext));
EndpointNameAddressSchemeTest.cs (2)
170var ex = Assert.Throws<InvalidOperationException>(() => addressScheme.FindEndpoints("any name"));
EndpointRoutingMiddlewareTest.cs (1)
225await Assert.ThrowsAsync<InvalidOperationException>(() => middleware.Invoke(httpContext));
Matching\CandidateSetTest.cs (2)
321var ex = Assert.Throws<InvalidOperationException>(() => candidateSet.ExpandEndpoint(0, Array.Empty<Endpoint>(), comparer));
Matching\DataSourceDependentMatcherTest.cs (4)
163var exception = Assert.Throws<InvalidOperationException>( 201var exception = Assert.Throws<InvalidOperationException>(
Matching\HostMatcherPolicyTest.cs (2)
97Assert.Throws<InvalidOperationException>(() => 189Assert.Throws<InvalidOperationException>(() =>
Patterns\RoutePatternFactoryTest.cs (17)
76var ex = Assert.Throws<InvalidOperationException>(() => RoutePatternFactory.Pattern( 124var ex = Assert.Throws<InvalidOperationException>(() => RoutePatternFactory.Pattern( 305Assert.Throws<InvalidOperationException>(() => 390var ex = Assert.Throws<InvalidOperationException>(() => RoutePatternFactory.Pattern( 608var exception = Assert.Throws<InvalidOperationException>(() => 805var ex = Assert.Throws<InvalidOperationException>(() => RoutePatternFactory.Combine(left, right)); 817var ex = Assert.Throws<InvalidOperationException>(() => RoutePatternFactory.Combine(left, right)); 830var ex = Assert.Throws<InvalidOperationException>(() => RoutePatternFactory.Combine(left, right)); 842var ex = Assert.Throws<InvalidOperationException>(() => RoutePatternFactory.Combine(left, right));
RouteBuilderTest.cs (2)
43var exception = Assert.Throws<InvalidOperationException>(() => new RouteBuilder(applicationBuilderMock.Object));
RouteCollectionTest.cs (4)
303var ex = Assert.Throws<InvalidOperationException>(() => routeCollection.GetVirtualPath(virtualPathContext)); 325var ex = Assert.Throws<InvalidOperationException>(() => routeCollection.GetVirtualPath(virtualPathContext));
RouteConstraintBuilderTest.cs (1)
95ExceptionAssert.Throws<InvalidOperationException>(
Template\RoutePrecedenceTestsBase.cs (4)
101var ex = Assert.Throws<InvalidOperationException>(() => 114var ex = Assert.Throws<InvalidOperationException>(() =>
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (25)
DelegateTests.cs (2)
88Assert.Throws<InvalidOperationException>(() => delegateFeature.DelegateRequest(destination)); 154Assert.Throws<InvalidOperationException>(() => delegateFeature.DelegateRequest(destination));
Listener\RequestBodyTests.cs (1)
31Assert.Throws<InvalidOperationException>(() => context.Request.Body.Read(input, 0, input.Length));
Listener\ResponseBodyTests.cs (3)
31Assert.Throws<InvalidOperationException>(() => context.Response.Body.Flush()); 32Assert.Throws<InvalidOperationException>(() => context.Response.Body.Write(new byte[10], 0, 10)); 33Assert.Throws<InvalidOperationException>(() => context.Response.Body.Flush());
Listener\ResponseHeaderTests.cs (5)
258Assert.Throws<InvalidOperationException>(() => 263Assert.Throws<InvalidOperationException>(() => 268Assert.Throws<InvalidOperationException>(() => 273Assert.Throws<InvalidOperationException>(() => 279Assert.Throws<InvalidOperationException>(() =>
OpaqueUpgradeTests.cs (7)
92catch (InvalidOperationException) 146Assert.Throws<InvalidOperationException>(() => feature.MaxRequestBodySize = 12); 272var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await SendOpaqueRequestAsync(method, address, extraHeader)); 354var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => upgrade.Task); 358ex = await Assert.ThrowsAsync<InvalidOperationException>(() => ParseResponseAsync(stream));
ResponseBodyTests.cs (1)
270await Assert.ThrowsAsync<InvalidOperationException>(() =>
ResponseHeaderTests.cs (4)
228Assert.Throws<InvalidOperationException>(() => response.StatusCode = 404); 229Assert.Throws<InvalidOperationException>(() => responseHeaders.Add("Custom3", new string[] { "value3a, value3b", "value3c" })); 259Assert.Throws<InvalidOperationException>(() => response.StatusCode = 404); 260Assert.Throws<InvalidOperationException>(() => responseHeaders.Add("Custom3", new string[] { "value3a, value3b", "value3c" }));
ResponseTrailersTests.cs (2)
66Assert.Throws<InvalidOperationException>(() => httpContext.Response.AppendTrailer(header, "value")); 128Assert.Throws<InvalidOperationException>(() => httpContext.Response.AppendTrailer("TrailerName", "Trailer Value"));
Microsoft.AspNetCore.Server.Kestrel.Core (13)
HttpsConfigurationService.cs (1)
119/// <exception cref="InvalidOperationException">If initialization is not possible.</exception>
Internal\Certificates\CertificateConfigLoader.cs (1)
150private static InvalidOperationException CreateErrorGettingPrivateKeyException(string keyPath, Exception ex)
Internal\Http\Http1Connection.cs (3)
409catch (InvalidOperationException) 534catch (InvalidOperationException) 702catch (InvalidOperationException) when (_requestProcessingStatus == RequestProcessingStatus.ParsingHeaders)
Internal\Http\Http1MessageBody.cs (2)
69catch (InvalidOperationException ex) 105catch (InvalidOperationException ex)
Internal\Http\HttpProtocol.cs (2)
877private InvalidOperationException GetTooManyBytesWrittenException(int count) 1310var ex = new InvalidOperationException(message);
Internal\Http2\Http2Connection.cs (1)
1560catch (InvalidOperationException)
Internal\Http2\Http2Stream.cs (1)
442catch (InvalidOperationException)
Internal\Http3\Http3Stream.cs (2)
353catch (InvalidOperationException) 1164catch (InvalidOperationException)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (102)
AsciiDecoding.cs (1)
65Assert.Throws<InvalidOperationException>(() => new Span<byte>(byteRange).GetAsciiStringNonNullCharacters());
BodyControlTests.cs (4)
44var writeEx = await Assert.ThrowsAsync<InvalidOperationException>(() => response.WriteAsync(new byte[1], 0, 1)); 70var writeEx = await Assert.ThrowsAsync<InvalidOperationException>(() => response.WriteAsync(new byte[1], 0, 1));
ConnectionDispatcherTests.cs (1)
68Assert.IsType<InvalidOperationException>(critical.Exception);
DiagnosticMemoryPoolTests.cs (19)
21var exception = Assert.Throws<InvalidOperationException>(() => memoryPool.Dispose()); 32var exception = Assert.Throws<InvalidOperationException>(() => block.Dispose()); 42var exception = Assert.Throws<InvalidOperationException>(() => block.Dispose()); 56var exception = Assert.Throws<InvalidOperationException>(() => block.Memory); 69var exception = Assert.Throws<InvalidOperationException>(() => memory.Pin()); 87catch (InvalidOperationException ode) 104var exception = Assert.Throws<InvalidOperationException>(() => MemoryMarshal.TryGetArray<byte>(memory, out _)); 193var exception = Assert.Throws<InvalidOperationException>(() => block.Memory); 210var exception = Assert.Throws<InvalidOperationException>(() => block.Memory); 217var exception = Assert.Throws<InvalidOperationException>(() => memoryPool.Dispose());
Http1\Http1ConnectionTests.cs (11)
56var exception = Assert.Throws<InvalidOperationException>(() => TakeMessageHeaders(readableBuffer, trailers: false, out _consumed, out _examined)); 304Assert.Throws<InvalidOperationException>(() => ((IHttpResponseFeature)_http1Connection).StatusCode = StatusCodes.Status404NotFound); 315Assert.Throws<InvalidOperationException>(() => ((IHttpResponseFeature)_http1Connection).ReasonPhrase = "Reason phrase"); 325Assert.Throws<InvalidOperationException>(() => ((IHttpResponseFeature)_http1Connection).OnStarting(_ => Task.CompletedTask, null)); 588await Assert.ThrowsAsync<InvalidOperationException>(() => _http1Connection.WriteAsync(new ArraySegment<byte>(new byte[1]))); 599await Assert.ThrowsAsync<InvalidOperationException>(() => _http1Connection.WriteAsync(new ArraySegment<byte>(new byte[1]), default(CancellationToken))); 635await Assert.ThrowsAsync<InvalidOperationException>(() => _http1Connection.FlushAsync()); 649await Assert.ThrowsAsync<InvalidOperationException>(() => _http1Connection.FlushAsync()); 937var ex = Assert.Throws<InvalidOperationException>(() => ((IHttpMaxRequestBodySizeFeature)_http1Connection).MaxRequestBodySize = 1);
HttpRequestHeadersTests.cs (4)
562Assert.Throws<InvalidOperationException>((Action)(() => 654Assert.Throws<InvalidOperationException>(() => 685Assert.Throws<InvalidOperationException>(() => headers.Append(acceptNameBytes, headerValueBytes, checkForNewlineChars: false)); 709Assert.Throws<InvalidOperationException>(() =>
HttpRequestStreamTests.cs (4)
120var ioEx = Assert.Throws<InvalidOperationException>(() => stream.Read(new byte[1], 0, 1)); 123var ioEx2 = Assert.Throws<InvalidOperationException>(() => stream.CopyTo(Stream.Null));
HttpResponseHeadersTests.cs (25)
105Assert.Throws<InvalidOperationException>(() => 110Assert.Throws<InvalidOperationException>(() => 115Assert.Throws<InvalidOperationException>(() => 120Assert.Throws<InvalidOperationException>(() => 126Assert.Throws<InvalidOperationException>(() => 150Assert.Throws<InvalidOperationException>(() => 156Assert.Throws<InvalidOperationException>(() => 188Assert.Throws<InvalidOperationException>(() => 194Assert.Throws<InvalidOperationException>(() => 199Assert.Throws<InvalidOperationException>(() => 204Assert.Throws<InvalidOperationException>(() => 209Assert.Throws<InvalidOperationException>(() => 214Assert.Throws<InvalidOperationException>(() => 220Assert.Throws<InvalidOperationException>(() => 262Assert.Throws<InvalidOperationException>(() => ((IDictionary<string, StringValues>)headers).Add("my-header", new[] { "value" })); 271Assert.Throws<InvalidOperationException>(() => headers.ContentLength = null); 282Assert.Throws<InvalidOperationException>(() => dictionary["my-header"] = "other-value"); 293Assert.Throws<InvalidOperationException>(() => dictionary.Remove("my-header")); 304Assert.Throws<InvalidOperationException>(() => dictionary.Clear()); 314var exception = Assert.Throws<InvalidOperationException>(() => dictionary.Add("Content-Length", new[] { contentLength })); 325var exception = Assert.Throws<InvalidOperationException>(() => ((IHeaderDictionary)headers)["Content-Length"] = contentLength); 335var exception = Assert.Throws<InvalidOperationException>(() => headers.HeaderContentLength = contentLength);
HttpResponseStreamTests.cs (2)
123var ioEx = Assert.Throws<InvalidOperationException>(() => stream.Write(new byte[1], 0, 1));
HttpUtilitiesTest.cs (1)
249Assert.Throws<InvalidOperationException>(() =>
KestrelServerOptionsTests.cs (2)
63Assert.Throws<InvalidOperationException>(() => options.Configure()); 74Assert.Throws<InvalidOperationException>(() => options.Configure());
KestrelServerTests.cs (16)
87var ex = Assert.Throws<InvalidOperationException>(() => StartDummyApplication(server)); 126var exception = Assert.Throws<InvalidOperationException>(() => StartDummyApplication(server)); 232var exception = Assert.Throws<InvalidOperationException>(() => StartDummyApplication(server)); 259var exception = Assert.Throws<InvalidOperationException>(() => StartDummyApplication(server)); 318var exception = Assert.Throws<InvalidOperationException>(() => 349var exception = await Assert.ThrowsAsync<InvalidOperationException>( 390var exception = await Assert.ThrowsAsync<InvalidOperationException>( 605var unbindException = new InvalidOperationException(); 646Assert.Same(unbindException, await Assert.ThrowsAsync<InvalidOperationException>(() => stopTask1.TimeoutAfter(timeout))); 647Assert.Same(unbindException, await Assert.ThrowsAsync<InvalidOperationException>(() => stopTask2.TimeoutAfter(timeout))); 648Assert.Same(unbindException, await Assert.ThrowsAsync<InvalidOperationException>(() => stopTask3.TimeoutAfter(timeout)));
MessageBodyTests.cs (5)
125await Assert.ThrowsAsync<InvalidOperationException>(async () => await reader.ReadAsync()); 146Assert.Throws<InvalidOperationException>(() => reader.TryRead(out readResult)); 1203Assert.Throws<InvalidOperationException>(() => reader.TryRead(out readResult)); 1340Assert.Throws<InvalidOperationException>(() => reader.TryRead(out readResult)); 1366Assert.Throws<InvalidOperationException>(() => reader.TryRead(out readResult));
SniOptionsSelectorTests.cs (2)
513var ex = Assert.Throws<InvalidOperationException>(
ThrowingWasUpgradedWriteOnlyStreamTests.cs (4)
22Assert.Equal(CoreStrings.ResponseStreamWasUpgraded, Assert.Throws<InvalidOperationException>(() => stream.Write(new byte[1], 0, 1)).Message); 23Assert.Equal(CoreStrings.ResponseStreamWasUpgraded, (await Assert.ThrowsAsync<InvalidOperationException>(() => stream.WriteAsync(new byte[1], 0, 1))).Message); 24Assert.Equal(CoreStrings.ResponseStreamWasUpgraded, Assert.Throws<InvalidOperationException>(() => stream.Flush()).Message); 25Assert.Equal(CoreStrings.ResponseStreamWasUpgraded, (await Assert.ThrowsAsync<InvalidOperationException>(() => stream.FlushAsync())).Message);
UTF8Decoding.cs (1)
39Assert.Throws<InvalidOperationException>(() =>
Microsoft.AspNetCore.Server.Kestrel.Tests (18)
ConfigurationReaderTests.cs (4)
138Assert.Throws<InvalidOperationException>(() => reader.Endpoints); 149Assert.Throws<InvalidOperationException>(() => reader.Endpoints); 308var end1Ex = Assert.Throws<InvalidOperationException>(() => reader.Endpoints);
HttpsConfigurationTests.cs (4)
46Assert.Throws<InvalidOperationException>(host.Run); 73Assert.Throws<InvalidOperationException>(host.Run); 106Assert.Throws<InvalidOperationException>(host.Run); 176Assert.Throws<InvalidOperationException>(host.Run);
KestrelConfigurationLoaderTests.cs (10)
343Assert.Throws<InvalidOperationException>(() => serverOptions.ConfigurationLoader.Reload()); 645var ex = Assert.Throws<InvalidOperationException>(() => 774var ex = Assert.Throws<InvalidOperationException>(() => serverOptions.Configure(config).Load()); 783ex = Assert.Throws<InvalidOperationException>(() => serverOptions.Configure(config).Load()); 792ex = Assert.Throws<InvalidOperationException>(() => serverOptions.Configure(config).Load()); 801ex = Assert.Throws<InvalidOperationException>(() => serverOptions.Configure(config).Load()); 810ex = Assert.Throws<InvalidOperationException>(() => serverOptions.Configure(config).Load()); 1764Assert.Throws<InvalidOperationException>(serverOptions.ConfigurationLoader.ProcessEndpointsToAdd);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (4)
QuicTransportFactoryTests.cs (2)
32var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => quicTransportFactory.BindAsync(new IPEndPoint(0, 0), features: null, cancellationToken: CancellationToken.None).AsTask()).DefaultTimeout(); 49var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => quicTransportFactory.BindAsync(new IPEndPoint(0, 0), features: features, cancellationToken: CancellationToken.None).AsTask()).DefaultTimeout();
WebHostTests.cs (2)
409var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => host.StartAsync()).DefaultTimeout();
Microsoft.AspNetCore.Session (2)
DistributedSession.cs (1)
51/// If the callback returns <see langword="false"/>, <see cref="Set(string, byte[])"/> throws an <see cref="InvalidOperationException"/>.
ISessionStore.cs (1)
24/// If the callback returns <see langword="false"/>, <see cref="ISession.Set(string, byte[])"/> should throw an <see cref="InvalidOperationException"/>.
Microsoft.AspNetCore.Session.Tests (1)
SessionTests.cs (1)
704await Assert.ThrowsAsync<InvalidOperationException>(() => context.Session.LoadAsync());
Microsoft.AspNetCore.Shared.Tests (9)
CommandLineApplicationTests.cs (3)
163var ex = Assert.Throws<InvalidOperationException>(() => app.Argument("second", "Second argument")); 829Assert.Throws<InvalidOperationException>(() => app.Execute("subcmd", "-a", "b"));
ObjectMethodExecutorTest.cs (3)
159Assert.Throws<InvalidOperationException>(() => executor.GetDefaultValueForParameter(0)); 373Assert.IsType<InvalidOperationException>(exception.InnerException); 406Assert.IsType<InvalidOperationException>(exception.InnerException);
UrlDecoderTests.cs (2)
87Assert.Throws<InvalidOperationException>(() => UrlDecoder.DecodeInPlace(source.AsSpan())); 94Assert.Throws<InvalidOperationException>(() => UrlDecoder.DecodeInPlace(source.AsSpan(), false));
ValueStopwatchTest.cs (1)
28Assert.Throws<InvalidOperationException>(() => stopwatch.GetElapsedTime());
Microsoft.AspNetCore.SignalR.Client.Tests (43)
HttpConnectionFactoryTests.cs (2)
72var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await factory.ConnectAsync(new UriEndPoint(url2)));
HttpConnectionTests.cs (2)
67var exception = Assert.Throws<InvalidOperationException>(() => connection.ConnectionId = "custom conneciton ID");
HttpConnectionTests.Negotiate.cs (4)
326var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => connection.StartAsync().DefaultTimeout()); 596var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => connection.StartAsync().DefaultTimeout());
HttpConnectionTests.Transport.cs (2)
261var exception = await Assert.ThrowsAsync<InvalidOperationException>(
HubConnectionBuilderTests.cs (6)
22var ex = Assert.Throws<InvalidOperationException>(() => new HubConnectionBuilder().Build()); 32var ex = Assert.Throws<InvalidOperationException>(() => builder.Build()); 69var ex = Assert.Throws<InvalidOperationException>(() => builder.Build());
HubConnectionTests.ConnectionLifecycle.cs (11)
73await Assert.ThrowsAsync<InvalidOperationException>(() => secondStart).DefaultTimeout(); 199var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => method(connection)).DefaultTimeout(); 377var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => connection.SendAsync("Foo")).DefaultTimeout(); 412var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => connection.SendAsync("Foo")).DefaultTimeout(); 450var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => connection.SendAsync("Foo")).DefaultTimeout(); 480var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => targetTask).DefaultTimeout();
HubConnectionTests.cs (10)
35var exception = new InvalidOperationException(); 39var actualException = 40await Assert.ThrowsAsync<InvalidOperationException>(async () => await hubConnection.InvokeAsync<int>("test").DefaultTimeout()); 50var exception = new InvalidOperationException(); 54var actualException = 55await Assert.ThrowsAsync<InvalidOperationException>(async () => await hubConnection.SendAsync("test").DefaultTimeout()); 158var exception = new InvalidOperationException(); 161var actualException = await Assert.ThrowsAsync<InvalidOperationException>(async () => await invokeTask); 786await Assert.ThrowsAsync<InvalidOperationException>(() => connection.StartAsync().DefaultTimeout());
HubConnectionTests.Protocol.cs (6)
333var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => channel.ReadAndCollectAllAsync()).DefaultTimeout(); 379var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => invokeTask).DefaultTimeout(); 716var ex = Assert.Throws<InvalidOperationException>(
Microsoft.AspNetCore.SignalR.Core (1)
Internal\TypedClientBuilder.cs (1)
184generator.Emit(OpCodes.Newobj, typeof(InvalidOperationException).GetConstructor(new Type[] { typeof(string) })!);
Microsoft.AspNetCore.SignalR.Specification.Tests (2)
HubLifetimeManagerTestBase.cs (2)
251var ex = await Assert.ThrowsAsync<InvalidOperationException>(() =>
Microsoft.AspNetCore.SignalR.Tests (41)
DefaultTransportFactoryTests.cs (4)
68var ex = Assert.Throws<InvalidOperationException>( 105var ex = Assert.Throws<InvalidOperationException>(
EndToEndTests.cs (2)
240var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => connection.StartAsync().DefaultTimeout());
HubConnectionHandlerTests.cs (13)
243var ex = Assert.Throws<InvalidOperationException>(() => 708var exception = 709await Assert.ThrowsAsync<InvalidOperationException>( 784var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => await connectionHandlerTask); 2499await Assert.ThrowsAsync<InvalidOperationException>(async () => await await client.ConnectAsync(connectionHandler, expectedHandshakeResponseMessage: false)).DefaultTimeout(); 2523await Assert.ThrowsAsync<InvalidOperationException>(async () => await await client.ConnectAsync(connectionHandler, expectedHandshakeResponseMessage: false)).DefaultTimeout(); 5046var ex = Assert.Throws<InvalidOperationException>(() => serviceProvider.GetService<HubConnectionHandler<KeyedServicesHub>>()); 5062var ex = Assert.Throws<InvalidOperationException>(() => serviceProvider.GetService<HubConnectionHandler<BadServicesHub>>()); 5073Assert.Throws<InvalidOperationException>(
Internal\MessageBufferTests.cs (1)
237Assert.Throws<InvalidOperationException>(() => messageBuffer.ShouldProcessMessage(new SequenceMessage(2)));
Internal\TypedClientBuilderTests.cs (19)
135var ex = Assert.Throws<InvalidOperationException>(() => TypedClientBuilder<object>.Build(clientProxy)); 143var ex = Assert.Throws<InvalidOperationException>(() => TypedClientBuilder<ValueTask>.Build(clientProxy)); 151var ex = Assert.Throws<InvalidOperationException>(() => TypedClientBuilder<EventHandler>.Build(clientProxy)); 159var ex = Assert.Throws<InvalidOperationException>(() => TypedClientBuilder<IVoidMethodClient>.Build(clientProxy)); 167var ex = Assert.Throws<InvalidOperationException>(() => TypedClientBuilder<IStringMethodClient>.Build(clientProxy)); 175var ex = Assert.Throws<InvalidOperationException>(() => TypedClientBuilder<IOutParamMethodClient>.Build(clientProxy)); 184var ex = Assert.Throws<InvalidOperationException>(() => TypedClientBuilder<IRefParamMethodClient>.Build(clientProxy)); 193var ex = Assert.Throws<InvalidOperationException>(() => TypedClientBuilder<IPropertiesClient>.Build(clientProxy)); 201var ex = Assert.Throws<InvalidOperationException>(() => TypedClientBuilder<IEventsClient>.Build(clientProxy)); 238var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => typedProxy.GetValue(102, objArg, "test")).DefaultTimeout();
MapSignalRTests.cs (2)
50var ex = Assert.Throws<InvalidOperationException>(() =>
Microsoft.AspNetCore.SpaServices.Extensions.Tests (2)
SpaServicesExtensionsTests.cs (2)
35var exception = Assert.Throws<InvalidOperationException>(
Microsoft.AspNetCore.TestHost.Tests (17)
ClientHandlerTests.cs (5)
514return Assert.ThrowsAsync<InvalidOperationException>(() => httpClient.GetAsync("https://example.com/", 535Assert.IsType<InvalidOperationException>(ex.GetBaseException()); 550return Assert.ThrowsAsync<InvalidOperationException>(() => httpClient.GetAsync("https://example.com/", 566return Assert.ThrowsAsync<InvalidOperationException>(() => httpClient.GetAsync("https://example.com/", 591return Assert.ThrowsAsync<InvalidOperationException>(() => httpClient.GetAsync("https://example.com/",
HttpContextBuilderTests.cs (2)
275return Assert.ThrowsAsync<InvalidOperationException>(() => server.SendAsync(c => { })); 299Assert.IsAssignableFrom<InvalidOperationException>(ex.InnerException);
ResponseBodyTests.cs (4)
61var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => client.GetAsync("/")); 98var ex = (InvalidOperationException)requestException?.InnerException?.InnerException;
ResponseFeatureTests.cs (3)
48Assert.Throws<InvalidOperationException>(() => 63Assert.Throws<InvalidOperationException>(() => responseInformation.StatusCode = 400); 64Assert.Throws<InvalidOperationException>(() => responseInformation.ReasonPhrase = "Hello World");
TestClientTests.cs (2)
256var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => client.SendAsync(message, CancellationToken.None));
TestServerTests.cs (1)
118Assert.Throws<InvalidOperationException>(() => new TestServer(builder));
Microsoft.AspNetCore.Tests (16)
WebApplicationTests.cs (16)
282Assert.Throws<InvalidOperationException>(() => app.Urls); 355await Assert.ThrowsAsync<InvalidOperationException>(() => app.RunAsync("http://localhost:5001")); 366await Assert.ThrowsAsync<InvalidOperationException>(() => app.RunAsync("http://localhost:5001")); 1620var ex = Assert.Throws<InvalidOperationException>(() => app.UseEndpoints(endpoints => { })); 1817Assert.Throws<InvalidOperationException>(() => builder.Services.AddSingleton<IService>(new Service())); 1818Assert.Throws<InvalidOperationException>(() => builder.Services.TryAddSingleton(new Service())); 1819Assert.Throws<InvalidOperationException>(() => builder.Services.AddScoped<IService, Service>()); 1820Assert.Throws<InvalidOperationException>(() => builder.Services.TryAddScoped<IService, Service>()); 1821Assert.Throws<InvalidOperationException>(() => builder.Services.Remove(ServiceDescriptor.Singleton(new Service()))); 1822Assert.Throws<InvalidOperationException>(() => builder.Services[0] = ServiceDescriptor.Singleton(new Service())); 2058var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => client.GetAsync("/")); 2089var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => client.GetAsync("/")); 2607Assert.IsType<InvalidOperationException>(ex.InnerException.InnerException);
Microsoft.AspNetCore.WebUtilities (1)
FormPipeReader.cs (1)
407catch (InvalidOperationException ex)
Microsoft.AspNetCore.WebUtilities.Tests (1)
FormPipeReaderTests.cs (1)
86Assert.IsType<InvalidOperationException>(exception.InnerException);
Microsoft.Build (51)
BackEnd\BuildManager\BuildManager.cs (11)
434/// <exception cref="InvalidOperationException">Thrown if a build is already in progress.</exception> 464/// <exception cref="InvalidOperationException">Thrown if a build is already in progress.</exception> 881/// <exception cref="InvalidOperationException">Thrown if StartBuild has not been called or if EndBuild has been called.</exception> 909/// <exception cref="InvalidOperationException">Thrown if StartBuild has not been called or if EndBuild has been called.</exception> 938/// <exception cref="InvalidOperationException">Thrown if StartBuild has not been called or if EndBuild has been called.</exception> 950/// <exception cref="InvalidOperationException">Thrown if StartBuild has not been called or if EndBuild has been called.</exception> 959/// <exception cref="InvalidOperationException">Thrown if there is no build in progress.</exception> 1141/// <exception cref="InvalidOperationException">Thrown if a build is already in progress.</exception> 1166/// <exception cref="InvalidOperationException">Thrown if a build is already in progress.</exception> 2132/// Verifies the BuildManager is in the required state, and throws a <see cref="System.InvalidOperationException"/> if it is not. 2140/// Verifies the BuildManager is in the required state, and throws a <see cref="System.InvalidOperationException"/> if it is not.
BackEnd\BuildManager\BuildSubmission.cs (3)
116/// <exception cref="System.InvalidOperationException">The request has already been started or is already complete.</exception> 140/// <exception cref="System.InvalidOperationException">The request has already been started or is already complete.</exception> 179/// <exception cref="System.InvalidOperationException">The request has already been started or is already complete.</exception>
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
362catch (InvalidOperationException)
BackEnd\Components\RequestBuilder\BatchingEngine.cs (1)
400catch (InvalidOperationException e)
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (1)
480catch (InvalidOperationException e)
Construction\ProjectElement.cs (1)
102/// It is possible for derived classes to throw an <see cref="InvalidOperationException"/> if setting the condition is
Construction\ProjectRootElement.cs (3)
1618/// An <see cref="InvalidOperationException"/> is thrown if the project root element is not associated with any file on disk. 1631/// An <see cref="InvalidOperationException"/> is thrown if the path does not exist. 1663/// Otherwise, an <see cref="InvalidOperationException"/> is thrown when unsaved changes are present.
Construction\Solution\SolutionFile.cs (2)
394catch (Exception e) when (e is JsonException || e is KeyNotFoundException || e is InvalidOperationException) 416catch (Exception e) when (e is JsonException || e is KeyNotFoundException || e is InvalidOperationException)
Definition\Project.cs (2)
98/// When this property is set to true, the previous item operations throw an <see cref="InvalidOperationException" /> 1990/// When this property is set to true, the previous item operations throw an <exception cref="InvalidOperationException"></exception>
Definition\ProjectCollection.cs (1)
1370/// <exception cref="InvalidOperationException">
Errors\InternalLoggerException.cs (3)
37/// <exception cref="InvalidOperationException"></exception> 50/// <exception cref="InvalidOperationException"></exception> 65/// <exception cref="InvalidOperationException"></exception>
Evaluation\Expander.cs (8)
998catch (InvalidOperationException ex) 2363catch (Exception e) when (!ExceptionHandling.NotExpectedException(e) || e is InvalidOperationException) 2614catch (Exception ex) when (ex is ArgumentException || ex is InvalidOperationException) 2812catch (Exception ex) when (ex is ArgumentException || ex is InvalidOperationException) 2847catch (Exception ex) when (ex is ArgumentException || ex is InvalidOperationException) 2880catch (Exception ex) when (ex is ArgumentException || ex is InvalidOperationException) 2916catch (Exception ex) when (ex is ArgumentException || ex is InvalidOperationException) 3067catch (InvalidOperationException ex)
ExceptionHandling.cs (1)
314|| e is InvalidOperationException
Graph\GraphBuildSubmission.cs (2)
104/// <exception cref="System.InvalidOperationException">The request has already been started or is already complete.</exception> 116/// <exception cref="System.InvalidOperationException">The request has already been started or is already complete.</exception>
Graph\ProjectGraph.cs (4)
186/// <see cref="InvalidOperationException" /> 326/// <exception cref="InvalidOperationException"> 366/// <exception cref="InvalidOperationException"> 410/// <exception cref="InvalidOperationException">
Logging\SerialConsoleLogger.cs (1)
922/// <exception cref="InvalidOperationException">Thrown when stack is empty.</exception>
Modifiers.cs (1)
381/// <exception cref="InvalidOperationException">Thrown when the item-spec is not a path.</exception>
NodeEndpointOutOfProcBase.cs (1)
457catch (InvalidOperationException)
ProcessExtensions.cs (1)
24catch (System.InvalidOperationException)
ResourceUtilities.cs (1)
285catch (InvalidOperationException e)
TaskLoggingHelper.cs (1)
201/// <exception cref="InvalidOperationException">Thrown when the <c>TaskResources</c> property of the owner task is not set.</exception>
TaskLoggingHelperExtension.cs (1)
90/// <exception cref="InvalidOperationException">Thrown when the <c>TaskResources</c> property of the owner task is not set.</exception>
Microsoft.Build.Engine (20)
Engine\BatchingEngine.cs (1)
407catch (InvalidOperationException e)
Engine\Engine.cs (2)
587catch (InvalidOperationException) 2803catch (InvalidOperationException)
Engine\EngineCallback.cs (2)
67catch (InvalidOperationException e) 125catch (InvalidOperationException e)
Engine\TaskEngine.cs (1)
947catch (InvalidOperationException e)
Errors\InternalLoggerException.cs (3)
37/// <exception cref="InvalidOperationException"></exception> 51/// <exception cref="InvalidOperationException"></exception> 67/// <exception cref="InvalidOperationException"></exception>
Items\BuildItem.cs (4)
1243/// <exception cref="InvalidOperationException">Thrown when the requested metadata is not applicable to the item.</exception> 1281/// <exception cref="InvalidOperationException">Thrown when the requested attribute is not applicable to the item.</exception> 1293/// <exception cref="InvalidOperationException">Thrown when the requested attribute is not applicable to the item.</exception> 1649/// <exception cref="InvalidOperationException">Thrown when the item-spec is not a path.</exception>
Items\ItemExpander.cs (1)
400catch (InvalidOperationException e)
Logging\SerialConsoleLogger.cs (1)
924/// <exception cref="InvalidOperationException">Thrown when stack is empty.</exception>
Shared\ExceptionHandling.cs (1)
118|| e is InvalidOperationException
Shared\FileUtilities.cs (1)
311/// <exception cref="InvalidOperationException">Thrown when the item-spec is not a path.</exception>
Shared\ResourceUtilities.cs (1)
212catch (InvalidOperationException e)
Solution\SolutionWrapperProject.cs (1)
284catch (InvalidOperationException)
Solution\VCWrapperProject.cs (1)
148catch (InvalidOperationException)
Microsoft.Build.Engine.OM.UnitTests (104)
Construction\ConstructionEditing_Tests.cs (27)
105Assert.Throws<InvalidOperationException>(() => 119Assert.Throws<InvalidOperationException>(() => 133Assert.Throws<InvalidOperationException>(() => 148Assert.Throws<InvalidOperationException>(() => 164Assert.Throws<InvalidOperationException>(() => 178Assert.Throws<InvalidOperationException>(() => 194Assert.Throws<InvalidOperationException>(() => 210Assert.Throws<InvalidOperationException>(() => 228Assert.Throws<InvalidOperationException>(() => 246Assert.Throws<InvalidOperationException>(() => 260Assert.Throws<InvalidOperationException>(() => 274Assert.Throws<InvalidOperationException>(() => 289Assert.Throws<InvalidOperationException>(() => 304Assert.Throws<InvalidOperationException>(() => 319Assert.Throws<InvalidOperationException>(() => 334Assert.Throws<InvalidOperationException>(() => 350Assert.Throws<InvalidOperationException>(() => 630Assert.Throws<InvalidOperationException>(() => 644Assert.Throws<InvalidOperationException>(() => 660Assert.Throws<InvalidOperationException>(() => 1220Assert.Throws<InvalidOperationException>(() => 1237Assert.Throws<InvalidOperationException>(() => 1255Assert.Throws<InvalidOperationException>(() => 1271Assert.Throws<InvalidOperationException>(() => 1287Assert.Throws<InvalidOperationException>(() => 2257Assert.Throws<InvalidOperationException>(() => 2269Assert.Throws<InvalidOperationException>(() =>
Construction\ProjectItemElement_Tests.cs (7)
739Assert.Throws<InvalidOperationException>(() => 755Assert.Throws<InvalidOperationException>(() => 816Assert.Throws<InvalidOperationException>(() => 832Assert.Throws<InvalidOperationException>(() => 848Assert.Throws<InvalidOperationException>(() => 910Assert.Throws<InvalidOperationException>(() => 926Assert.Throws<InvalidOperationException>(() =>
Construction\ProjectOutputElement_Tests.cs (2)
240Assert.Throws<InvalidOperationException>(() => 267Assert.Throws<InvalidOperationException>(() =>
Construction\ProjectRootElement_Tests.cs (8)
552Assert.Throws<InvalidOperationException>(() => 689Assert.Throws<InvalidOperationException>(() => 1644var exception = 1645Assert.Throws<InvalidOperationException>( 1663var exception = 1664Assert.Throws<InvalidOperationException>( 1810var exception = 1811Assert.Throws<InvalidOperationException>(
Construction\ProjectUsingTaskElement_Tests.cs (2)
277Assert.Throws<InvalidOperationException>(() => 290Assert.Throws<InvalidOperationException>(() =>
Definition\DefinitionEditing_Tests.cs (9)
1585Assert.Throws<InvalidOperationException>(() => 1600Assert.Throws<InvalidOperationException>(() => 1615Assert.Throws<InvalidOperationException>(() => 1630Assert.Throws<InvalidOperationException>(() => 1645Assert.Throws<InvalidOperationException>(() => 1719Assert.Throws<InvalidOperationException>(() => 1734Assert.Throws<InvalidOperationException>(() => 2598var ex = Assert.Throws<InvalidOperationException>(() => itemOperation(project, item));
Definition\Project_Tests.cs (3)
382Should.Throw<InvalidOperationException>(() => 907Should.Throw<InvalidOperationException>(() => 938Should.Throw<InvalidOperationException>(() =>
Definition\ProjectCollection_Tests.cs (6)
373Assert.Throws<InvalidOperationException>(() => 482catch (InvalidOperationException) 736Assert.Throws<InvalidOperationException>(() => 751Assert.Throws<InvalidOperationException>(() => 770catch (InvalidOperationException ex) 1129Assert.Throws<InvalidOperationException>(() =>
Definition\ProjectItem_Tests.cs (5)
259Assert.Throws<InvalidOperationException>(() => 1907Assert.Throws<InvalidOperationException>(() => 2046Assert.Throws<InvalidOperationException>(() => 2077Assert.Throws<InvalidOperationException>(() => 2108Assert.Throws<InvalidOperationException>(() =>
Definition\ProjectItemDefinition_Tests.cs (1)
119Assert.Throws<InvalidOperationException>(() =>
Definition\ProjectMetadata_Tests.cs (1)
447Assert.Throws<InvalidOperationException>(() =>
Definition\ProjectProperty_Tests.cs (2)
136Assert.Throws<InvalidOperationException>(() => 259Assert.Throws<InvalidOperationException>(() =>
Definition\ProtectImports_Tests.cs (12)
132Assert.Throws<InvalidOperationException>(() => 163Assert.Throws<InvalidOperationException>(() => 182Assert.Throws<InvalidOperationException>(() => 197Assert.Throws<InvalidOperationException>(() => 212Assert.Throws<InvalidOperationException>(() => 227Assert.Throws<InvalidOperationException>(() => 302Assert.Throws<InvalidOperationException>(() => 317Assert.Throws<InvalidOperationException>(() => 332Assert.Throws<InvalidOperationException>(() => 347Assert.Throws<InvalidOperationException>(() => 425Assert.Throws<InvalidOperationException>(() => 440Assert.Throws<InvalidOperationException>(() =>
ExceptionHandling.cs (1)
314|| e is InvalidOperationException
ObjectModelRemoting\LinkedConstructionModify_Tests.cs (16)
339Assert.ThrowsAny<InvalidOperationException>(() => newOutputProp.View.ItemType = "foo"); 342Assert.ThrowsAny<InvalidOperationException>(() => newOutputItem.View.PropertyName = "foo"); 381Assert.ThrowsAny<InvalidOperationException>(() => choose.View.Condition = "ccc"); 496Assert.ThrowsAny<InvalidOperationException>(() => usingTaskFile.View.AssemblyName = "xxx"); 514Assert.ThrowsAny<InvalidOperationException>(() => usingTaskName.View.AssemblyFile = "xxx"); 653Assert.ThrowsAny<InvalidOperationException>(() => item.View.Remove = "xx"); // Include/Update/Remove are exclusive 654Assert.ThrowsAny<InvalidOperationException>(() => item.View.Update = "xx"); // Include/Update/Remove are exclusive 657Assert.ThrowsAny<InvalidOperationException>(() => item.View.Include = "xx"); // Include/Update/Remove are exclusive 658Assert.ThrowsAny<InvalidOperationException>(() => item.View.Update = "xx"); // Include/Update/Remove are exclusive 661Assert.ThrowsAny<InvalidOperationException>(() => item.View.Include = "xx"); // Include/Update/Remove are exclusive 662Assert.ThrowsAny<InvalidOperationException>(() => item.View.Remove = "xx"); // Include/Update/Remove are exclusive 665Assert.ThrowsAny<InvalidOperationException>(() => item.View.KeepMetadata = "xx"); 666Assert.ThrowsAny<InvalidOperationException>(() => item.View.KeepDuplicates = "xx"); 667Assert.ThrowsAny<InvalidOperationException>(() => item.View.RemoveMetadata = "xx"); 683Assert.ThrowsAny<InvalidOperationException>(() => itemInTargt.View.RemoveMetadata = "xx"); // RemoveMetadata/KeepDuplicate exclusive 686Assert.ThrowsAny<InvalidOperationException>(() => itemInTargt.View.KeepMetadata = "xx"); // RemoveMetadata/KeepDuplicate exclusive
ObjectModelRemoting\LinkedSpecialCasesScenarios.cs (1)
119Assert.ThrowsAny<InvalidOperationException>(() => xmlPair.View.AppendChild(cloned));
ResourceUtilities.cs (1)
285catch (InvalidOperationException e)
Microsoft.Build.Engine.UnitTests (25)
BackEnd\BuildManager_Tests.cs (11)
1082Should.Throw<InvalidOperationException>(() => _buildManager.BuildRequest(data)); 1092Should.Throw<InvalidOperationException>(() => _buildManager.BuildRequest(data)); 1102Should.Throw<InvalidOperationException>(() => _buildManager.PendBuildRequest(data)); 1112Should.Throw<InvalidOperationException>(() => _buildManager.PendBuildRequest(data)); 1121Assert.Throws<InvalidOperationException>(() => 1160Assert.Throws<InvalidOperationException>(() => _buildManager.BeginBuild(new BuildParameters())); 1191Assert.Throws<InvalidOperationException>(() => _buildManager.EndBuild()); 1204Should.Throw<InvalidOperationException>(() => _buildManager.PendBuildRequest(data)); 1217Should.Throw<InvalidOperationException>(() => _buildManager.PendBuildRequest(data)); 1232Assert.Throws<InvalidOperationException>(() => { _buildManager.Build(new BuildParameters(), data); }); 1294Assert.Throws<InvalidOperationException>(() => _buildManager.EndBuild());
Collections\OMcollections_tests.cs (1)
117Should.Throw<InvalidOperationException>(() =>
Construction\ElementLocation_Tests.cs (4)
350Assert.Throws<InvalidOperationException>(() => 370Assert.Throws<InvalidOperationException>(() => 387Assert.Throws<InvalidOperationException>(() => 406Assert.Throws<InvalidOperationException>(() =>
Definition\Project_Internal_Tests.cs (1)
254Should.Throw<InvalidOperationException>(() =>
FileUtilities_Tests.cs (2)
156Assert.Throws<InvalidOperationException>(() => 167Assert.Throws<InvalidOperationException>(() =>
Graph\GraphLoadedFromSolution_tests.cs (2)
85var exception = aggException.InnerExceptions[0].ShouldBeOfType<InvalidOperationException>();
Graph\ProjectGraph_Tests.cs (1)
213aggException.InnerExceptions[0].ShouldBeOfType<InvalidOperationException>();
Instance\HostServices_Tests.cs (3)
217Assert.Throws<InvalidOperationException>(() => 232Assert.Throws<InvalidOperationException>(() => 274Assert.Throws<InvalidOperationException>(() =>
Microsoft.Build.Framework.UnitTests (1)
ResourceUtilities.cs (1)
285catch (InvalidOperationException e)
Microsoft.Build.Tasks.Core (9)
AssemblyDependency\ResolveAssemblyReference.cs (2)
2447catch (InvalidOperationException e) 2483catch (InvalidOperationException e)
AssignLinkMetadata.cs (1)
63catch (InvalidOperationException e)
ExceptionHandling.cs (1)
314|| e is InvalidOperationException
GenerateResource.cs (1)
1479catch (InvalidOperationException e)
ManifestUtil\DeployManifest.cs (1)
195catch (InvalidOperationException)
Modifiers.cs (1)
381/// <exception cref="InvalidOperationException">Thrown when the item-spec is not a path.</exception>
ResourceUtilities.cs (1)
285catch (InvalidOperationException e)
TaskLoggingHelperExtension.cs (1)
90/// <exception cref="InvalidOperationException">Thrown when the <c>TaskResources</c> property of the owner task is not set.</exception>
Microsoft.Build.Tasks.UnitTests (1)
RARPrecomputedCache_Tests.cs (1)
130Should.Throw<InvalidOperationException>(() => rarWriterTask.WriteStateFile());
Microsoft.Build.UnitTests.Shared (1)
ObjectModelHelpers.cs (1)
1907Assert.Throws<InvalidOperationException>(method);
Microsoft.Build.Utilities.Core (7)
ExceptionHandling.cs (1)
314|| e is InvalidOperationException
Modifiers.cs (1)
381/// <exception cref="InvalidOperationException">Thrown when the item-spec is not a path.</exception>
ResourceUtilities.cs (1)
285catch (InvalidOperationException e)
TaskLoggingHelper.cs (1)
201/// <exception cref="InvalidOperationException">Thrown when the <c>TaskResources</c> property of the owner task is not set.</exception>
ToolTask.cs (3)
801catch (InvalidOperationException) 985catch (InvalidOperationException) 1035catch (InvalidOperationException)
Microsoft.Build.Utilities.UnitTests (9)
MuxLogger_Tests.cs (2)
68Assert.Throws<InvalidOperationException>(() => 306Should.Throw<InvalidOperationException>(() =>
TaskLoggingHelper_Tests.cs (1)
216Should.Throw<InvalidOperationException>(() =>
ToolLocationHelper_Tests.cs (6)
1305Should.Throw<InvalidOperationException>(() => 1326Should.Throw<InvalidOperationException>(() => 1347Should.Throw<InvalidOperationException>(() => 1521Should.Throw<InvalidOperationException>(() => 1583Should.Throw<InvalidOperationException>(() => 1618Should.Throw<InvalidOperationException>(() =>
Microsoft.DotNet.Build.Tasks.Packaging (1)
GetAssemblyReferences.cs (1)
80catch (InvalidOperationException)
Microsoft.DotNet.NuGetRepack.Tests (2)
VersionUpdaterTests.cs (2)
133var e1 = Assert.Throws<InvalidOperationException>(() => NuGetVersionUpdater.Run(new[] { c_daily }, outDirectoryOpt: null, VersionTranslation.Release, exactVersions: false));
Microsoft.Extensions.Caching.SqlServer.Tests (2)
SqlServerCacheWithDatabaseTest.cs (2)
81var exception = await Assert.ThrowsAsync<InvalidOperationException>(() =>
Microsoft.Extensions.Configuration.Abstractions (1)
ConfigurationExtensions.cs (1)
96/// <exception cref="System.InvalidOperationException">There is no section with key <paramref name="key"/>.</exception>
Microsoft.Extensions.Configuration.Binder (1)
BinderOptions.cs (1)
20/// When true, an <see cref="System.InvalidOperationException"/> is thrown with a description
Microsoft.Extensions.Configuration.UserSecrets (6)
UserSecretsConfigurationExtensions.cs (6)
28/// <exception cref="InvalidOperationException">Thrown when the assembly containing <typeparamref name="T"/> does not have <see cref="UserSecretsIdAttribute"/>.</exception> 45/// <exception cref="InvalidOperationException">Thrown when <paramref name="optional"/> is false and the assembly containing <typeparamref name="T"/> does not have a valid <see cref="UserSecretsIdAttribute"/>.</exception> 64/// <exception cref="InvalidOperationException">Thrown when <paramref name="optional"/> is false and the assembly containing <typeparamref name="T"/> does not have a valid <see cref="UserSecretsIdAttribute"/>.</exception> 82/// <exception cref="InvalidOperationException">Thrown when <paramref name="assembly"/> does not have a valid <see cref="UserSecretsIdAttribute"/></exception> 99/// <exception cref="InvalidOperationException">Thrown when <paramref name="optional"/> is false and <paramref name="assembly"/> does not have a valid <see cref="UserSecretsIdAttribute"/>.</exception> 117/// <exception cref="InvalidOperationException">Thrown when <paramref name="optional"/> is false and <paramref name="assembly"/> does not have a valid <see cref="UserSecretsIdAttribute"/>.</exception>
Microsoft.Extensions.DependencyInjection (1)
ServiceProvider.cs (1)
121/// <exception cref="InvalidOperationException"></exception>
Microsoft.Extensions.DependencyInjection.Abstractions (5)
ServiceCollection.cs (1)
108/// After the collection is marked as read-only, any further attempt to modify it throws an <see cref="InvalidOperationException" />.
ServiceProviderKeyedServiceExtensions.cs (2)
41/// <exception cref="System.InvalidOperationException">There is no service of type <paramref name="serviceType"/>.</exception> 62/// <exception cref="System.InvalidOperationException">There is no service of type <typeparamref name="T"/>.</exception>
ServiceProviderServiceExtensions.cs (2)
34/// <exception cref="System.InvalidOperationException">There is no service of type <paramref name="serviceType"/>.</exception> 60/// <exception cref="System.InvalidOperationException">There is no service of type <typeparamref name="T"/>.</exception>
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (5)
DefaultHealthCheckServiceTest.cs (5)
205var thrownException = new InvalidOperationException("Whoops!"); 206var faultedException = new InvalidOperationException("Ohnoes!"); 277var thrownException = new InvalidOperationException("Whoops!"); 278var faultedException = new InvalidOperationException("Ohnoes!"); 688catch (InvalidOperationException e)
Microsoft.Extensions.Features (2)
FeatureCollectionExtensions.cs (2)
16/// Throws an <see cref="InvalidOperationException"/> if the feature is not present. 31/// Throws an <see cref="InvalidOperationException"/> if the feature is not present.
Microsoft.Extensions.Features.Tests (3)
FeatureCollectionExtensionsTests.cs (1)
36Assert.Throws<InvalidOperationException>(() => features.GetRequiredFeature<object>());
FeatureCollectionTests.cs (2)
55var ex = Assert.Throws<InvalidOperationException>(() => interfaces.Get<int>());
Microsoft.Extensions.FileProviders.Embedded.Tests (2)
Manifest\ManifestParserTests.cs (2)
52Assert.Throws<InvalidOperationException>(() => ManifestParser.Parse(assembly)); 63Assert.Throws<InvalidOperationException>(() => ManifestParser.Parse(assembly));
Microsoft.Extensions.FileProviders.Physical (1)
PhysicalDirectoryInfo.cs (1)
64/// <exception cref="InvalidOperationException">Always thrown</exception>
Microsoft.Extensions.Http (1)
HttpMessageHandlerBuilder.cs (1)
78/// <exception cref="InvalidOperationException"><paramref name="additionalHandlers "/> contains a <see langword="null"/> entry.
Microsoft.Extensions.Http.Polly.Tests (4)
PolicyHttpMessageHandlerTest.cs (4)
214var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () => 342var exception = await Assert.ThrowsAsync<InvalidOperationException>(async () =>
Microsoft.Extensions.Logging.Console (1)
ConfigurationConsoleLoggerSettings.cs (1)
76/// <exception cref="InvalidOperationException"></exception>
Microsoft.Interop.SourceGeneration (5)
DiagnosticOr.cs (2)
24/// Throws <see cref="InvalidOperationException"/> if IsValue is false 29/// Throws <see cref="InvalidOperationException"/> if IsDiagnostic is false
GeneratorDiagnosticsBag.cs (2)
93/// <exception cref="InvalidOperationException">The <see cref="IDiagnosticDescriptorProvider"/> did not provide a diagnostic for a fatal diagnostic.</exception> 112/// <exception cref="InvalidOperationException">The <see cref="IDiagnosticDescriptorProvider"/> did not provide a diagnostic for a fatal diagnostic.</exception>
Marshalling\MarshallerHelpers.cs (1)
102/// <exception cref="InvalidOperationException">The graph of <paramref name="elements"/> nodes and the edges produced by <paramref name="getDependentIndicesFn"/> has cycles.</exception>
Microsoft.JSInterop.Tests (6)
DotNetObjectReferenceTest.cs (2)
57var ex = Assert.Throws<InvalidOperationException>(() => jsRuntime2.TrackObjectReference(objRef));
Infrastructure\DotNetDispatcherTest.cs (4)
169var ex = Assert.Throws<InvalidOperationException>(() => 823var ex = Assert.Throws<InvalidOperationException>(() => DotNetDispatcher.ParseArguments(new TestJSRuntime(), method, arguments, new[] { typeof(int), typeof(TestDTO), }));
Microsoft.Net.Http.Headers.Tests (3)
MediaTypeHeaderValueTest.cs (1)
149Assert.Throws<InvalidOperationException>(() => { mediaType1.MediaType = "some/value"; });
NameValueHeaderValueTest.cs (2)
89Assert.Throws<InvalidOperationException>(() => { pair1.Value = "othervalue"; }); 122Assert.Throws<InvalidOperationException>(() => { pair1.Value = "othervalue"; });
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\CompilerServices\ExceptionUtils.vb (1)
372ByVal ResourceID As String, ByVal ParamArray PlaceHolders() As String) As InvalidOperationException
MSBuild (3)
ExceptionHandling.cs (1)
314|| e is InvalidOperationException
NodeEndpointOutOfProcBase.cs (1)
457catch (InvalidOperationException)
ResourceUtilities.cs (1)
285catch (InvalidOperationException e)
MSBuildTaskHost (3)
ExceptionHandling.cs (1)
314|| e is InvalidOperationException
NodeEndpointOutOfProcBase.cs (1)
457catch (InvalidOperationException)
ResourceUtilities.cs (1)
285catch (InvalidOperationException e)
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
306[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.InvalidOperationException))]
netstandard (1)
netstandard.cs (1)
882[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.InvalidOperationException))]
PresentationCore (52)
MS\Internal\FontCache\FamilyCollection.cs (1)
178catch (InvalidOperationException)
MS\Internal\Ink\InkSerializedFormat\DrawingAttributeSerializer.cs (1)
291catch (InvalidOperationException) // Matrix.Parse failed.
MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (1)
149catch (InvalidOperationException ex)
MS\Internal\Media3D\GeneralTransform2DTo3DTo2D.cs (1)
292catch (InvalidOperationException)
System\Windows\Duration.cs (1)
394/// <exception cref="System.InvalidOperationException">Thrown if this Duration represents null.</exception>
System\Windows\FreezableCollection.cs (1)
955/// <exception cref="InvalidOperationException"> raised when changing the collection
System\Windows\Input\Stylus\Common\StylusPlugInCollection.cs (1)
275catch (System.InvalidOperationException)
System\Windows\Input\Stylus\Wisp\WispLogic.cs (1)
3012InvalidOperationException ioe = new InvalidOperationException();
System\Windows\Input\Stylus\Wisp\WispTabletDeviceCollection.cs (2)
340catch (InvalidOperationException ex) 474catch (InvalidOperationException ex)
System\Windows\InterOp\HwndTarget.cs (1)
76/// thread than it was created will throw a <see cref="System.InvalidOperationException"/>.
System\Windows\LayoutManager.cs (3)
609catch(InvalidOperationException) //this will happen if element is being resurrected after finalization 712catch(InvalidOperationException) //this will happen if element is being resurrected after finalization 766catch(InvalidOperationException) //this will happen if element is being resurrected after finalization
System\Windows\Markup\XmlLanguage.cs (3)
178/// <exception cref="InvalidOperationException"> 218/// <exception cref="InvalidOperationException"> 652catch (InvalidOperationException)
System\Windows\Media\Animation\Generated\BooleanAnimationUsingKeyFrames.cs (1)
283/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\ByteAnimationUsingKeyFrames.cs (1)
283/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\CharAnimationUsingKeyFrames.cs (1)
283/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\ColorAnimationUsingKeyFrames.cs (1)
283/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\DecimalAnimationUsingKeyFrames.cs (1)
283/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\DoubleAnimationUsingKeyFrames.cs (1)
283/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\Int16AnimationUsingKeyFrames.cs (1)
283/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\Int32AnimationUsingKeyFrames.cs (1)
283/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\Int64AnimationUsingKeyFrames.cs (1)
283/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\MatrixAnimationUsingKeyFrames.cs (1)
283/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\ObjectAnimationUsingKeyFrames.cs (1)
283/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\Point3DAnimationUsingKeyFrames.cs (1)
283/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\PointAnimationUsingKeyFrames.cs (1)
283/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\QuaternionAnimationUsingKeyFrames.cs (1)
283/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\RectAnimationUsingKeyFrames.cs (1)
283/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\Rotation3DAnimationUsingKeyFrames.cs (1)
283/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\SingleAnimationUsingKeyFrames.cs (1)
283/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\SizeAnimationUsingKeyFrames.cs (1)
283/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\StringAnimationUsingKeyFrames.cs (1)
283/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\Vector3DAnimationUsingKeyFrames.cs (1)
283/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\Generated\VectorAnimationUsingKeyFrames.cs (1)
283/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\Animation\KeyTime.cs (2)
237/// <exception cref="System.InvalidOperationException"> 259/// <exception cref="System.InvalidOperationException">
System\Windows\Media\Animation\RepeatBehavior.cs (2)
127/// <exception cref="System.InvalidOperationException">Thrown if this RepeatBehavior does not represent an iteration count.</exception> 146/// <exception cref="System.InvalidOperationException">Thrown if this RepeatBehavior does not represent a repeat duration.</exception>
System\Windows\Media\Animation\TimelineGroup.cs (1)
205/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Media\MediaPlayerState.cs (1)
845catch (InvalidOperationException)
System\Windows\Media\Visual.cs (4)
4324/// <exception cref="InvalidOperationException">If the Visuals are not connected.</exception> 4345/// <exception cref="InvalidOperationException">If the Visuals are not connected.</exception> 4364/// <exception cref="InvalidOperationException">If the Visuals are not connected.</exception> 4381/// <exception cref="InvalidOperationException">If the Visuals are not connected.</exception>
System\Windows\Media3D\Matrix3D.cs (1)
659/// <exception cref="InvalidOperationException">
System\Windows\Media3D\Visual3D.cs (3)
1621/// <exception cref="InvalidOperationException">If the Visual3Ds are not connected.</exception> 1642/// <exception cref="InvalidOperationException">If the Visual3Ds are not connected.</exception> 1789/// <exception cref="InvalidOperationException">If the Visual3D and Visual are not connected.</exception>
PresentationFramework (126)
Microsoft\Win32\FileDialog.cs (1)
712/// <exception cref="System.InvalidOperationException">
Microsoft\Win32\OpenFileDialog.cs (2)
66/// <exception cref="System.InvalidOperationException"> 90/// <exception cref="System.InvalidOperationException">
Microsoft\Win32\SaveFileDialog.cs (1)
65/// <exception cref="System.InvalidOperationException">
MS\Internal\AnimatedTypeHelpers.cs (1)
30/// <exception cref="System.InvalidOperationException">
MS\Internal\Annotations\Anchoring\LocatorManager.cs (1)
899/// <exception cref="InvalidOperationException">if a locator set is resolved and the individual selections
MS\Internal\AppModel\INavigator.cs (3)
121///<exception cref="System.InvalidOperationException"> 242///<exception cref="System.InvalidOperationException"> 252///<exception cref="System.InvalidOperationException">
MS\Internal\Controls\InnerItemCollectionView.cs (1)
226/// <exception cref="InvalidOperationException">
MS\Internal\Data\EnumerableCollectionView.cs (1)
574catch (InvalidOperationException)
MS\Internal\Data\IndexedEnumerable.cs (2)
403catch (InvalidOperationException) 428catch (InvalidOperationException)
MS\Internal\Documents\DocumentViewerHelper.cs (1)
255catch (InvalidOperationException)
MS\Internal\Documents\ParentUndoUnit.cs (3)
109/// <exception cref="InvalidOperationException"> 218/// <exception cref="InvalidOperationException"> 263/// <exception cref="InvalidOperationException">
MS\Internal\Documents\UndoManager.cs (7)
188/// <exception cref="InvalidOperationException"> 235/// <exception cref="InvalidOperationException"> 313/// <exception cref="InvalidOperationException"> 404/// <exception cref="InvalidOperationException"> 478/// <exception cref="InvalidOperationException"> 503/// <exception cref="InvalidOperationException"> 568/// <exception cref="InvalidOperationException">
MS\Internal\Text\DynamicPropertyReader.cs (1)
313catch (InvalidOperationException)
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IEnumerable.cs (1)
380catch (InvalidOperationException)
System\Windows\Annotations\AnnotationHelper.cs (4)
56/// <exception cref="InvalidOperationException">selection is of zero length</exception> 86/// <exception cref="InvalidOperationException">selection is of zero length</exception> 102/// <exception cref="InvalidOperationException">selection is of zero length</exception> 892/// <exception cref="InvalidOperationException">selection is of zero length</exception>
System\Windows\Annotations\AnnotationService.cs (8)
168/// <exception cref="InvalidOperationException">DocumentViewerBase has content which is neither 170/// <exception cref="InvalidOperationException">this service or another service is already 233/// <exception cref="InvalidOperationException">service isn't enabled</exception> 355/// <exception cref="InvalidOperationException">service is not enabled</exception> 395/// <exception cref="InvalidOperationException">service is not enabled</exception> 435/// <exception cref="InvalidOperationException">service is not enabled</exception> 876/// <exception cref="InvalidOperationException">service is not enabled</exception> 1061/// <exception cref="InvalidOperationException">Other Instance of AnnotationService Is Already Set</exception>
System\Windows\Annotations\Storage\XmlStreamStore.cs (5)
126/// <exception cref="InvalidOperationException">if no stream has been set on the store</exception> 172/// <exception cref="InvalidOperationException">if no stream has been set on the store</exception> 237/// <exception cref="InvalidOperationException">the stream is null</exception> 365/// <exception cref="InvalidOperationException">if no stream has been set on the store</exception> 549/// <exception cref="InvalidOperationException">if no stream has been set on the store</exception>
System\Windows\Controls\DataGrid.cs (2)
7156catch (InvalidOperationException invalidOperationException) 7251catch (InvalidOperationException invalidOperationException)
System\Windows\Controls\Frame.cs (5)
859/// <exception cref="InvalidOperationException"> The frame doesn't own a journal. </exception> 932/// <exception cref="InvalidOperationException"> The frame doesn't own a journal. </exception> 933/// <exception cref="InvalidOperationException"> There is no forward journal entry to go to. </exception> 946/// <exception cref="InvalidOperationException"> The frame doesn't own a journal. </exception> 947/// <exception cref="InvalidOperationException"> There is no back journal entry to go to. </exception>
System\Windows\Controls\ItemCollection.cs (6)
228/// <exception cref="InvalidOperationException"> 245/// <exception cref="InvalidOperationException"> 371/// <exception cref="InvalidOperationException"> 389/// <exception cref="InvalidOperationException"> 413/// <exception cref="InvalidOperationException"> 516/// <exception cref="InvalidOperationException">
System\Windows\Controls\RichTextBox.cs (1)
202/// <exception cref="System.InvalidOperationException">
System\Windows\Controls\TextAdaptor.cs (2)
389catch (InvalidOperationException) 430catch (InvalidOperationException)
System\Windows\Controls\TextBlock.cs (1)
388/// <exception cref="System.InvalidOperationException">
System\Windows\Controls\TextSearch.cs (1)
826catch (InvalidOperationException)
System\Windows\Data\BindingExpression.cs (1)
2398catch (InvalidOperationException)
System\Windows\Data\BindingGroup.cs (1)
446/// <exception cref="InvalidOperationException">
System\Windows\Data\CollectionView.cs (2)
1008/// <exception cref="InvalidOperationException"> 1025/// <exception cref="InvalidOperationException">
System\Windows\Data\CollectionViewSource.cs (1)
837catch (InvalidOperationException)
System\Windows\Data\RelativeSource.cs (3)
142/// <exception cref="InvalidOperationException"> RelativeSource Mode is immutable after initialization; 164/// <exception cref="InvalidOperationException"> RelativeSource is not in FindAncestor mode </exception> 203/// <exception cref="InvalidOperationException"> RelativeSource is not in FindAncestor mode </exception>
System\Windows\Documents\DocumentSequenceTextView.cs (9)
73/// <exception cref="System.InvalidOperationException"> 114/// <exception cref="System.InvalidOperationException"> 201/// <exception cref="System.InvalidOperationException"> 249/// <exception cref="System.InvalidOperationException"> 287/// <exception cref="System.InvalidOperationException"> 327/// <exception cref="System.InvalidOperationException"> 353/// <exception cref="System.InvalidOperationException"> 399/// <exception cref="System.InvalidOperationException"> 426/// <exception cref="System.InvalidOperationException">
System\Windows\Documents\FixedDocument.cs (3)
133/// <exception cref="InvalidOperationException">A PageContent cannot be added while previous partial page isn't completely Loaded.</exception> 676if (e is InvalidOperationException || e is ApplicationException) 963if (!(e is System.Net.WebException || e is System.InvalidOperationException))
System\Windows\Documents\FixedTextView.cs (8)
69/// <exception cref="System.InvalidOperationException"> 145/// <exception cref="System.InvalidOperationException"> 332/// <exception cref="System.InvalidOperationException"> 433/// <exception cref="System.InvalidOperationException"> 495/// <exception cref="System.InvalidOperationException"> 564/// <exception cref="System.InvalidOperationException"> 583/// <exception cref="System.InvalidOperationException"> 641/// <exception cref="System.InvalidOperationException">
System\Windows\Documents\ITextView.cs (10)
49/// <exception cref="System.InvalidOperationException"> 73/// <exception cref="System.InvalidOperationException"> 110/// <exception cref="System.InvalidOperationException"> 170/// <exception cref="System.InvalidOperationException"> 216/// <exception cref="System.InvalidOperationException"> 248/// <exception cref="System.InvalidOperationException"> 287/// <exception cref="System.InvalidOperationException"> 313/// <exception cref="System.InvalidOperationException"> 342/// <exception cref="System.InvalidOperationException"> 371/// <exception cref="System.InvalidOperationException">
System\Windows\Documents\PageContent.cs (1)
176/// <exception cref="InvalidOperationException">A child already exists (a PageContent can have at most one child).</exception>
System\Windows\Documents\PageContentCollection.cs (1)
54/// <exception cref="InvalidOperationException">
System\Windows\Documents\Speller.cs (1)
1550catch (InvalidOperationException)
System\Windows\Documents\TextContainer.cs (2)
209/// <exception cref="System.InvalidOperationException"> 250/// <exception cref="System.InvalidOperationException">
System\Windows\Documents\TextPointer.cs (11)
1144/// <exception cref="System.InvalidOperationException"> 1382/// <exception cref="InvalidOperationException"> 1414/// <exception cref="InvalidOperationException"> 1582/// <exception cref="System.InvalidOperationException"> 1850/// <exception cref="System.InvalidOperationException"> 1876/// <exception cref="System.InvalidOperationException"> 1950/// <exception cref="System.InvalidOperationException"> 2016/// <exception cref="System.InvalidOperationException"> 2050/// <exception cref="System.InvalidOperationException"> 2094/// <exception cref="System.InvalidOperationException"> 2182/// <exception cref="InvalidOperationException">
System\Windows\Documents\TextStore.cs (2)
4247catch (InvalidOperationException) 4262catch (InvalidOperationException)
System\Windows\Documents\WinRTSpellerInterop.cs (3)
135catch (InvalidOperationException) 667catch(InvalidOperationException) 723/// <exception cref="InvalidOperationException">
System\Windows\Markup\Primitives\ElementMarkupObject.cs (1)
376catch (InvalidOperationException)
System\Windows\Media\Animation\Generated\ThicknessAnimationUsingKeyFrames.cs (1)
282/// <exception cref="InvalidOperationException">Timelines have no way
System\Windows\Navigation\NavigationService.cs (1)
3102/// <exception cref="System.InvalidOperationException">
System\Windows\Navigation\NavigationWindow.cs (2)
329/// <exception cref="System.InvalidOperationException"> 341/// <exception cref="System.InvalidOperationException">
System\Windows\Standard\Verify.cs (1)
37/// <exception cref="InvalidOperationException">
PresentationFramework-SystemCore (1)
DynamicAccessorImpl.cs (1)
237typeof(InvalidOperationException).GetConstructor(new Type[] { typeof(string) }),
PresentationUI (5)
MS\Internal\Documents\Application\DocumentStream.cs (3)
498/// <exception cref="System.InvalidOperationException"/> 965/// <exception cref="System.InvalidOperationException"/> 984/// <exception cref="System.InvalidOperationException"/>
MS\Internal\Documents\Application\PackageController.cs (1)
107/// <exception cref="System.InvalidOperationException"/>
MS\Internal\Documents\Application\TransactionalPackage.cs (1)
495/// <exception cref="System.InvalidOperationException" />
Sockets.BindTests (4)
src\Servers\Kestrel\test\BindTests\AddressRegistrationTests.cs (4)
744IgnoredCriticalLogExceptions.Add(typeof(InvalidOperationException)); 758Assert.Throws<InvalidOperationException>(() => host.Start()); 769IgnoredCriticalLogExceptions.Add(typeof(InvalidOperationException)); 783Assert.Throws<InvalidOperationException>(() => host.Start());
System.Collections (4)
System\Collections\BitArray.cs (1)
1170private InvalidOperationException GetInvalidOperationException(int index)
System\Collections\Generic\PriorityQueue.cs (3)
222/// <exception cref="InvalidOperationException">The <see cref="PriorityQueue{TElement, TPriority}"/> is empty.</exception> 237/// <exception cref="InvalidOperationException">The queue is empty.</exception> 256/// <exception cref="InvalidOperationException">The queue is empty.</exception>
System.Collections.Concurrent (36)
System\Collections\Concurrent\BlockingCollection.cs (32)
239/// <exception cref="System.InvalidOperationException">The <see 244/// <exception cref="System.InvalidOperationException">The underlying collection didn't accept the item.</exception> 269/// <exception cref="System.InvalidOperationException">The <see 274/// <exception cref="System.InvalidOperationException">The underlying collection didn't accept the item.</exception> 296/// <exception cref="System.InvalidOperationException">The <see 301/// <exception cref="System.InvalidOperationException">The underlying collection didn't accept the item.</exception> 316/// <exception cref="System.InvalidOperationException">The <see 324/// <exception cref="System.InvalidOperationException">The underlying collection didn't accept the item.</exception> 339/// <exception cref="System.InvalidOperationException">The <see 346/// <exception cref="System.InvalidOperationException">The underlying collection didn't accept the item.</exception> 365/// <exception cref="System.InvalidOperationException">The <see 372/// <exception cref="System.InvalidOperationException">The underlying collection didn't accept the item.</exception> 390/// <exception cref="System.InvalidOperationException">the collection has already been marked 393/// <exception cref="System.InvalidOperationException">The underlying collection didn't accept the item.</exception> 503/// <exception cref="System.InvalidOperationException">The underlying collection was modified 527/// <exception cref="System.InvalidOperationException">The underlying collection was modified 552/// <exception cref="System.InvalidOperationException">The underlying collection was modified 574/// <exception cref="System.InvalidOperationException">The underlying collection was modified 595/// <exception cref="System.InvalidOperationException">The underlying collection was modified 620/// <exception cref="System.InvalidOperationException">The underlying collection was modified 749/// <exception cref="System.InvalidOperationException">At least one underlying collection didn't accept the item.</exception> 791/// <exception cref="System.InvalidOperationException">At least one underlying collection didn't accept the item.</exception> 830/// <exception cref="System.InvalidOperationException">At least one underlying collection didn't accept the item.</exception> 859/// <exception cref="System.InvalidOperationException">At least one underlying collection didn't accept the item.</exception> 886/// <exception cref="System.InvalidOperationException">At least one underlying collection didn't accept the item.</exception> 918/// <exception cref="System.InvalidOperationException">At least one underlying collection didn't accept the item.</exception> 1130/// <exception cref="System.InvalidOperationException">At least one of the underlying collections was modified 1159/// <exception cref="System.InvalidOperationException">At least one of the underlying collections was modified 1187/// <exception cref="System.InvalidOperationException">At least one of the underlying collections was modified 1218/// <exception cref="System.InvalidOperationException">At least one of the underlying collections was modified 1248/// <exception cref="System.InvalidOperationException">At least one of the underlying collections was modified 1282/// <exception cref="System.InvalidOperationException">At least one of the underlying collections was modified
System\Collections\Concurrent\OrderablePartitioner.cs (2)
41/// cref="System.InvalidOperationException"/>.</li> 45/// <see cref="System.InvalidOperationException"/>.</li>
System\Collections\Concurrent\Partitioner.cs (2)
33/// cref="System.InvalidOperationException"/>.</li> 36/// <see cref="System.InvalidOperationException"/>.</li>
System.Collections.Immutable (55)
System\Collections\Immutable\IImmutableListQueries.cs (3)
272/// <exception cref="InvalidOperationException"> 294/// <exception cref="InvalidOperationException"> 325/// <exception cref="InvalidOperationException">
System\Collections\Immutable\IImmutableQueue.cs (2)
35/// <exception cref="InvalidOperationException">Thrown when the queue is empty.</exception> 51/// <exception cref="InvalidOperationException">Thrown when the queue is empty.</exception>
System\Collections\Immutable\IImmutableStack.cs (2)
40/// <exception cref="InvalidOperationException">Thrown when the stack is empty.</exception> 46/// <exception cref="InvalidOperationException">Thrown when the stack is empty.</exception>
System\Collections\Immutable\ImmutableArray.cs (4)
459/// <exception cref="InvalidOperationException"> 489/// <exception cref="InvalidOperationException"> 517/// <exception cref="InvalidOperationException"> 556/// <exception cref="InvalidOperationException">
System\Collections\Immutable\ImmutableArray_1.Builder.cs (1)
201/// <exception cref="InvalidOperationException">When <see cref="ImmutableArray{T}.Builder.Count"/> doesn't
System\Collections\Immutable\ImmutableArray_1.cs (6)
23/// <exception cref="InvalidOperationException">Thrown if the <see cref="IsDefault"/> property returns true.</exception> 50/// <exception cref="InvalidOperationException">Thrown if the <see cref="IsDefault"/> property returns true.</exception> 65/// <exception cref="InvalidOperationException">Thrown if the <see cref="IsDefault"/> property returns true.</exception> 84/// <exception cref="InvalidOperationException">Thrown if the <see cref="IsDefault"/> property returns true.</exception> 1291/// <exception cref="InvalidOperationException">Thrown if the <see cref="IsDefault"/> property returns true.</exception> 1354/// <exception cref="InvalidOperationException">Thrown if the <see cref="IsDefault"/> property returns true.</exception>
System\Collections\Immutable\ImmutableArray_1.Minimal.cs (4)
386/// <exception cref="InvalidOperationException">Thrown if the <see cref="IsDefault"/> property returns true.</exception> 398/// <exception cref="InvalidOperationException">Thrown if the <see cref="IsDefault"/> property returns true.</exception> 423/// Throws an <see cref="InvalidOperationException"/> if the <see cref="array"/> field is null, i.e. the 425/// <see cref="InvalidOperationException"/> message specifies that the operation cannot be performed
System\Collections\Immutable\ImmutableDictionary_2.Enumerator.cs (3)
77/// <exception cref="InvalidOperationException">The collection was modified after the enumerator was created. </exception> 99/// <exception cref="InvalidOperationException">The collection was modified after the enumerator was created. </exception> 122/// <exception cref="System.InvalidOperationException">Thrown if the collection has changed.</exception>
System\Collections\Immutable\ImmutableDictionary_2.HashBucket.cs (2)
420/// <exception cref="InvalidOperationException">The collection was modified after the enumerator was created. </exception> 456/// <exception cref="InvalidOperationException">The collection was modified after the enumerator was created. </exception>
System\Collections\Immutable\ImmutableHashSet_1.Enumerator.cs (3)
77/// <exception cref="InvalidOperationException">The collection was modified after the enumerator was created. </exception> 99/// <exception cref="InvalidOperationException">The collection was modified after the enumerator was created. </exception> 122/// <exception cref="System.InvalidOperationException">Thrown if the collection has changed.</exception>
System\Collections\Immutable\ImmutableHashSet_1.HashBucket.cs (2)
342/// <exception cref="InvalidOperationException">The collection was modified after the enumerator was created. </exception> 379/// <exception cref="InvalidOperationException">The collection was modified after the enumerator was created. </exception>
System\Collections\Immutable\ImmutableList_1.Builder.cs (3)
945/// <exception cref="InvalidOperationException"> 970/// <exception cref="InvalidOperationException"> 1004/// <exception cref="InvalidOperationException">
System\Collections\Immutable\ImmutableList_1.cs (3)
64/// <exception cref="InvalidOperationException"> 86/// <exception cref="InvalidOperationException"> 117/// <exception cref="InvalidOperationException">
System\Collections\Immutable\ImmutableList_1.Enumerator.cs (1)
257/// <exception cref="System.InvalidOperationException">Thrown if the collection has changed.</exception>
System\Collections\Immutable\ImmutableList_1.Node.cs (1)
666/// <exception cref="InvalidOperationException">
System\Collections\Immutable\ImmutableQueue.cs (1)
110/// <exception cref="InvalidOperationException">Thrown when the stack is empty.</exception>
System\Collections\Immutable\ImmutableQueue_1.cs (5)
124/// <exception cref="InvalidOperationException">Thrown when the queue is empty.</exception> 138/// <exception cref="InvalidOperationException">Thrown when the queue is empty.</exception> 184/// <exception cref="InvalidOperationException">Thrown when the queue is empty.</exception> 212/// <exception cref="InvalidOperationException">Thrown when the queue is empty.</exception> 223/// <exception cref="InvalidOperationException">Thrown when the queue is empty.</exception>
System\Collections\Immutable\ImmutableSortedDictionary_2.Enumerator.cs (1)
194/// <exception cref="System.InvalidOperationException">Thrown if the collection has changed.</exception>
System\Collections\Immutable\ImmutableSortedSet_1.Enumerator.cs (1)
200/// <exception cref="System.InvalidOperationException">Thrown if the collection has changed.</exception>
System\Collections\Immutable\ImmutableStack.cs (1)
93/// <exception cref="InvalidOperationException">Thrown when the stack is empty.</exception>
System\Collections\Immutable\ImmutableStack_1.cs (4)
106/// <exception cref="InvalidOperationException">Thrown when the stack is empty.</exception> 123/// <exception cref="InvalidOperationException">Thrown when the stack is empty.</exception> 158/// <exception cref="InvalidOperationException">Thrown when the stack is empty.</exception> 187/// <exception cref="InvalidOperationException">Thrown when the stack is empty.</exception>
System\Linq\ImmutableArrayExtensions.cs (2)
636/// <exception cref="InvalidOperationException">Thrown if the collection is empty.</exception> 662/// <exception cref="InvalidOperationException">Thrown if the collection is empty.</exception>
System.ComponentModel.Annotations (38)
System\ComponentModel\DataAnnotations\CustomValidationAttribute.cs (2)
136/// <exception cref="InvalidOperationException"> is thrown if the current attribute is malformed.</exception> 192/// <exception cref="InvalidOperationException"> is thrown if the current attribute is malformed.</exception>
System\ComponentModel\DataAnnotations\DataTypeAttribute.cs (3)
82/// <exception cref="InvalidOperationException"> is thrown if the current attribute is ill-formed.</exception> 103/// <exception cref="InvalidOperationException"> is thrown if the current attribute is ill-formed.</exception> 114/// <exception cref="InvalidOperationException"> is thrown if the current attribute is ill-formed.</exception>
System\ComponentModel\DataAnnotations\DisplayAttribute.cs (8)
201/// <exception cref="System.InvalidOperationException"> 230/// <exception cref="System.InvalidOperationException"> 258/// <exception cref="System.InvalidOperationException"> 300/// <exception cref="System.InvalidOperationException"> 327/// <exception cref="System.InvalidOperationException"> 350/// <exception cref="System.InvalidOperationException"> 373/// <exception cref="System.InvalidOperationException"> 396/// <exception cref="System.InvalidOperationException">
System\ComponentModel\DataAnnotations\DisplayFormatAttribute.cs (1)
103/// <exception cref="InvalidOperationException">
System\ComponentModel\DataAnnotations\FilterUIHintAttribute.cs (1)
33/// <exception cref="InvalidOperationException"> is thrown if the current attribute
System\ComponentModel\DataAnnotations\LengthAttribute.cs (2)
45/// <exception cref="InvalidOperationException"> 85/// <exception cref="InvalidOperationException">Length is less than zero.</exception>
System\ComponentModel\DataAnnotations\LocalizableString.cs (1)
104/// <exception cref="System.InvalidOperationException">
System\ComponentModel\DataAnnotations\MaxLengthAttribute.cs (2)
64/// <exception cref="InvalidOperationException">Length is zero or less than negative one.</exception> 102/// <exception cref="InvalidOperationException">Length is zero or less than negative one.</exception>
System\ComponentModel\DataAnnotations\MinLengthAttribute.cs (2)
47/// <exception cref="InvalidOperationException">Length is less than zero.</exception> 85/// <exception cref="InvalidOperationException">Length is less than zero.</exception>
System\ComponentModel\DataAnnotations\RangeAttribute.cs (2)
130/// <exception cref="InvalidOperationException"> is thrown if the current attribute is ill-formed.</exception> 174/// <exception cref="InvalidOperationException"> is thrown if the current attribute is ill-formed.</exception>
System\ComponentModel\DataAnnotations\RegularExpressionAttribute.cs (3)
54/// <exception cref="InvalidOperationException"> is thrown if the current attribute is ill-formed.</exception> 85/// <exception cref="InvalidOperationException"> is thrown if the current attribute is ill-formed.</exception> 99/// <exception cref="InvalidOperationException"> is thrown if the current attribute is ill-formed.</exception>
System\ComponentModel\DataAnnotations\StringLengthAttribute.cs (2)
44/// <exception cref="InvalidOperationException"> is thrown if the current attribute is ill-formed.</exception> 66/// <exception cref="InvalidOperationException"> is thrown if the current attribute is ill-formed.</exception>
System\ComponentModel\DataAnnotations\UIHintAttribute.cs (2)
64/// <exception cref="InvalidOperationException"> is thrown if the current attribute is ill-formed.</exception> 141catch (InvalidOperationException)
System\ComponentModel\DataAnnotations\ValidationAttribute.cs (7)
220/// <exception cref="InvalidOperationException"> is thrown if the current attribute is malformed.</exception> 329/// <exception cref="InvalidOperationException"> is thrown if the current attribute is malformed.</exception> 347/// <exception cref="InvalidOperationException"> is thrown if the current attribute is malformed.</exception> 384/// <exception cref="InvalidOperationException"> is thrown if the current attribute is malformed.</exception> 424/// <exception cref="InvalidOperationException"> is thrown if the current attribute is malformed.</exception> 467/// <exception cref="InvalidOperationException"> is thrown if the current attribute is malformed.</exception> 492/// <exception cref="InvalidOperationException"> is thrown if the current attribute is malformed.</exception>
System.ComponentModel.Composition (9)
System\ComponentModel\Composition\Hosting\CatalogExportProvider.cs (1)
134/// <exception cref="InvalidOperationException">
System\ComponentModel\Composition\Hosting\ComposablePartExportProvider.cs (1)
111/// <exception cref="InvalidOperationException">
System\ComponentModel\Composition\Hosting\ExportProvider.GetExportOverrides.cs (5)
154/// <exception cref="InvalidOperationException"> 205/// <exception cref="InvalidOperationException"> 255/// <exception cref="InvalidOperationException"> 380/// <exception cref="InvalidOperationException"> 422/// <exception cref="InvalidOperationException">
System\ComponentModel\Composition\Primitives\ComposablePart.cs (2)
147/// <exception cref="InvalidOperationException"> 196/// <exception cref="InvalidOperationException">
System.Data.Common (40)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (4)
112internal static InvalidOperationException InvalidOperation(string error) 114InvalidOperationException e = new InvalidOperationException(error); 193internal static InvalidOperationException DataAdapter(string error) 198private static InvalidOperationException Provider(string error)
System\Data\Common\AdapterUtil.Common.cs (28)
292internal static InvalidOperationException MissingSelectCommand(string method) 300private static InvalidOperationException DataMapping(string error) 306internal static InvalidOperationException ColumnSchemaExpression(string? srcColumn, string cacheColumn) 312internal static InvalidOperationException ColumnSchemaMismatch(string? srcColumn, Type srcType, DataColumn column) 318internal static InvalidOperationException ColumnSchemaMissing(string cacheColumn, string tableName, string? srcColumn) 328internal static InvalidOperationException MissingColumnMapping(string srcColumn) 334internal static InvalidOperationException MissingTableSchema(string cacheTable, string srcTable) 340internal static InvalidOperationException MissingTableMapping(string srcTable) 346internal static InvalidOperationException MissingTableMappingDestination(string dstTable) 435internal static InvalidOperationException UpdateConnectionRequired(StatementType statementType, bool isRowUpdatingCommand) 470internal static InvalidOperationException ConnectionRequired_Res(string method) => 473internal static InvalidOperationException UpdateOpenConnectionRequired(StatementType statementType, bool isRowUpdatingCommand, ConnectionState state) 547internal static InvalidOperationException MissingDataReaderFieldType(int index) 551internal static InvalidOperationException OnlyOneTableForStartRecordOrMaxRecords() 562internal static InvalidOperationException UpdateRequiresSourceTable(string defaultSrcTableName) 566internal static InvalidOperationException UpdateRequiresSourceTableName(string srcTable) 603internal static InvalidOperationException UpdateRequiresCommand(StatementType statementType, bool isRowUpdatingCommand) 649internal static InvalidOperationException ResultsNotAllowedDuringBatch() 657internal static InvalidOperationException DynamicSQLJoinUnsupported() 661internal static InvalidOperationException DynamicSQLNoTableInfo() 665internal static InvalidOperationException DynamicSQLNoKeyInfoDelete() 669internal static InvalidOperationException DynamicSQLNoKeyInfoUpdate() 673internal static InvalidOperationException DynamicSQLNoKeyInfoRowVersionDelete() 677internal static InvalidOperationException DynamicSQLNoKeyInfoRowVersionUpdate() 681internal static InvalidOperationException DynamicSQLNestedQuote(string name, string quote) 685internal static InvalidOperationException NoQuoteChange() 689internal static InvalidOperationException MissingSourceCommand() 693internal static InvalidOperationException MissingSourceCommandConnection()
System\Data\Common\DataStorage.cs (2)
561/// <exception cref="InvalidOperationException">when type implements IDynamicMetaObjectProvider and not IXmlSerializable</exception> 588/// <exception cref="InvalidOperationException">when type implements IDynamicMetaObjectProvider and not IXmlSerializable</exception>
System\Data\Common\DbDataReader.cs (1)
85/// <exception cref="InvalidOperationException">The <see cref="DbDataReader" /> is closed.</exception>
System\Data\Common\ObjectStorage.cs (1)
556/// <exception cref="InvalidOperationException">DataSet will not serialize types that implement IDynamicMetaObjectProvider but do not also implement IXmlSerializable</exception>
System\Data\DataSetUtil.cs (1)
38internal static InvalidOperationException InvalidOperation(string message)
System\Data\DataTableExtensions.cs (2)
36/// <exception cref="InvalidOperationException">if source is empty</exception> 74/// <exception cref="InvalidOperationException">if source DataRow is in Deleted or Detached state</exception>
System\Data\TypeLimiter.cs (1)
52/// <exception cref="InvalidOperationException">
System.Diagnostics.Process (3)
System\Diagnostics\Process.cs (2)
835/// <exception cref="InvalidOperationException"> 1522catch (InvalidOperationException)
System\Diagnostics\Process.NonUap.cs (1)
106e is InvalidOperationException || e is Win32Exception;
System.Formats.Asn1 (10)
System\Formats\Asn1\AsnWriter.cs (7)
97/// <exception cref="InvalidOperationException"> 123/// <exception cref="InvalidOperationException"> 158/// <exception cref="InvalidOperationException"> 181/// <exception cref="InvalidOperationException"> 227/// <exception cref="InvalidOperationException"> 247/// <exception cref="InvalidOperationException"> 391/// <exception cref="InvalidOperationException">
System\Formats\Asn1\AsnWriter.OctetString.cs (1)
53/// <exception cref="InvalidOperationException">
System\Formats\Asn1\AsnWriter.Sequence.cs (1)
43/// <exception cref="InvalidOperationException">
System\Formats\Asn1\AsnWriter.SetOf.cs (1)
51/// <exception cref="InvalidOperationException">
System.Formats.Cbor (65)
System\Formats\Cbor\Reader\CborReader.Array.cs (2)
10/// <exception cref="InvalidOperationException">The next data item does not have the correct major type.</exception> 43/// <exception cref="InvalidOperationException"><para>The current context is not an array.</para>
System\Formats\Cbor\Reader\CborReader.Integer.cs (5)
14/// <exception cref="InvalidOperationException">The next data item does not have the correct major type.</exception> 31/// <exception cref="InvalidOperationException">The next data item does not have the correct major type.</exception> 49/// <exception cref="InvalidOperationException">The next data item does not have the correct major type.</exception> 66/// <exception cref="InvalidOperationException">The next data item does not have the correct major type.</exception> 84/// <exception cref="InvalidOperationException">The next data item does not have the correct major type.</exception>
System\Formats\Cbor\Reader\CborReader.Map.cs (2)
16/// <exception cref="InvalidOperationException">The next data item does not have the correct major type.</exception> 67/// <exception cref="InvalidOperationException"><para>The current context is not a map.</para>
System\Formats\Cbor\Reader\CborReader.Simple.cs (5)
12/// <exception cref="InvalidOperationException"><para>The next data item does not have the correct major type.</para> 55/// <exception cref="InvalidOperationException"><para>The next data item does not have the correct major type.</para> 99/// <exception cref="InvalidOperationException"><para>The next data item does not have the correct major type.</para> 124/// <exception cref="InvalidOperationException"><para>The next data item does not have the correct major type.</para> 149/// <exception cref="InvalidOperationException"><para>The next data item does not have the correct major type.</para>
System\Formats\Cbor\Reader\CborReader.Simple.netcoreapp.cs (1)
12/// <exception cref="InvalidOperationException"><para>The next data item does not have the correct major type.</para>
System\Formats\Cbor\Reader\CborReader.SkipValue.cs (2)
12/// <exception cref="InvalidOperationException">The reader is not at the start of new value.</exception> 25/// <exception cref="InvalidOperationException">The reader is at the root context</exception>
System\Formats\Cbor\Reader\CborReader.String.cs (10)
20/// <exception cref="InvalidOperationException">The next date item does not have the correct major type.</exception> 55/// <exception cref="InvalidOperationException">The next data item does not have the correct major type.</exception> 96/// <exception cref="InvalidOperationException"><para>The next data item does not have the correct major type.</para> 124/// <exception cref="InvalidOperationException"><para>The next data item does not have the correct major type.</para> 151/// <exception cref="InvalidOperationException"><para>The current context is not an indefinite-length string.</para> 165/// <exception cref="InvalidOperationException">The next data item does not have the correct major type.</exception> 211/// <exception cref="InvalidOperationException">The next data item does not have the correct major type.</exception> 256/// <exception cref="InvalidOperationException"><para>The next data item does not have the correct major type.</para> 291/// <exception cref="InvalidOperationException"><para>The next data item does not have the correct major type.</para> 318/// <exception cref="InvalidOperationException"><para>The current context is not an indefinite-length string.</para>
System\Formats\Cbor\Reader\CborReader.Tag.cs (6)
13/// <exception cref="InvalidOperationException">The next data item does not have the correct major type.</exception> 31/// <exception cref="InvalidOperationException">The next data item does not have the correct major type.</exception> 43/// <exception cref="InvalidOperationException"><para>The next data item does not have the correct major type.</para> 91/// <exception cref="InvalidOperationException"><para>The next data item does not have the correct major type.</para> 143/// <exception cref="InvalidOperationException"><para>The next data item does not have the correct major type.</para> 190/// <exception cref="InvalidOperationException"><para>The next data item does not have the correct major type.</para>
System\Formats\Cbor\Writer\CborWriter.Array.cs (2)
15/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 37/// <exception cref="InvalidOperationException"><para>The written data is not accepted under the current conformance mode.</para>
System\Formats\Cbor\Writer\CborWriter.cs (3)
180/// <exception cref="InvalidOperationException">The writer does not contain a complete CBOR value or sequence of root-level values.</exception> 186/// <exception cref="InvalidOperationException">The writer does not contain a complete CBOR value or sequence of root-level values.</exception> 205/// <exception cref="InvalidOperationException">The writer does not contain a complete CBOR value or sequence of root-level values.</exception>
System\Formats\Cbor\Writer\CborWriter.Integer.cs (5)
14/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 23/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 45/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 55/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 69/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para>
System\Formats\Cbor\Writer\CborWriter.Map.cs (2)
20/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 48/// <exception cref="InvalidOperationException"><para>The written data is not accepted under the current conformance mode.</para>
System\Formats\Cbor\Writer\CborWriter.Simple.cs (5)
18/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 38/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 82/// <exception cref="InvalidOperationException">Writing a new value exceeds the definite length of the parent data item. 93/// <exception cref="InvalidOperationException">Writing a new value exceeds the definite length of the parent data item. 106/// <exception cref="InvalidOperationException">Writing a new value exceeds the definite length of the parent data item.
System\Formats\Cbor\Writer\CborWriter.Simple.netcoreapp.cs (1)
15/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para>
System\Formats\Cbor\Writer\CborWriter.String.cs (8)
20/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 37/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 62/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 93/// <exception cref="InvalidOperationException">The written data is not accepted under the current conformance mode.</exception> 104/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 122/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 159/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 190/// <exception cref="InvalidOperationException">The written data is not accepted under the current conformance mode.</exception>
System\Formats\Cbor\Writer\CborWriter.Tag.cs (6)
14/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 33/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 55/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 69/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 87/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para> 104/// <exception cref="InvalidOperationException"><para>Writing a new value exceeds the definite length of the parent data item.</para>
System.Formats.Tar (6)
System\Formats\Tar\PosixTarEntry.cs (2)
52/// <exception cref="InvalidOperationException">The entry does not represent a block device or a character device.</exception> 75/// <exception cref="InvalidOperationException">The entry does not represent a block device or a character device.</exception>
System\Formats\Tar\TarEntry.cs (4)
115/// <exception cref="InvalidOperationException">The entry type is not <see cref="TarEntryType.HardLink"/> or <see cref="TarEntryType.SymbolicLink"/>.</exception> 192/// <exception cref="InvalidOperationException">Attempted to extract a symbolic link, a hard link or an unsupported entry type.</exception> 222/// <exception cref="InvalidOperationException">Attempted to extract an unsupported entry type.</exception> 244/// <exception cref="InvalidOperationException">Setting a data section is not supported because the <see cref="EntryType"/> is not <see cref="TarEntryType.RegularFile"/> (or <see cref="TarEntryType.V7RegularFile"/> for an archive of <see cref="TarEntryFormat.V7"/> format).</exception>
System.IO.Compression (2)
System\IO\Compression\ZipArchiveEntry.cs (2)
169/// <exception cref="InvalidOperationException">This property is not available because the entry has been written to or modified.</exception> 282/// <exception cref="InvalidOperationException">This property is not available because the entry has been written to or modified.</exception>
System.IO.Compression.Brotli (7)
System\IO\Compression\dec\BrotliStream.Decompress.cs (4)
26/// <exception cref="System.InvalidOperationException">The <see cref="System.IO.Compression.CompressionMode" /> value was <see langword="Compress" /> when the object was created, or there is already an active asynchronous operation on this stream.</exception> 41/// <exception cref="InvalidOperationException"><para>Cannot perform read operations on a <see cref="BrotliStream" /> constructed with <see cref="CompressionMode.Compress" />.</para> 97/// <exception cref="System.InvalidOperationException">This call cannot be completed.</exception> 106/// <exception cref="System.InvalidOperationException">The end operation cannot be performed because the stream is closed.</exception>
System\IO\Compression\enc\BrotliStream.Compress.cs (3)
45/// <exception cref="InvalidOperationException"><para>Cannot perform write operations on a <see cref="BrotliStream" /> constructed with <see cref="CompressionMode.Decompress" />.</para> 95/// <exception cref="System.InvalidOperationException">The write operation cannot be performed because the stream is closed.</exception> 101/// <exception cref="System.InvalidOperationException">The underlying stream is closed or <see langword="null" />.</exception>
System.IO.Pipelines (14)
System\IO\Pipelines\PipeReader.cs (3)
48/// examine at least <paramref name="minimumSize" /> bytes in order to avoid an <see cref="System.InvalidOperationException" />. 89/// Because the consumed parameter doubles as the examined parameter, the consumed parameter should be greater than or equal to the examined position in the previous call to `AdvanceTo`. Otherwise, an <see cref="System.InvalidOperationException" /> is thrown.</remarks> 98/// The examined parameter should be greater than or equal to the examined position in the previous call to `AdvanceTo`. Otherwise, an <see cref="System.InvalidOperationException" /> is thrown.</remarks>
System\IO\Pipelines\ThrowHelper.cs (11)
24public static InvalidOperationException CreateInvalidOperationException_AlreadyReading() => new InvalidOperationException(SR.ReadingIsInProgress); 29public static InvalidOperationException CreateInvalidOperationException_NoReadToComplete() => new InvalidOperationException(SR.NoReadingOperationToComplete); 34public static InvalidOperationException CreateInvalidOperationException_NoConcurrentOperation() => new InvalidOperationException(SR.ConcurrentOperationsNotSupported); 39public static InvalidOperationException CreateInvalidOperationException_GetResultNotCompleted() => new InvalidOperationException(SR.GetResultBeforeCompleted); 45public static InvalidOperationException CreateInvalidOperationException_NoWritingAllowed() => new InvalidOperationException(SR.WritingAfterCompleted); 50public static InvalidOperationException CreateInvalidOperationException_NoReadingAllowed() => new InvalidOperationException(SR.ReadingAfterCompleted); 55public static InvalidOperationException CreateInvalidOperationException_InvalidExaminedPosition() => new InvalidOperationException(SR.InvalidExaminedPosition); 60public static InvalidOperationException CreateInvalidOperationException_InvalidExaminedOrConsumedPosition() => new InvalidOperationException(SR.InvalidExaminedOrConsumedPosition); 65public static InvalidOperationException CreateInvalidOperationException_AdvanceToInvalidCursor() => new InvalidOperationException(SR.AdvanceToInvalidCursor); 70public static InvalidOperationException CreateInvalidOperationException_ResetIncompleteReaderWriter() => new InvalidOperationException(SR.ReaderAndWriterHasToBeCompleted); 85public static InvalidOperationException CreateInvalidOperationException_InvalidZeroByteRead() => new InvalidOperationException(SR.InvalidZeroByteRead);
System.Linq (2)
System\Linq\Single.cs (2)
41/// <exception cref="InvalidOperationException">The input sequence contains more than one element.</exception> 58/// <exception cref="InvalidOperationException">More than one element satisfies the condition in <paramref name="predicate" />.</exception>
System.Linq.Expressions (67)
System\Linq\Expressions\Error.cs (43)
31internal static InvalidOperationException InvalidMetaObjectCreated(object? p0) 59internal static InvalidOperationException CollectionModifiedWhileEnumerating() 80internal static InvalidOperationException BinderNotCompatibleWithCallSite(object? p0, object? p1, object? p2) 87internal static InvalidOperationException DynamicBindingNeedsRestrictions(object? p0, object? p1) 108internal static InvalidOperationException BindingCannotBeNull() 143internal static InvalidOperationException TypeParameterIsNotDelegate(object? p0) 185internal static InvalidOperationException NoOrInvalidRuleProduced() 399internal static InvalidOperationException ExtensionNodeMustOverrideProperty(object? p0) 420internal static InvalidOperationException CoercionOperatorNotDefined(object? p0, object? p1) 427internal static InvalidOperationException UnaryOperatorNotDefined(object? p0, object? p1) 434internal static InvalidOperationException BinaryOperatorNotDefined(object? p0, object? p1, object? p2) 441internal static InvalidOperationException ReferenceEqualityNotDefined(object? p0, object? p1) 448internal static InvalidOperationException OperandTypesDoNotMatchParameters(object? p0, object? p1) 455internal static InvalidOperationException OverloadOperatorTypeDoesNotMatchConversionType(object? p0, object? p1) 462internal static InvalidOperationException ConversionIsNotSupportedForArithmeticTypes() 582internal static InvalidOperationException CannotAutoInitializeValueTypeElementThroughProperty(object? p0) 589internal static InvalidOperationException CannotAutoInitializeValueTypeMemberThroughProperty(object? p0) 603internal static InvalidOperationException CoalesceUsedOnNonNullType() 610internal static InvalidOperationException ExpressionTypeCannotInitializeArrayType(object? p0, object? p1) 962internal static InvalidOperationException MethodWithArgsDoesNotExistOnType(object? p0, object? p1) 969internal static InvalidOperationException GenericMethodWithArgsDoesNotExistOnType(object? p0, object? p1) 976internal static InvalidOperationException MethodWithMoreThanOneMatch(object? p0, object? p1) 983internal static InvalidOperationException PropertyWithMoreThanOneMatch(object? p0, object? p1) 1011internal static InvalidOperationException LabelTargetAlreadyDefined(object? p0) 1018internal static InvalidOperationException LabelTargetUndefined(object? p0) 1025internal static InvalidOperationException ControlCannotLeaveFinally() 1032internal static InvalidOperationException ControlCannotLeaveFilterTest() 1039internal static InvalidOperationException AmbiguousJump(object? p0) 1046internal static InvalidOperationException ControlCannotEnterTry() 1053internal static InvalidOperationException ControlCannotEnterExpression() 1060internal static InvalidOperationException NonLocalJumpWithValue(object? p0) 1091internal static InvalidOperationException InvalidLvalue(ExpressionType p0) 1099internal static InvalidOperationException UndefinedVariable(object? p0, object? p1, object? p2) 1106internal static InvalidOperationException CannotCloseOverByRef(object? p0, object? p1) 1113internal static InvalidOperationException UnexpectedVarArgsCall(object? p0) 1120internal static InvalidOperationException RethrowRequiresCatch() 1127internal static InvalidOperationException TryNotAllowedInFilter() 1134internal static InvalidOperationException MustRewriteToSameNode(object? p0, object? p1, object? p2) 1141internal static InvalidOperationException MustRewriteChildToSameType(object? p0, object? p1, object? p2) 1148internal static InvalidOperationException MustRewriteWithoutMethod(object? p0, object? p1) 1219internal static InvalidOperationException NonAbstractConstructorRequired() 1235internal static InvalidOperationException EnumerationIsDone() 1315internal static InvalidOperationException IncorrectNumberOfLambdaArguments()
System\Linq\Expressions\ExpressionVisitor.cs (2)
128/// <exception cref="InvalidOperationException">The visit method for this node returned a different type.</exception> 152/// <exception cref="InvalidOperationException">The visit method for this node returned a different type.</exception>
System\Linq\Expressions\InvocationExpression.cs (8)
416/// <exception cref="InvalidOperationException"> 452/// <exception cref="InvalidOperationException"> 493/// <exception cref="InvalidOperationException"> 537/// <exception cref="InvalidOperationException"> 586/// <exception cref="InvalidOperationException"> 639/// <exception cref="InvalidOperationException"> 682/// <exception cref="InvalidOperationException"> 709/// <exception cref="InvalidOperationException">
System\Linq\Expressions\MethodCallExpression.cs (2)
1139/// <exception cref="InvalidOperationException">No method whose name is <paramref name="methodName"/>, whose type parameters match <paramref name="typeArguments"/>, and whose parameter types match <paramref name="arguments"/> is found in <paramref name="instance"/>.Type or its base types.-or-More than one method whose name is <paramref name="methodName"/>, whose type parameters match <paramref name="typeArguments"/>, and whose parameter types match <paramref name="arguments"/> is found in <paramref name="instance"/>.Type or its base types.</exception> 1163/// <exception cref="InvalidOperationException">No method whose name is <paramref name="methodName"/>, whose type parameters match <paramref name="typeArguments"/>, and whose parameter types match <paramref name="arguments"/> is found in <paramref name="type"/> or its base types.-or-More than one method whose name is <paramref name="methodName"/>, whose type parameters match <paramref name="typeArguments"/>, and whose parameter types match <paramref name="arguments"/> is found in <paramref name="type"/> or its base types.</exception>
System\Linq\Expressions\UnaryExpression.cs (12)
456/// <exception cref="InvalidOperationException">Thrown when the unary minus operator is not defined for <paramref name="expression"/>.Type.</exception> 470/// <exception cref="InvalidOperationException">Thrown when <paramref name="method"/> is null and the unary minus operator is not defined for <paramref name="expression"/>.Type (or its corresponding non-nullable type if it is a nullable value type) is not assignable to the argument type of the method represented by method.</exception> 491/// <exception cref="InvalidOperationException">Thrown when the unary minus operator is not defined for <paramref name="expression"/>.Type.</exception> 505/// <exception cref="InvalidOperationException">Thrown when <paramref name="method"/> is null and the unary minus operator is not defined for <paramref name="expression"/>.Type (or its corresponding non-nullable type if it is a nullable value type) is not assignable to the argument type of the method represented by method.</exception> 524/// <exception cref="InvalidOperationException">Thrown when the unary minus operator is not defined for <paramref name="expression"/>.Type.</exception> 538/// <exception cref="InvalidOperationException"> 559/// <exception cref="InvalidOperationException">The unary not operator is not defined for <paramref name="expression"/>.Type.</exception> 573/// <exception cref="InvalidOperationException"> 728/// <exception cref="InvalidOperationException">No conversion operator is defined between <paramref name="expression"/>.Type and <paramref name="type"/>.</exception> 744/// <exception cref="InvalidOperationException">No conversion operator is defined between <paramref name="expression"/>.Type and <paramref name="type"/>.-or-<paramref name="expression"/>.Type is not assignable to the argument type of the method represented by <paramref name="method"/>.-or-The return type of the method represented by <paramref name="method"/> is not assignable to <paramref name="type"/>.-or-<paramref name="expression"/>.Type or <paramref name="type"/> is a nullable value type and the corresponding non-nullable value type does not equal the argument type or the return type, respectively, of the method represented by <paramref name="method"/>.</exception> 768/// <exception cref="InvalidOperationException">No conversion operator is defined between <paramref name="expression"/>.Type and <paramref name="type"/>.</exception> 784/// <exception cref="InvalidOperationException">No conversion operator is defined between <paramref name="expression"/>.Type and <paramref name="type"/>.-or-<paramref name="expression"/>.Type is not assignable to the argument type of the method represented by <paramref name="method"/>.-or-The return type of the method represented by <paramref name="method"/> is not assignable to <paramref name="type"/>.-or-<paramref name="expression"/>.Type or <paramref name="type"/> is a nullable value type and the corresponding non-nullable value type does not equal the argument type or the return type, respectively, of the method represented by <paramref name="method"/>.</exception>
System.Linq.Parallel (47)
System\Linq\ParallelEnumerable.cs (47)
137/// <exception cref="System.InvalidOperationException"> 177/// <exception cref="InvalidOperationException"> 287/// <exception cref="System.InvalidOperationException"> 318/// <exception cref="System.InvalidOperationException"> 346/// <exception cref="System.InvalidOperationException"> 379/// <exception cref="System.InvalidOperationException"> 1602/// <exception cref="System.InvalidOperationException"> 2445/// <exception cref="System.InvalidOperationException"> 2490/// <exception cref="System.InvalidOperationException"> 2535/// <exception cref="System.InvalidOperationException"> 2580/// <exception cref="System.InvalidOperationException"> 2625/// <exception cref="System.InvalidOperationException"> 2671/// <exception cref="System.InvalidOperationException"> 2698/// <exception cref="System.InvalidOperationException"> 2745/// <exception cref="System.InvalidOperationException"> 2792/// <exception cref="System.InvalidOperationException"> 2839/// <exception cref="System.InvalidOperationException"> 2886/// <exception cref="System.InvalidOperationException"> 2934/// <exception cref="System.InvalidOperationException"> 2960/// <exception cref="System.InvalidOperationException"> 3005/// <exception cref="System.InvalidOperationException"> 3050/// <exception cref="System.InvalidOperationException"> 3095/// <exception cref="System.InvalidOperationException"> 3140/// <exception cref="System.InvalidOperationException"> 3185/// <exception cref="System.InvalidOperationException"> 3212/// <exception cref="System.InvalidOperationException"> 3259/// <exception cref="System.InvalidOperationException"> 3306/// <exception cref="System.InvalidOperationException"> 3353/// <exception cref="System.InvalidOperationException"> 3400/// <exception cref="System.InvalidOperationException"> 3448/// <exception cref="System.InvalidOperationException"> 3474/// <exception cref="System.InvalidOperationException"> 3523/// <exception cref="System.InvalidOperationException"> 3572/// <exception cref="System.InvalidOperationException"> 3617/// <exception cref="System.InvalidOperationException"> 3662/// <exception cref="System.InvalidOperationException"> 3710/// <exception cref="System.InvalidOperationException"> 3761/// <exception cref="System.InvalidOperationException"> 3812/// <exception cref="System.InvalidOperationException"> 3859/// <exception cref="System.InvalidOperationException"> 3906/// <exception cref="System.InvalidOperationException"> 5386/// <exception cref="System.InvalidOperationException"> 5429/// <exception cref="System.InvalidOperationException"> 5562/// <exception cref="System.InvalidOperationException"> 5605/// <exception cref="System.InvalidOperationException"> 5736/// <exception cref="System.InvalidOperationException"> 5765/// <exception cref="System.InvalidOperationException">
System.Linq.Queryable (2)
System\Linq\Queryable.cs (2)
1323/// <exception cref="InvalidOperationException">The input sequence contains more than one element.</exception> 1356/// <exception cref="InvalidOperationException">More than one element satisfies the condition in <paramref name="predicate" />.</exception>
System.Memory (3)
src\libraries\Common\src\System\Buffers\ArrayBufferWriter.cs (1)
120/// <exception cref="InvalidOperationException">
System\ThrowHelper.cs (2)
40private static InvalidOperationException CreateInvalidOperationException() { return new InvalidOperationException(); } 45private static InvalidOperationException CreateInvalidOperationException_EndPositionNotReached() { return new InvalidOperationException(SR.EndPositionNotReached); }
System.Net.Http (3)
System\Net\Http\HttpContent.cs (1)
696var e = new InvalidOperationException(SR.net_http_content_no_task_returned);
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (1)
2063catch (Exception e) when (e is IOException || e is ObjectDisposedException || e is InvalidOperationException)
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (1)
883if (exception is InvalidOperationException)
System.Net.HttpListener (2)
System\Net\Managed\HttpRequestStream.Managed.cs (1)
196catch (IOException e) when (e.InnerException is ArgumentException || e.InnerException is InvalidOperationException)
System\Net\Managed\HttpResponseStream.Managed.cs (1)
287if (ex.InnerException is ArgumentException || ex.InnerException is InvalidOperationException)
System.Net.Ping (10)
System\Net\NetworkInformation\Ping.cs (10)
184/// <exception cref="InvalidOperationException">A call to SendAsync is in progress.</exception> 209/// <exception cref="InvalidOperationException">A call to SendAsync is in progress.</exception> 229/// <exception cref="InvalidOperationException">A call to SendAsync is in progress.</exception> 253/// <exception cref="InvalidOperationException">A call to SendAsync is in progress.</exception> 284/// <exception cref="InvalidOperationException">A call to SendAsync is in progress.</exception> 314/// <exception cref="InvalidOperationException">A call to SendAsync is in progress.</exception> 348/// <exception cref="InvalidOperationException">A call to SendAsync is in progress.</exception> 393/// <exception cref="InvalidOperationException">A call to SendAsync is in progress.</exception> 444/// <exception cref="InvalidOperationException">A call to SendAsync is in progress.</exception> 476/// <exception cref="InvalidOperationException">A call to SendAsync is in progress.</exception>
System.Net.Primitives (3)
System\Net\CredentialCache.cs (1)
322try { enumerator.Reset(); } catch (InvalidOperationException) { }
System\Net\IPNetwork.cs (2)
268/// <exception cref="InvalidOperationException">Uninitialized <see cref="IPNetwork"/> instance.</exception> 278/// <exception cref="InvalidOperationException">Uninitialized <see cref="IPNetwork"/> instance.</exception>
System.Net.Security (6)
System\Net\Security\NegotiateAuthentication.cs (6)
157/// <exception cref="InvalidOperationException">Authentication failed or has not occurred.</exception> 289/// <exception cref="InvalidOperationException">Authentication failed or has not occurred.</exception> 316/// <exception cref="InvalidOperationException">Authentication failed or has not occurred.</exception> 344/// <exception cref="InvalidOperationException">Authentication failed or has not occurred.</exception> 368/// <exception cref="InvalidOperationException">Authentication failed or has not occurred.</exception> 393/// <exception cref="InvalidOperationException">Authentication failed or has not occurred.</exception>
System.Net.Sockets (8)
System\Net\Sockets\Socket.cs (3)
1228/// <exception cref="InvalidOperationException">The <see cref="Socket"/> object is not in blocking mode and cannot accept this synchronous call.</exception> 1254/// <exception cref="InvalidOperationException">The <see cref="Socket"/> object is not in blocking mode and cannot accept this synchronous call.</exception> 1636/// <exception cref="InvalidOperationException">
System\Net\Sockets\UDPClient.cs (5)
553/// <exception cref="InvalidOperationException">The <see cref="UdpClient"/> has already established a default remote host.</exception> 587/// <exception cref="InvalidOperationException"><see cref="UdpClient"/> has already established a default remote host and <paramref name="endPoint"/> is not <see langword="null"/>.</exception> 869/// <exception cref="InvalidOperationException"><see cref="UdpClient"/> has already established a default remote host and <paramref name="endPoint"/> is not <see langword="null"/>.</exception> 908/// <exception cref="InvalidOperationException">The <see cref="UdpClient"/> has already established a default remote host.</exception> 935/// <exception cref="InvalidOperationException">The <see cref="UdpClient"/> has not established a default remote host.</exception>
System.ObjectModel (1)
System\Collections\ObjectModel\ObservableCollection.cs (1)
221/// <exception cref="InvalidOperationException"> raised when changing the collection
System.Private.CoreLib (106)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\StackTrace.cs (1)
350catch (InvalidOperationException) { }
src\libraries\System.Private.CoreLib\src\System\Enum.cs (4)
305/// <exception cref="InvalidOperationException"> 1395/// <exception cref="InvalidOperationException"><paramref name="format"/> equals "X" or "x", but the enumeration type is unknown.</exception> 1625/// <exception cref="InvalidOperationException"><paramref name="format"/> equals "X" or "x", but the enumeration type is unknown.</exception> 2159private static InvalidOperationException CreateUnknownEnumTypeException() =>
src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (2)
867/// <exception cref="InvalidOperationException">The reader is currently in use by a previous read operation.</exception> 999/// <exception cref="InvalidOperationException">The reader is currently in use by a previous read operation.</exception>
src\libraries\System.Private.CoreLib\src\System\IO\StringReader.cs (2)
227/// <exception cref="InvalidOperationException">The reader is currently in use by a previous read operation.</exception> 265/// <exception cref="InvalidOperationException">The reader is currently in use by a previous read operation.</exception>
src\libraries\System.Private.CoreLib\src\System\IO\TextReader.cs (2)
209/// <exception cref="InvalidOperationException">The reader is currently in use by a previous read operation.</exception> 235/// <exception cref="InvalidOperationException">The reader is currently in use by a previous read operation.</exception>
src\libraries\System.Private.CoreLib\src\System\IO\TextWriter.cs (1)
683/// <exception cref="InvalidOperationException">The writer is currently in use by a previous write operation.</exception>
src\libraries\System.Private.CoreLib\src\System\Lazy.cs (1)
497/// <exception cref="InvalidOperationException">
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (4)
3239/// <exception cref="InvalidOperationException"> 3255/// <exception cref="InvalidOperationException"> 3301/// <exception cref="InvalidOperationException"> 3323/// <exception cref="InvalidOperationException">
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.Globalization.cs (4)
196/// <exception cref="InvalidOperationException">The source and destination buffers overlap.</exception> 222/// <exception cref="InvalidOperationException">The source and destination buffers overlap.</exception> 248/// <exception cref="InvalidOperationException">The source and destination buffers overlap.</exception> 274/// <exception cref="InvalidOperationException">The source and destination buffers overlap.</exception>
src\libraries\System.Private.CoreLib\src\System\Reflection\ConstructorInvoker.cs (1)
77/// <exception cref="InvalidOperationException">
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\LocalBuilder.cs (2)
21/// <exception cref="InvalidOperationException">The containing type has been created with CreateType() or 35/// <exception cref="InvalidOperationException">The containing type has been created with CreateType().</exception>"
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ModuleBuilder.cs (3)
38/// <exception cref="InvalidOperationException">This method is called on a dynamic module that is not a persisted module.</exception> 50/// <exception cref="InvalidOperationException">This method is called on a dynamic module that is not a persisted module.</exception> 64/// <exception cref="InvalidOperationException">This method is called on a dynamic module that is not a debug module.</exception>
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvoker.cs (1)
107/// <exception cref="InvalidOperationException">
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilder.cs (6)
38/// <exception cref="InvalidOperationException">The builder is incorrectly initialized.</exception> 71/// <exception cref="InvalidOperationException">The builder is not initialized.</exception> 94/// <exception cref="InvalidOperationException">The builder is not initialized.</exception> 95/// <exception cref="InvalidOperationException">The task has already completed.</exception> 117/// <exception cref="InvalidOperationException">The builder is not initialized.</exception> 118/// <exception cref="InvalidOperationException">The task has already completed.</exception>
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilderT.cs (3)
40/// <exception cref="InvalidOperationException">The builder is incorrectly initialized.</exception> 466/// <exception cref="InvalidOperationException">The task has already completed.</exception> 506/// <exception cref="InvalidOperationException">The task has already completed.</exception>
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncVoidMethodBuilder.cs (2)
45/// <exception cref="InvalidOperationException">The builder is incorrectly initialized.</exception> 110/// <exception cref="InvalidOperationException">The builder is not initialized.</exception>
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs (2)
44/// <exception cref="InvalidOperationException">The awaiter was not properly initialized.</exception> 54/// <exception cref="InvalidOperationException">The awaiter was not properly initialized.</exception>
src\libraries\System.Private.CoreLib\src\System\Runtime\ExceptionServices\ExceptionDispatchInfo.cs (2)
65/// <exception cref="InvalidOperationException">The <paramref name="source"/> argument was previously thrown or previously had a stack trace stored into it.</exception> 84/// <exception cref="InvalidOperationException">The <paramref name="source"/> argument was previously thrown or previously had a stack trace stored into it.</exception>
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\IDynamicInterfaceCastable.cs (1)
46/// <see cref="InvalidOperationException" /> will be thrown.
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ObjectiveC\ObjectiveCMarshal.PlatformNotSupported.cs (3)
45/// <exception cref="InvalidOperationException">Thrown if this API has already been called.</exception> 71/// <exception cref="InvalidOperationException">Thrown if the ObjectiveCMarshal API has not been initialized.</exception> 128/// <exception cref="InvalidOperationException">Thrown if the msgSend function has already been overridden.</exception>
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\SafeBuffer.cs (1)
379private static InvalidOperationException NotInitialized()
src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs (1)
214/// <exception cref="InvalidOperationException"><paramref name="executionContext"/> is null.</exception>
src\libraries\System.Private.CoreLib\src\System\Threading\LazyInitializer.cs (1)
86/// <exception cref="InvalidOperationException"><paramref name="valueFactory"/> returned
src\libraries\System.Private.CoreLib\src\System\Threading\LazyThreadSafetyMode.cs (2)
21/// accesses Value on this <see cref="Lazy{T}"/> instance, a <see cref="InvalidOperationException"/> will be thrown. 39/// subsequent accesses to Value. Also, if valueFactory recursively accesses Value on this <see cref="Lazy{T}"/> instance, a <see cref="InvalidOperationException"/> will be thrown.
src\libraries\System.Private.CoreLib\src\System\Threading\ManualResetEventSlim.cs (6)
341/// <exception cref="InvalidOperationException"> 362/// <exception cref="InvalidOperationException"> 391/// <exception cref="InvalidOperationException"> 424/// <exception cref="InvalidOperationException"> 450/// <exception cref="InvalidOperationException"> 474/// <exception cref="InvalidOperationException">
src\libraries\System.Private.CoreLib\src\System\Threading\SpinLock.cs (2)
565/// <exception cref="InvalidOperationException"> 613catch (InvalidOperationException)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (7)
910/// <exception cref="InvalidOperationException"> 935/// <exception cref="InvalidOperationException"> 995/// <exception cref="InvalidOperationException"> 1020/// <exception cref="InvalidOperationException"> 1573/// <exception cref="InvalidOperationException"> 2481/// <exception cref="InvalidOperationException">The awaiter was not properly initialized.</exception> 2553/// <exception cref="InvalidOperationException">The awaiter was not properly initialized.</exception>
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCompletionSource.cs (6)
81/// <exception cref="InvalidOperationException"> 99/// <exception cref="InvalidOperationException"> 190/// <exception cref="InvalidOperationException"> 228/// <exception cref="InvalidOperationException"> 241/// <exception cref="InvalidOperationException"> 295/// <exception cref="InvalidOperationException">
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCompletionSource_T.cs (6)
81/// <exception cref="InvalidOperationException"> 99/// <exception cref="InvalidOperationException"> 191/// <exception cref="InvalidOperationException"> 230/// <exception cref="InvalidOperationException"> 243/// <exception cref="InvalidOperationException"> 297/// <exception cref="InvalidOperationException">
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskScheduler.cs (4)
99/// <exception cref="InvalidOperationException">The <paramref name="task"/> was already 341/// <exception cref="InvalidOperationException"> 398/// <exception cref="InvalidOperationException"> 549/// <exception cref="InvalidOperationException">This constructor expects <see cref="SynchronizationContext.Current"/> to be set.</exception>
src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (2)
178/// <exception cref="InvalidOperationException">This thread was created using a <see cref="ThreadStart"/> delegate instead of a <see cref="ParameterizedThreadStart"/> delegate.</exception> 188/// <exception cref="InvalidOperationException">This thread was created using a <see cref="ThreadStart"/> delegate instead of a <see cref="ParameterizedThreadStart"/> delegate.</exception>
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadLocal.cs (2)
213/// <exception cref="InvalidOperationException"> 231/// <exception cref="InvalidOperationException">
src\libraries\System.Private.CoreLib\src\System\Threading\Timer.cs (1)
630var e = new InvalidOperationException(SR.InvalidOperation_TimerAlreadyClosed);
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (1)
502var ex = new InvalidOperationException(SR.InvalidOperation_InvalidHandle);
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (2)
729private static InvalidOperationException GetInvalidOperationException(ExceptionResource resource) 764private static InvalidOperationException GetInvalidOperationException_EnumCurrent(int index)
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeName.cs (5)
94/// <exception cref="InvalidOperationException">The current type is not a nested type.</exception> 314/// <exception cref="InvalidOperationException">The current type is not an array, pointer or reference.</exception> 331/// <exception cref="InvalidOperationException">The current type is not a generic type.</exception> 349/// <exception cref="InvalidOperationException">Parsing has exceeded the limit set by <seealso cref="TypeNameParseOptions.MaxNodes"/>.</exception> 370/// <exception cref="InvalidOperationException">The current type is not an array.</exception>
src\System\GC.CoreCLR.cs (3)
657/// <exception cref="InvalidOperationException"><para>The GC is not currently under a no GC region.</para> 913/// <exception cref="InvalidOperationException">If the hard limit is too low. This can happen if the heap hard limit that the refresh will set, either because of new AppData settings or implied by the container memory limit changes, is lower than what is already committed.</exception> 914/// <exception cref="InvalidOperationException">If the hard limit is invalid. This can happen, for example, with negative heap hard limit percentages.</exception>
src\System\Reflection\Metadata\MetadataUpdater.cs (1)
34/// <exception cref="InvalidOperationException">The assembly is not editable.</exception>
src\System\Runtime\ControlledExecution.CoreCLR.cs (1)
26/// <exception cref="InvalidOperationException">
src\System\Runtime\DependentHandle.cs (3)
84/// <exception cref="InvalidOperationException"> 122/// <exception cref="InvalidOperationException">Thrown if <see cref="IsAllocated"/> is <see langword="false"/>.</exception> 158/// <exception cref="InvalidOperationException">Thrown if <see cref="IsAllocated"/> is <see langword="false"/>.</exception>
src\System\Runtime\InteropServices\ComWrappers.cs (2)
318/// in a <see cref="InvalidOperationException"/> being thrown. 346/// in a <see cref="InvalidOperationException"/> being thrown.
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\DataContractSet.cs (1)
375catch (InvalidOperationException)
System.Private.Xml (6)
System\Xml\Serialization\SoapReflectionImporter.cs (1)
137private static InvalidOperationException ReflectionException(string context, Exception e)
System\Xml\Serialization\XmlReflectionImporter.cs (5)
361private static InvalidOperationException CreateReflectionException(string context, Exception e) 366private static InvalidOperationException CreateTypeReflectionException(string context, Exception e) 371private static InvalidOperationException CreateMemberReflectionException(FieldModel model, Exception e) 607private static InvalidOperationException InvalidAttributeUseException(Type type) 612private static InvalidOperationException UnsupportedException(TypeDesc typeDesc, ImportContext context)
System.Private.Xml.Linq (20)
System\Xml\Linq\XAttribute.cs (1)
177/// <exception cref="InvalidOperationException">
System\Xml\Linq\XContainer.cs (1)
228/// <exception cref="InvalidOperationException">
System\Xml\Linq\XElement.cs (8)
1488/// <exception cref="InvalidOperationException"> 1531/// <exception cref="InvalidOperationException"> 1574/// <exception cref="InvalidOperationException"> 1617/// <exception cref="InvalidOperationException"> 1660/// <exception cref="InvalidOperationException"> 1703/// <exception cref="InvalidOperationException"> 1746/// <exception cref="InvalidOperationException"> 1832/// <exception cref="InvalidOperationException">
System\Xml\Linq\XNode.cs (8)
100/// <exception cref="InvalidOperationException"> 123/// <exception cref="InvalidOperationException"> 144/// <exception cref="InvalidOperationException"> 170/// <exception cref="InvalidOperationException"> 221/// <exception cref="InvalidOperationException"> 423/// <exception cref="InvalidOperationException"> 461/// <exception cref="InvalidOperationException"> 521/// <exception cref="InvalidOperationException">
System\Xml\Linq\XNodeDocumentOrderComparer.cs (2)
28/// <exception cref="InvalidOperationException"> 46/// <exception cref="InvalidOperationException">
System.Reflection.Emit (8)
System\Reflection\Emit\PersistedAssemblyBuilder.cs (8)
78/// <exception cref="InvalidOperationException">A module not defined for the assembly.</exception> 79/// <exception cref="InvalidOperationException">The metadata already populated for the assembly before.</exception> 87/// <exception cref="InvalidOperationException">A module not defined for the assembly.</exception> 88/// <exception cref="InvalidOperationException">The metadata already populated for the assembly before.</exception> 111/// <exception cref="InvalidOperationException">A module not defined for the assembly.</exception> 112/// <exception cref="InvalidOperationException">The metadata already populated for the assembly previously.</exception> 128/// <exception cref="InvalidOperationException">A module not defined for the assembly.</exception> 129/// <exception cref="InvalidOperationException">The metadata already populated for the assembly previously.</exception>
System.Reflection.Metadata (83)
System\Reflection\Metadata\BlobBuilder.cs (48)
179/// <exception cref="InvalidOperationException">Content is not available, the builder has been linked with another one.</exception> 193/// <exception cref="InvalidOperationException">Content is not available, the builder has been linked with another one.</exception> 263/// <exception cref="InvalidOperationException">Content is not available, the builder has been linked with another one.</exception> 270/// <exception cref="InvalidOperationException">Content is not available, the builder has been linked with another one.</exception> 307/// <exception cref="InvalidOperationException">Content is not available, the builder has been linked with another one.</exception> 314/// <exception cref="InvalidOperationException">Content is not available, the builder has been linked with another one.</exception> 335/// <exception cref="InvalidOperationException">Content is not available, the builder has been linked with another one.</exception> 350/// <exception cref="InvalidOperationException">Content is not available, the builder has been linked with another one.</exception> 365/// <exception cref="InvalidOperationException">Content is not available, the builder has been linked with another one.</exception> 380/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 441/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 583/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 621/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 651/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 692/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 739/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 752/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 766/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 779/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 802/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 808/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 815/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 821/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 828/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 834/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 841/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 848/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 854/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 861/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 867/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 874/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 880/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 887/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 893/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 900/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 906/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 913/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 920/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 927/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 938/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 958/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 978/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 1021/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 1043/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 1064/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 1131/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 1150/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 1160/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception>
System\Reflection\Metadata\BlobWriter.cs (2)
418/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception> 440/// <exception cref="InvalidOperationException">Builder is not writable, it has been linked with another one.</exception>
System\Reflection\Metadata\Ecma335\Encoding\ControlFlowBuilder.cs (1)
281/// <exception cref="InvalidOperationException" />
System\Reflection\Metadata\Ecma335\Encoding\ExceptionRegionEncoder.cs (5)
119/// <exception cref="InvalidOperationException">Method body was not declared to have exception regions.</exception> 136/// <exception cref="InvalidOperationException">Method body was not declared to have exception regions.</exception> 157/// <exception cref="InvalidOperationException">Method body was not declared to have exception regions.</exception> 175/// <exception cref="InvalidOperationException">Method body was not declared to have exception regions.</exception> 202/// <exception cref="InvalidOperationException">Method body was not declared to have exception regions.</exception>
System\Reflection\Metadata\Ecma335\Encoding\InstructionEncoder.cs (4)
388/// <exception cref="InvalidOperationException"><see cref="ControlFlowBuilder"/> is null.</exception> 418/// <exception cref="InvalidOperationException"><see cref="ControlFlowBuilder"/> is null.</exception> 441/// times. Failure to do so will throw <see cref="InvalidOperationException"/>. 475/// <exception cref="InvalidOperationException"><see cref="ControlFlowBuilder"/> is null.</exception>
System\Reflection\Metadata\Ecma335\Encoding\MethodBodyStreamEncoder.cs (2)
136/// <exception cref="InvalidOperationException"> 159/// <exception cref="InvalidOperationException">
System\Reflection\Metadata\Ecma335\MetadataRootBuilder.cs (1)
94/// <exception cref="InvalidOperationException">
System\Reflection\Metadata\MetadataReader.netstandard.cs (1)
98catch (InvalidOperationException ex)
System\Reflection\Metadata\PEReaderExtensions.cs (1)
22/// <exception cref="InvalidOperationException">Section where the method is stored is not available.</exception>
System\Reflection\Metadata\TypeName.cs (5)
94/// <exception cref="InvalidOperationException">The current type is not a nested type.</exception> 314/// <exception cref="InvalidOperationException">The current type is not an array, pointer or reference.</exception> 331/// <exception cref="InvalidOperationException">The current type is not a generic type.</exception> 349/// <exception cref="InvalidOperationException">Parsing has exceeded the limit set by <seealso cref="TypeNameParseOptions.MaxNodes"/>.</exception> 370/// <exception cref="InvalidOperationException">The current type is not an array.</exception>
System\Reflection\PortableExecutable\PEReader.cs (11)
341/// <exception cref="InvalidOperationException">PE image not available.</exception> 358/// <exception cref="InvalidOperationException">PE image doesn't have metadata.</exception> 380/// <exception cref="InvalidOperationException">PE image not available.</exception> 443/// <exception cref="InvalidOperationException">The entire PE image is not available.</exception> 462/// <exception cref="InvalidOperationException">The PE image doesn't contain metadata (<see cref="HasMetadata"/> returns false).</exception> 480/// <exception cref="InvalidOperationException">PE image not available.</exception> 514/// <exception cref="InvalidOperationException">PE image not available.</exception> 536/// <exception cref="InvalidOperationException">PE image not available.</exception> 605/// <exception cref="InvalidOperationException">PE image not available.</exception> 645/// <exception cref="InvalidOperationException">PE image not available.</exception> 709/// <exception cref="InvalidOperationException">The stream returned from <paramref name="pdbFileStreamProvider"/> doesn't support read and seek operations.</exception>
System\Reflection\PortableExecutable\PEReader.EmbeddedPortablePdb.cs (1)
33/// <exception cref="InvalidOperationException">PE image not available.</exception>
System\Reflection\PortableExecutable\PEStreamOptions.cs (1)
23/// Reading from other sections of the file is not allowed (<see cref="InvalidOperationException"/> is thrown by the <see cref="PEReader"/>).
System.Reflection.TypeExtensions (3)
System\Reflection\TypeExtensions.cs (3)
398/// <see cref="GetMetadataToken(MemberInfo)"/> throws <see cref="InvalidOperationException"/> otherwise. 409catch (InvalidOperationException) 420/// <exception cref="InvalidOperationException">
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net9.0\System.Runtime.Forwards.cs (1)
280[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.InvalidOperationException))]
System.Runtime.Caching (1)
System\Runtime\Caching\SRef.cs (1)
51catch (InvalidOperationException)
System.Security.Claims (3)
System\Security\Claims\ClaimsIdentity.cs (3)
150/// <exception cref="InvalidOperationException">if 'identity' is a <see cref="ClaimsIdentity"/> and <see cref="ClaimsIdentity.Actor"/> results in a circular reference back to 'this'.</exception> 276/// <exception cref="InvalidOperationException">if 'value' results in a circular reference back to 'this'.</exception> 490/// <exception cref="InvalidOperationException">if 'claim' cannot be removed.</exception>
System.Security.Cryptography (12)
System\Security\Cryptography\Shake128.cs (1)
244/// <exception cref="InvalidOperationException">
System\Security\Cryptography\Shake256.cs (1)
244/// <exception cref="InvalidOperationException">
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (7)
246/// <exception cref="InvalidOperationException"> 296/// <exception cref="InvalidOperationException"> 384/// <exception cref="InvalidOperationException"> 432/// <exception cref="InvalidOperationException"> 490/// <exception cref="InvalidOperationException"> 570/// <exception cref="InvalidOperationException"> 621/// <exception cref="InvalidOperationException">
System\Security\Cryptography\X509Certificates\X500RelativeDistinguishedName.cs (2)
85/// <exception cref="InvalidOperationException"> 111/// <exception cref="InvalidOperationException">
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (1)
734/// <exception cref="InvalidOperationException">
System.Security.Cryptography.Cose (48)
System\Security\Cryptography\Cose\CoseHeaderMap.cs (15)
68/// <exception cref="InvalidOperationException">The property is set and the <see cref="CoseHeaderMap"/> is read-only.</exception> 87/// <exception cref="InvalidOperationException">The value could not be decoded as a 32-bit signed integer.</exception> 96/// <exception cref="InvalidOperationException">The value could not be decoded as text string.</exception> 105/// <exception cref="InvalidOperationException">The value could not be decoded as byte string.</exception> 115/// <exception cref="InvalidOperationException">The value could not be decoded as byte string.</exception> 124/// <exception cref="InvalidOperationException">The header map is read-only.</exception> 137/// <exception cref="InvalidOperationException">The header map is read-only.</exception> 146/// <exception cref="InvalidOperationException">The header map is read-only.</exception> 154/// <exception cref="InvalidOperationException">The header map is read-only.</exception> 162/// <exception cref="InvalidOperationException">The header map is read-only.</exception> 174/// <exception cref="InvalidOperationException">The header map is read-only.</exception> 190/// <exception cref="InvalidOperationException">The header map is read-only.</exception> 218/// <exception cref="InvalidOperationException">The header map is read-only.</exception> 230/// <exception cref="InvalidOperationException">The header map is read-only.</exception> 326catch (Exception ex) when (ex is CborContentException or InvalidOperationException)
System\Security\Cryptography\Cose\CoseHeaderValue.cs (8)
134/// <exception cref="InvalidOperationException">The value could not be decoded as a 32-bit signed integer.</exception> 144catch (Exception ex) when (ex is CborContentException or InvalidOperationException or OverflowException) 161/// <exception cref="InvalidOperationException">The value could not be decoded as text string.</exception> 171catch (Exception ex) when (ex is CborContentException or InvalidOperationException) 188/// <exception cref="InvalidOperationException">The value could not be decoded as byte string.</exception> 198catch (Exception ex) when (ex is CborContentException or InvalidOperationException) 217/// <exception cref="InvalidOperationException">The value could not be decoded as byte string.</exception> 230catch (Exception ex) when (ex is CborContentException or InvalidOperationException)
System\Security\Cryptography\Cose\CoseMessage.cs (5)
166catch (Exception ex) when (ex is CborContentException or InvalidOperationException) 252catch (Exception ex) when (ex is CborContentException or InvalidOperationException) 594/// <exception cref="InvalidOperationException">The <see cref="ProtectedHeaders"/> and <see cref="UnprotectedHeaders"/> collections have one or more labels in common.</exception> 611/// <exception cref="InvalidOperationException">The <see cref="ProtectedHeaders"/> and <see cref="UnprotectedHeaders"/> collections have one or more labels in common.</exception> 630/// <exception cref="InvalidOperationException">The <see cref="ProtectedHeaders"/> and <see cref="UnprotectedHeaders"/> collections have one or more labels in common.</exception>
System\Security\Cryptography\Cose\CoseMultiSignMessage.cs (7)
564/// <exception cref="InvalidOperationException"> 648/// <exception cref="InvalidOperationException">The content is detached from this message, use an overload that accepts a detached content.</exception> 667/// <exception cref="InvalidOperationException">The content is detached from this message, use an overload that accepts a detached content.</exception> 699/// <exception cref="InvalidOperationException">The content is embedded on this message, use an overload that uses embedded content.</exception> 726/// <exception cref="InvalidOperationException">The content is embedded on this message, use an overload that uses embedded content.</exception> 762/// <exception cref="InvalidOperationException">The content is embedded on this message, use an overload that uses embedded content.</exception> 838/// <exception cref="InvalidOperationException">The content is embedded on this message, use an overload that uses embedded content.</exception>
System\Security\Cryptography\Cose\CoseSign1Message.cs (7)
374/// <exception cref="InvalidOperationException">The content is detached from this message, use an overload that accepts a detached content.</exception> 417/// <exception cref="InvalidOperationException">The content is detached from this message, use an overload that accepts a detached content.</exception> /// <exception cref="CryptographicException"> 460/// <exception cref="InvalidOperationException">The content is embedded on this message, use an overload that uses embedded content.</exception> 508/// <exception cref="InvalidOperationException">The content is embedded on this message, use an overload that uses embedded content.</exception> 560/// <exception cref="InvalidOperationException">The content is embedded on this message, use an overload that uses embedded content.</exception> 661/// <exception cref="InvalidOperationException">The content is embedded on this message, use an overload that uses embedded content.</exception> 800/// <exception cref="InvalidOperationException">The <see cref="CoseMessage.ProtectedHeaders"/> and <see cref="CoseMessage.UnprotectedHeaders"/> collections have one or more labels in common.</exception>
System\Security\Cryptography\Cose\CoseSignature.cs (6)
80/// <exception cref="InvalidOperationException">The content is detached from the associated message, use an overload that accepts a detached content.</exception> 123/// <exception cref="InvalidOperationException">The content is detached from the associated message, use an overload that accepts a detached content.</exception> 167/// <exception cref="InvalidOperationException">The content is embedded on the associated message, use an overload that uses embedded content.</exception> 216/// <exception cref="InvalidOperationException">The content is embedded on the associated message, use an overload that uses embedded content.</exception> 268/// <exception cref="InvalidOperationException">The content is embedded on the associated message, use an overload that uses embedded content.</exception> 336/// <exception cref="InvalidOperationException">The content is embedded on the associated message, use an overload that uses embedded content.</exception>
System.Text.Json (283)
System\Text\Json\Document\JsonDocument.cs (1)
98/// <exception cref="InvalidOperationException">
System\Text\Json\Document\JsonElement.cs (46)
52/// <exception cref="InvalidOperationException"> 75/// <exception cref="InvalidOperationException"> 103/// <exception cref="InvalidOperationException"> 149/// <exception cref="InvalidOperationException"> 188/// <exception cref="InvalidOperationException"> 228/// <exception cref="InvalidOperationException"> 269/// <exception cref="InvalidOperationException"> 305/// <exception cref="InvalidOperationException"> 325/// <exception cref="InvalidOperationException"> 357/// <exception cref="InvalidOperationException"> 382/// <exception cref="InvalidOperationException"> 402/// <exception cref="InvalidOperationException"> 433/// <exception cref="InvalidOperationException"> 451/// <exception cref="InvalidOperationException"> 482/// <exception cref="InvalidOperationException"> 502/// <exception cref="InvalidOperationException"> 532/// <exception cref="InvalidOperationException"> 549/// <exception cref="InvalidOperationException"> 579/// <exception cref="InvalidOperationException"> 600/// <exception cref="InvalidOperationException"> 631/// <exception cref="InvalidOperationException"> 648/// <exception cref="InvalidOperationException"> 678/// <exception cref="InvalidOperationException"> 699/// <exception cref="InvalidOperationException"> 730/// <exception cref="InvalidOperationException"> 750/// <exception cref="InvalidOperationException"> 780/// <exception cref="InvalidOperationException"> 801/// <exception cref="InvalidOperationException"> 841/// <exception cref="InvalidOperationException"> 869/// <exception cref="InvalidOperationException"> 908/// <exception cref="InvalidOperationException"> 936/// <exception cref="InvalidOperationException"> 966/// <exception cref="InvalidOperationException"> 987/// <exception cref="InvalidOperationException"> 1018/// <exception cref="InvalidOperationException"> 1038/// <exception cref="InvalidOperationException"> 1069/// <exception cref="InvalidOperationException"> 1089/// <exception cref="InvalidOperationException"> 1120/// <exception cref="InvalidOperationException"> 1140/// <exception cref="InvalidOperationException"> 1205/// <exception cref="InvalidOperationException"> 1232/// <exception cref="InvalidOperationException"> 1261/// <exception cref="InvalidOperationException"> 1302/// <exception cref="InvalidOperationException"> 1333/// <exception cref="InvalidOperationException"> 1359/// <exception cref="InvalidOperationException">
System\Text\Json\Document\JsonProperty.cs (4)
40/// <exception cref="InvalidOperationException"> 60/// <exception cref="InvalidOperationException"> 80/// <exception cref="InvalidOperationException"> 107/// <exception cref="InvalidOperationException">
System\Text\Json\Nodes\JsonArray.cs (1)
188/// <exception cref="InvalidOperationException">
System\Text\Json\Nodes\JsonNode.cs (8)
50/// <exception cref="InvalidOperationException"> 71/// <exception cref="InvalidOperationException"> 92/// <exception cref="InvalidOperationException"> 185/// <exception cref="InvalidOperationException"> 199/// <exception cref="InvalidOperationException"> 222/// <exception cref="InvalidOperationException"> 255/// <exception cref="InvalidOperationException"> 273/// <exception cref="InvalidOperationException">
System\Text\Json\Reader\Utf8JsonReader.cs (4)
294/// <exception cref="InvalidOperationException"> 437/// <exception cref="InvalidOperationException"> 467/// <exception cref="InvalidOperationException"> 508/// <exception cref="InvalidOperationException">
System\Text\Json\Reader\Utf8JsonReader.TryGet.cs (35)
20/// <exception cref="InvalidOperationException"> 62/// <exception cref="InvalidOperationException"> 126/// <exception cref="InvalidOperationException"> 235/// <exception cref="InvalidOperationException"> 253/// <exception cref="InvalidOperationException"> 278/// <exception cref="InvalidOperationException"> 301/// <exception cref="InvalidOperationException"> 335/// <exception cref="InvalidOperationException"> 370/// <exception cref="InvalidOperationException"> 404/// <exception cref="InvalidOperationException"> 438/// <exception cref="InvalidOperationException"> 472/// <exception cref="InvalidOperationException"> 507/// <exception cref="InvalidOperationException"> 542/// <exception cref="InvalidOperationException"> 577/// <exception cref="InvalidOperationException"> 634/// <exception cref="InvalidOperationException"> 691/// <exception cref="InvalidOperationException"> 724/// <exception cref="InvalidOperationException"> 757/// <exception cref="InvalidOperationException"> 790/// <exception cref="InvalidOperationException"> 823/// <exception cref="InvalidOperationException"> 851/// <exception cref="InvalidOperationException"> 886/// <exception cref="InvalidOperationException"> 922/// <exception cref="InvalidOperationException"> 957/// <exception cref="InvalidOperationException"> 992/// <exception cref="InvalidOperationException"> 1027/// <exception cref="InvalidOperationException"> 1063/// <exception cref="InvalidOperationException"> 1099/// <exception cref="InvalidOperationException"> 1135/// <exception cref="InvalidOperationException"> 1165/// <exception cref="InvalidOperationException"> 1195/// <exception cref="InvalidOperationException"> 1230/// <exception cref="InvalidOperationException"> 1295/// <exception cref="InvalidOperationException"> 1361/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\Attributes\JsonExtensionDataAttribute.cs (1)
26/// an <see cref="InvalidOperationException"/> is thrown during the first serialization or deserialization of that type.
System\Text\Json\Serialization\Attributes\JsonIncludeAttribute.cs (1)
13/// an <see cref="InvalidOperationException"/> is thrown during the first serialization or deserialization of the declaring type.
System\Text\Json\Serialization\JsonConverterOfT.ReadCore.cs (1)
56catch (InvalidOperationException ex) when (ex.Source == ThrowHelper.ExceptionSourceValueToRethrowAsJsonException)
System\Text\Json\Serialization\JsonConverterOfT.WriteCore.cs (1)
18catch (InvalidOperationException ex) when (ex.Source == ThrowHelper.ExceptionSourceValueToRethrowAsJsonException)
System\Text\Json\Serialization\JsonSerializer.Read.Document.cs (1)
172/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializer.Read.Element.cs (1)
144/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializer.Read.Node.cs (1)
135/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializer.Read.Span.cs (1)
132/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializer.Read.Stream.cs (2)
336/// <exception cref="InvalidOperationException"> 383/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializer.Read.String.cs (2)
350/// <exception cref="InvalidOperationException"> 404/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializer.Read.Utf8JsonReader.cs (1)
244/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializer.Write.ByteArray.cs (1)
122/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializer.Write.Document.cs (1)
113/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializer.Write.Element.cs (1)
113/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializer.Write.Node.cs (1)
114/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializer.Write.String.cs (1)
132/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializer.Write.Utf8JsonWriter.cs (1)
146/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializerOptions.Converters.cs (1)
32/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\JsonSerializerOptions.cs (18)
210/// <exception cref="InvalidOperationException"> 258/// <exception cref="InvalidOperationException"> 285/// <exception cref="InvalidOperationException"> 309/// <exception cref="InvalidOperationException"> 372/// <exception cref="InvalidOperationException"> 404/// <exception cref="InvalidOperationException"> 435/// <exception cref="InvalidOperationException"> 488/// <exception cref="InvalidOperationException"> 512/// <exception cref="InvalidOperationException"> 532/// <exception cref="InvalidOperationException"> 551/// <exception cref="InvalidOperationException"> 622/// <exception cref="InvalidOperationException"> 681/// <exception cref="InvalidOperationException"> 702/// <exception cref="InvalidOperationException"> 724/// <exception cref="InvalidOperationException"> 765/// <exception cref="InvalidOperationException"> 818/// <exception cref="InvalidOperationException">The instance does not specify a <see cref="TypeInfoResolver"/> setting.</exception> 834/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (1)
255catch (InvalidOperationException) when (ignoreCondition == JsonIgnoreCondition.Always)
System\Text\Json\Serialization\Metadata\JsonPolymorphismOptions.cs (3)
37/// <exception cref="InvalidOperationException"> 53/// <exception cref="InvalidOperationException"> 70/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (10)
39/// <exception cref="InvalidOperationException"> 63/// <exception cref="InvalidOperationException"> 82/// <exception cref="InvalidOperationException"> 109/// <exception cref="InvalidOperationException"> 154/// <exception cref="InvalidOperationException"> 239/// <exception cref="InvalidOperationException"> 271/// <exception cref="InvalidOperationException"> 698/// <exception cref="InvalidOperationException"> 748/// <exception cref="InvalidOperationException"> 935/// <exception cref="InvalidOperationException">
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (11)
55/// <exception cref="InvalidOperationException"> 86/// <exception cref="InvalidOperationException"> 116/// <exception cref="InvalidOperationException"> 146/// <exception cref="InvalidOperationException"> 176/// <exception cref="InvalidOperationException"> 265/// <exception cref="InvalidOperationException"> 460/// <exception cref="InvalidOperationException"> 491/// <exception cref="InvalidOperationException"> 535/// <exception cref="InvalidOperationException"> 573/// <exception cref="InvalidOperationException"> 962/// <exception cref="InvalidOperationException">The <see cref="JsonTypeInfo"/> instance has been locked for further modification.</exception>
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.cs (1)
35/// <exception cref="InvalidOperationException">
System\Text\Json\ThrowHelper.cs (14)
79public static InvalidOperationException GetInvalidOperationException_CallFlushFirst(int _buffered) 205private static InvalidOperationException GetInvalidOperationException(string message) 216private static InvalidOperationException GetInvalidOperationException(int currentDepth) 244public static InvalidOperationException GetInvalidOperationException_ExpectedArray(JsonTokenType tokenType) 249public static InvalidOperationException GetInvalidOperationException_ExpectedObject(JsonTokenType tokenType) 296private static InvalidOperationException GetInvalidOperationException(string message, JsonTokenType tokenType) 301private static InvalidOperationException GetInvalidOperationException(JsonTokenType tokenType) 314internal static InvalidOperationException GetJsonElementWrongTypeException( 322internal static InvalidOperationException GetJsonElementWrongTypeException( 536public static InvalidOperationException GetInvalidOperationException_ReadInvalidUTF8(DecoderFallbackException? innerException = null) 546public static InvalidOperationException GetInvalidOperationException(string message, Exception? innerException) 548InvalidOperationException ex = new InvalidOperationException(message, innerException); 554public static InvalidOperationException GetInvalidOperationException(ExceptionResource resource, int currentDepth, int maxDepth, byte token, JsonTokenType tokenType) 557InvalidOperationException ex = GetInvalidOperationException(message);
System\Text\Json\Writer\JsonWriterOptions.cs (1)
116/// a <exception cref="InvalidOperationException"/> to be thrown.
System\Text\Json\Writer\Utf8JsonWriter.cs (13)
27/// an <see cref="InvalidOperationException"/> with a context specific error message. 457/// <exception cref="InvalidOperationException"> 470/// <exception cref="InvalidOperationException"> 592/// <exception cref="InvalidOperationException"> 606/// <exception cref="InvalidOperationException"> 638/// <exception cref="InvalidOperationException"> 663/// <exception cref="InvalidOperationException"> 744/// <exception cref="InvalidOperationException"> 770/// <exception cref="InvalidOperationException"> 793/// <exception cref="InvalidOperationException"> 818/// <exception cref="InvalidOperationException"> 889/// <exception cref="InvalidOperationException"> 901/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Bytes.cs (4)
17/// <exception cref="InvalidOperationException"> 42/// <exception cref="InvalidOperationException"> 65/// <exception cref="InvalidOperationException"> 89/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTime.cs (4)
17/// <exception cref="InvalidOperationException"> 46/// <exception cref="InvalidOperationException"> 70/// <exception cref="InvalidOperationException"> 95/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTimeOffset.cs (4)
17/// <exception cref="InvalidOperationException"> 45/// <exception cref="InvalidOperationException"> 69/// <exception cref="InvalidOperationException"> 94/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Decimal.cs (4)
17/// <exception cref="InvalidOperationException"> 45/// <exception cref="InvalidOperationException"> 69/// <exception cref="InvalidOperationException"> 94/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Double.cs (4)
17/// <exception cref="InvalidOperationException"> 47/// <exception cref="InvalidOperationException"> 71/// <exception cref="InvalidOperationException"> 97/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Float.cs (4)
17/// <exception cref="InvalidOperationException"> 47/// <exception cref="InvalidOperationException"> 71/// <exception cref="InvalidOperationException"> 97/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.FormattedNumber.cs (2)
22/// <exception cref="InvalidOperationException"> 52/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Guid.cs (4)
17/// <exception cref="InvalidOperationException"> 45/// <exception cref="InvalidOperationException"> 69/// <exception cref="InvalidOperationException"> 94/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Literal.cs (8)
17/// <exception cref="InvalidOperationException"> 68/// <exception cref="InvalidOperationException"> 90/// <exception cref="InvalidOperationException"> 115/// <exception cref="InvalidOperationException"> 138/// <exception cref="InvalidOperationException"> 166/// <exception cref="InvalidOperationException"> 189/// <exception cref="InvalidOperationException"> 215/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.SignedNumber.cs (8)
17/// <exception cref="InvalidOperationException"> 45/// <exception cref="InvalidOperationException"> 69/// <exception cref="InvalidOperationException"> 94/// <exception cref="InvalidOperationException"> 116/// <exception cref="InvalidOperationException"> 136/// <exception cref="InvalidOperationException"> 160/// <exception cref="InvalidOperationException"> 177/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.String.cs (20)
16/// <exception cref="InvalidOperationException"> 64/// <exception cref="InvalidOperationException"> 86/// <exception cref="InvalidOperationException"> 235/// <exception cref="InvalidOperationException"> 423/// <exception cref="InvalidOperationException"> 450/// <exception cref="InvalidOperationException"> 476/// <exception cref="InvalidOperationException"> 513/// <exception cref="InvalidOperationException"> 537/// <exception cref="InvalidOperationException"> 561/// <exception cref="InvalidOperationException"> 593/// <exception cref="InvalidOperationException"> 636/// <exception cref="InvalidOperationException"> 659/// <exception cref="InvalidOperationException"> 683/// <exception cref="InvalidOperationException"> 726/// <exception cref="InvalidOperationException"> 749/// <exception cref="InvalidOperationException"> 773/// <exception cref="InvalidOperationException"> 813/// <exception cref="InvalidOperationException"> 845/// <exception cref="InvalidOperationException"> 885/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.UnsignedNumber.cs (8)
17/// <exception cref="InvalidOperationException"> 46/// <exception cref="InvalidOperationException"> 71/// <exception cref="InvalidOperationException"> 97/// <exception cref="InvalidOperationException"> 120/// <exception cref="InvalidOperationException"> 141/// <exception cref="InvalidOperationException"> 166/// <exception cref="InvalidOperationException"> 185/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Bytes.cs (1)
18/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.DateTime.cs (1)
16/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.DateTimeOffset.cs (1)
17/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Decimal.cs (1)
16/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Double.cs (1)
17/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Float.cs (1)
17/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.FormattedNumber.cs (1)
18/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Guid.cs (1)
16/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Literal.cs (2)
13/// <exception cref="InvalidOperationException"> 28/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.SignedNumber.cs (2)
16/// <exception cref="InvalidOperationException"> 29/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.String.cs (4)
15/// <exception cref="InvalidOperationException"> 36/// <exception cref="InvalidOperationException"> 66/// <exception cref="InvalidOperationException"> 213/// <exception cref="InvalidOperationException">
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.UnsignedNumber.cs (2)
16/// <exception cref="InvalidOperationException"> 30/// <exception cref="InvalidOperationException">
System.Text.RegularExpressions (2)
System\Text\RegularExpressions\Regex.EnumerateMatches.cs (2)
102/// then <see cref="MoveNext"/> returns <see langword="false"/> and <see cref="Current"/> throws an <see cref="InvalidOperationException"/>. 158/// <exception cref="InvalidOperationException">Enumeration has either not started or has already finished.</exception>
System.Threading (23)
System\Threading\Barrier.cs (14)
278/// <exception cref="System.InvalidOperationException"> 282/// <exception cref="System.InvalidOperationException"> 313/// <exception cref="System.InvalidOperationException"> 393/// <exception cref="System.InvalidOperationException">The barrier already has 0 395/// <exception cref="System.InvalidOperationException"> 411/// <exception cref="System.InvalidOperationException">The barrier already has 0 participants.</exception> 412/// <exception cref="System.InvalidOperationException"> 472/// <exception cref="System.InvalidOperationException"> 493/// <exception cref="System.InvalidOperationException"> 527/// <exception cref="System.InvalidOperationException"> 555/// <exception cref="System.InvalidOperationException"> 587/// <exception cref="System.InvalidOperationException"> 614/// <exception cref="System.InvalidOperationException"> 901/// <exception cref="System.InvalidOperationException">
System\Threading\CountdownEvent.cs (9)
169/// <exception cref="System.InvalidOperationException">The current instance is already set. 206/// <exception cref="System.InvalidOperationException"> 256/// <exception cref="System.InvalidOperationException">The current instance is already 258/// <exception cref="System.InvalidOperationException"><see cref="CurrentCount"/> is equal to <see 273/// <exception cref="System.InvalidOperationException"><see cref="CurrentCount"/> is equal to <see 289/// <exception cref="System.InvalidOperationException">The current instance is already 291/// <exception cref="System.InvalidOperationException"><see cref="CurrentCount"/> is equal to <see 312/// <exception cref="System.InvalidOperationException">The current instance is already 314/// <exception cref="System.InvalidOperationException"><see cref="CurrentCount"/> is equal to <see
System.Threading.Channels (1)
System\Threading\Channels\ChannelWriter.cs (1)
69/// <exception cref="InvalidOperationException">The channel has already been marked as complete.</exception>
System.Threading.Tasks.Dataflow (4)
Base\DataflowBlock.cs (4)
891/// <exception cref="System.InvalidOperationException">No item could be received from the source.</exception> 905/// <exception cref="System.InvalidOperationException">No item could be received from the source.</exception> 926/// <exception cref="System.InvalidOperationException">No item could be received from the source.</exception> 948/// <exception cref="System.InvalidOperationException">No item could be received from the source.</exception>
System.Threading.Tasks.Parallel (57)
System\Threading\Tasks\Parallel.cs (54)
1805/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1808/// <exception cref="System.InvalidOperationException">The exception that is thrown when any 1810/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1813/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1816/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1856/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1859/// <exception cref="System.InvalidOperationException">The exception that is thrown when any 1861/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1864/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1867/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1909/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1912/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1915/// <exception cref="System.InvalidOperationException">The exception that is thrown when any 1917/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1920/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1923/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1979/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1982/// <exception cref="System.InvalidOperationException">The exception that is thrown when any 1984/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1987/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 1990/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2054/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2057/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2060/// <exception cref="System.InvalidOperationException">The exception that is thrown when any 2062/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2065/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2068/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2135/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2138/// <exception cref="System.InvalidOperationException">The exception that is thrown when any 2140/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2143/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2146/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2199/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2202/// <exception cref="System.InvalidOperationException">The exception that is thrown when any 2204/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2207/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2210/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2265/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2268/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2271/// <exception cref="System.InvalidOperationException">The exception that is thrown when any 2273/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2276/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2279/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2348/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2351/// <exception cref="System.InvalidOperationException">The exception that is thrown when any 2353/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2356/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2359/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2436/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2439/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2442/// <exception cref="System.InvalidOperationException">The exception that is thrown when any 2444/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2447/// <exception cref="System.InvalidOperationException">The exception that is thrown when the 2450/// <exception cref="System.InvalidOperationException">The exception that is thrown when the
System\Threading\Tasks\ParallelLoopState.cs (3)
124/// <exception cref="System.InvalidOperationException"> 157/// <exception cref="System.InvalidOperationException"> 276/// <exception cref="System.InvalidOperationException">Break() called after Stop().</exception>
System.Windows.Controls.Ribbon (2)
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (1)
2555catch (InvalidOperationException)
Microsoft\Windows\Controls\TextSearchInternal.cs (1)
872catch (InvalidOperationException)
System.Xaml.Tests (11)
System\Windows\Markup\ArrayExtensionTests.cs (2)
109Assert.Throws<InvalidOperationException>(() => extension.ProvideValue(null)); 117Assert.Throws<InvalidOperationException>(() => extension.ProvideValue(null));
System\Windows\Markup\NameReferenceConverterTests.cs (3)
87Assert.Throws<InvalidOperationException>(() => converter.ConvertFrom(context, null, "name")); 120Assert.Throws<InvalidOperationException>(() => converter.ConvertFrom(context, null, value)); 179Assert.Throws<InvalidOperationException>(() => converter.ConvertTo(context, null, "value", null));
System\Windows\Markup\ReferenceTests.cs (2)
81Assert.Throws<InvalidOperationException>(() => reference.ProvideValue(provider)); 94Assert.Throws<InvalidOperationException>(() => reference.ProvideValue(provider));
System\Windows\Markup\StaticExtensionTests.cs (1)
96Assert.Throws<InvalidOperationException>(() => extension.ProvideValue(null));
System\Windows\Markup\TypeExtensionTests.cs (3)
85Assert.Throws<InvalidOperationException>(() => extension.ProvideValue(null)); 105Assert.Throws<InvalidOperationException>(() => extension.ProvideValue(provider)); 123Assert.Throws<InvalidOperationException>(() => extension.ProvideValue(provider));
UIAutomationClient (2)
MS\Internal\Automation\HwndProxyElementProvider.cs (1)
468catch (InvalidOperationException /*err*/)
MS\Internal\Automation\WindowInteractionStateTracker.cs (1)
91catch (InvalidOperationException)
WindowsFormsIntegration (1)
System\Windows\Integration\WindowsFormsHost.cs (1)
222InvalidOperationException exception = new InvalidOperationException(SR.Host_CannotRotateWindowsFormsHost);
XmlFormattersWebSite (2)
Controllers\SerializableErrorController.cs (2)
14InvalidOperationException exception = null; 20catch (InvalidOperationException invalidOperationEx)